Documentation ¶
Index ¶
- Constants
- Variables
- func StartStatsdClient(endpoint string)
- type AttachmentContent
- type BulkDocsEntry
- type Change
- type ChangeRev
- type Checkpoint
- type Doc
- type RestClient
- func (c *RestClient) Do(req *http.Request, opName string) (mresp map[string]interface{})
- func (c *RestClient) DoAndIgnore(req *http.Request, opName string) bool
- func (c *RestClient) DoRaw(req *http.Request, opName string) (resp *http.Response, serialNumber uint64)
- func (c *RestClient) Do_returns_json_array(req *http.Request, opName string) (mresp []interface{})
- type Session
- type SyncGatewayClient
- func (c *SyncGatewayClient) AddCookie(cookie *http.Cookie)
- func (c *SyncGatewayClient) AddPassword(password string)
- func (c *SyncGatewayClient) AddUser(name string, auth UserAuth, userType string)
- func (c *SyncGatewayClient) AddUsername(username string)
- func (c *SyncGatewayClient) CreateSession(name string, session Session) http.Cookie
- func (c *SyncGatewayClient) GetBulkDocs(docs []BulkDocsEntry, wakeup time.Time) bool
- func (c *SyncGatewayClient) GetChangesFeed(feedType string, since interface{}, wakeup time.Time) (<-chan *Change, *bool, *http.Response)
- func (c *SyncGatewayClient) GetLastSeq() float64
- func (c *SyncGatewayClient) GetSingleDoc(docid string, revid string, wakeup time.Time) bool
- func (c *SyncGatewayClient) Init(hostname, db string, port, adminPort int, verbose bool)
- func (c *SyncGatewayClient) PostBulkDocs(docs map[string]interface{}) bool
- func (c *SyncGatewayClient) PostRevsDiff(revsDiff map[string][]string)
- func (c *SyncGatewayClient) PutSingleDoc(docid string, doc Doc) bool
- func (c *SyncGatewayClient) SaveCheckpoint(id string, checkpoint Checkpoint)
- func (c *SyncGatewayClient) Valid() bool
- type UserAuth
Constants ¶
View Source
const MaxIdleConnsPerHost = 28000
Variables ¶
View Source
var OperationCallback func(op string, start time.Time, err error)
View Source
var (
StatsdClient *g2s.Statsd
)
Functions ¶
func StartStatsdClient ¶
func StartStatsdClient(endpoint string)
Types ¶
type AttachmentContent ¶
type AttachmentContent struct {
Data string `json:"data"`
}
type BulkDocsEntry ¶
type Checkpoint ¶
type Checkpoint struct {
LastSequence interface{} `json:"lastSequence"`
}
type Doc ¶
type Doc struct { Id string `json:"_id"` Rev string `json:"_rev"` Channels []string `json:"channels"` Data map[string]string `json:"data,,omitempty"` Revisions map[string]interface{} `json:"_revisions"` Created time.Time `json:"created"` Attachments map[string]AttachmentContent `json:"_attachments,omitempty"` // this field is only used by a special sync function on SG which // will grant access for this doc to the (puller) user id in target_user TargetUser string `json:"target_user"` }
type RestClient ¶
type RestClient struct { Verbose bool // contains filtered or unexported fields }
func (*RestClient) Do ¶
func (c *RestClient) Do(req *http.Request, opName string) (mresp map[string]interface{})
func (*RestClient) DoAndIgnore ¶
func (c *RestClient) DoAndIgnore(req *http.Request, opName string) bool
func (*RestClient) Do_returns_json_array ¶
func (c *RestClient) Do_returns_json_array(req *http.Request, opName string) (mresp []interface{})
type SyncGatewayClient ¶
type SyncGatewayClient struct {
// contains filtered or unexported fields
}
func (*SyncGatewayClient) AddCookie ¶
func (c *SyncGatewayClient) AddCookie(cookie *http.Cookie)
func (*SyncGatewayClient) AddPassword ¶
func (c *SyncGatewayClient) AddPassword(password string)
func (*SyncGatewayClient) AddUser ¶
func (c *SyncGatewayClient) AddUser(name string, auth UserAuth, userType string)
func (*SyncGatewayClient) AddUsername ¶
func (c *SyncGatewayClient) AddUsername(username string)
func (*SyncGatewayClient) CreateSession ¶
func (c *SyncGatewayClient) CreateSession(name string, session Session) http.Cookie
func (*SyncGatewayClient) GetBulkDocs ¶
func (c *SyncGatewayClient) GetBulkDocs(docs []BulkDocsEntry, wakeup time.Time) bool
func (*SyncGatewayClient) GetChangesFeed ¶
func (*SyncGatewayClient) GetLastSeq ¶
func (c *SyncGatewayClient) GetLastSeq() float64
no longer used due to https://github.com/couchbase/sync_gateway/issues/1159#issuecomment-142731185
func (*SyncGatewayClient) GetSingleDoc ¶
func (*SyncGatewayClient) Init ¶
func (c *SyncGatewayClient) Init(hostname, db string, port, adminPort int, verbose bool)
func (*SyncGatewayClient) PostBulkDocs ¶
func (c *SyncGatewayClient) PostBulkDocs(docs map[string]interface{}) bool
func (*SyncGatewayClient) PostRevsDiff ¶
func (c *SyncGatewayClient) PostRevsDiff(revsDiff map[string][]string)
func (*SyncGatewayClient) PutSingleDoc ¶
func (c *SyncGatewayClient) PutSingleDoc(docid string, doc Doc) bool
func (*SyncGatewayClient) SaveCheckpoint ¶
func (c *SyncGatewayClient) SaveCheckpoint(id string, checkpoint Checkpoint)
func (*SyncGatewayClient) Valid ¶
func (c *SyncGatewayClient) Valid() bool
Click to show internal directories.
Click to hide internal directories.