package v1alpha1 // Provider information about the data provider type Provider struct { Name string `json:"name"` } func (p *Provider) Empty() bool { if p != nil { return p.Name == "" } return true } func (p *Provider) Equal(p2 *Provider) bool { if p == nil && p2 == nil { return true } if p != nil && p2 != nil && p.Name == p2.Name { return true } return false } // ReplConfig CouchDB replication settings from https://docs.couchdb.org/en/stable/json-structure.html?highlight=checkpoint_interval#replication-settings type ReplConfig struct { Interval string `json:"interval"` Cancel bool `json:"cancel"` Continuous bool `json:"continuous"` CreateTarget bool `json:"create_target"` DocIDs []string `json:"doc_ids"` Filter string `json:"filter"` SourceProxy string `json:"source_proxy"` TargetProxy string `json:"target_proxy"` QueryParams string `json:"query_params"` // TODO Selector string `json:"selector"` SinceSeq string `json:"since_seq"` UseCheckpoints bool `json:"use_checkpoints"` } // Dataset represents a database and associated configuration type Dataset struct { Name string `json:"name"` Provider *Provider `json:"provider,omitempty"` Config ReplConfig `json:"config"` EnterpriseUnitID string `json:"enterprise_unit_id,omitempty"` Stores []string `json:"stores,omitempty"` Touchpoints []string `json:"touchpoints,omitempty"` Deleted bool `json:"deleted,omitempty"` } // ReplicationSet represents all replications for stores and touchpoints whithin a banner type ReplicationSet struct { Providers []Provider `json:"providers"` Datasets []Dataset `json:"datasets"` }