Documentation
¶
Index ¶
- Constants
- type ActiveTask
- type ActiveTasks
- type Couchdb
- func (c Couchdb) DeleteAllReplicators() (*Replicators, error)
- func (c Couchdb) DeleteReplicator(id string) error
- func (c *Couchdb) GetActiveTasks() (ActiveTasks, error)
- func (c Couchdb) GetDatabases() (Databases, error)
- func (c Couchdb) GetReplicator(id string) (*Replicator, error)
- func (c Couchdb) GetReplicators() (*Replicators, error)
- func (c Couchdb) GetServer() (Server, error)
- func (c Couchdb) GetSession() (Session, error)
- func (c Couchdb) GetStats(sectionA, sectionB string) (Stats, error)
- func (c Couchdb) GetViews(db Database) (Views, error)
- func (c Couchdb) RefreshView(view View) error
- func (c Couchdb) RefreshViews(views Views) (Views, []error)
- func (c Couchdb) Replicate(conf ReplicationConfig) error
- func (c Couchdb) ReplicateHost(remoteCouch *Couchdb, conf ReplicationConfig) (*Databases, error)
- type CouchdbError
- type Database
- type Databases
- type DesignDoc
- type ReplicationConfig
- type Replicator
- type Replicators
- type Result
- type Server
- type Session
- type Stat
- type Stats
- type UserCtx
- type View
- type Views
Constants ¶
View Source
const ( HEAD = "HEAD" PUT = "PUT" POST = "POST" GET = "GET" DELETE = "DELETE" JSONCONTENTTYPE = "application/json" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActiveTask ¶
type ActiveTask struct {
Type string
Pid string
Database Database
Progress int
DesignDocument DesignDoc `json:"design_document"`
StartedOn int `json:"started_on"`
Source string
Target string
Continuous bool
}
func (ActiveTask) PP ¶
func (a ActiveTask) PP(printer util.Printer)
type ActiveTasks ¶
type ActiveTasks []ActiveTask
func (*ActiveTasks) ByType ¶
func (a *ActiveTasks) ByType(t string) ActiveTasks
func (ActiveTasks) PP ¶
func (a ActiveTasks) PP(printer util.Printer)
type Couchdb ¶
type Couchdb struct {
ResultHandler func(*Result)
// contains filtered or unexported fields
}
func (Couchdb) DeleteAllReplicators ¶
func (c Couchdb) DeleteAllReplicators() (*Replicators, error)
func (Couchdb) DeleteReplicator ¶
func (*Couchdb) GetActiveTasks ¶
func (c *Couchdb) GetActiveTasks() (ActiveTasks, error)
func (Couchdb) GetDatabases ¶
func (Couchdb) GetReplicator ¶
func (c Couchdb) GetReplicator(id string) (*Replicator, error)
func (Couchdb) GetReplicators ¶
func (c Couchdb) GetReplicators() (*Replicators, error)
func (Couchdb) GetSession ¶
func (Couchdb) RefreshView ¶
func (Couchdb) Replicate ¶
func (c Couchdb) Replicate(conf ReplicationConfig) error
func (Couchdb) ReplicateHost ¶
func (c Couchdb) ReplicateHost(remoteCouch *Couchdb, conf ReplicationConfig) (*Databases, error)
type CouchdbError ¶
func (CouchdbError) Error ¶
func (e CouchdbError) Error() string
func (CouchdbError) IsConflict ¶
func (e CouchdbError) IsConflict() bool
func (CouchdbError) IsNotFound ¶
func (e CouchdbError) IsNotFound() bool
type DesignDoc ¶
func (*DesignDoc) UnmarshalJSON ¶
type ReplicationConfig ¶
type ReplicationConfig struct {
ID string `json:"_id,omitempty"`
REV string `json:"_rev,omitempty"`
Source string `json:"source"`
Target string `json:"target"`
Cancel bool `json:"cancel"`
CreateTarget bool `json:"create_target"`
Continuous bool `json:"continuous"`
UserCtx UserCtx `json:"user_ctx"` // see api/session
}
func (*ReplicationConfig) GenerateId ¶
func (r *ReplicationConfig) GenerateId()
type Replicator ¶
type Replicator struct {
ReplicationConfig
// following fields are set after doc creation
Owner string `json:"owner,omitempty"`
ReplicationId string `json:"_replication_id,omitempty"`
ReplicationState string `json:"_replication_state,omitempty"`
ReplicationStateTime string `json:"_replication_state_time,omitempty"`
}
func (Replicator) PP ¶
func (r Replicator) PP(printer util.Printer)
type Replicators ¶
type Replicators map[string][]*Replicator
func (Replicators) PP ¶
func (r Replicators) PP(printer util.Printer)
type Server ¶
type Session ¶
type Stat ¶
type Stat struct {
Description string
Current float64
Sum float64
Mean float64
Min float64
Max float64
Stddev float64
Section string
SubSection string
}
func (Stat) TrimmedDescription ¶
Click to show internal directories.
Click to hide internal directories.