Documentation ¶
Overview ¶
Package xkivik provides experimental features for Kivik.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Document ¶
type Document struct { ID string `json:"_id"` Rev string `json:"_rev"` Attachments *kivik.Attachments `json:"_attachments,omitempty"` Data map[string]interface{} `json:"-"` }
Document represents any CouchDB document.
func (*Document) MarshalJSON ¶
MarshalJSON satisfies the json.Marshaler interface
func (*Document) UnmarshalJSON ¶
UnmarshalJSON satisfies the json.Unmarshaler interface.
type ReplicationResult ¶
type ReplicationResult struct { DocWriteFailures int `json:"doc_write_failures"` DocsRead int `json:"docs_read"` DocsWritten int `json:"docs_written"` EndTime time.Time `json:"end_time"` MissingChecked int `json:"missing_checked"` MissingFound int `json:"missing_found"` StartTime time.Time `json:"start_time"` }
ReplicationResult represents the result of a replication.
func Replicate ¶
func Replicate(ctx context.Context, target, source *kivik.DB, options ...kivik.Options) (*ReplicationResult, error)
Replicate performs a replication from source to target, using a limited version of the CouchDB replication protocol.
The following options are supported:
filter (string) - The name of a filter function. doc_ids (array of string) - Array of document IDs to be synchronized. copy_security (bool) - When true, the security object is read from the source, and copied to the target, before the replication. Use with caution! The security object is not versioned, and will be unconditionally overwritten!
Click to show internal directories.
Click to hide internal directories.