Documentation ¶
Index ¶
- Constants
- type BulkRequest
- type BulkResponse
- type BulkResponseItem
- type Client
- func (c *Client) Bulk(items []*BulkRequest) error
- func (c *Client) Delete(database string, collection string, id string) error
- func (c *Client) DeleteDB(database string) error
- func (c *Client) Exists(database string, collection string, id string) (bool, error)
- func (c *Client) Get(database string, collection string, id string) (*Response, error)
- func (c *Client) Update(database string, collection string, id string, data map[string]interface{}) error
- type ClientConfig
- type Response
- type ResponseItem
Constants ¶
View Source
const ( ActionCreate = "create" ActionUpdate = "update" ActionDelete = "delete" ActionInsert = "insert" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BulkRequest ¶
type BulkResponse ¶
type BulkResponse struct { Code int Took int `json:"took"` Errors bool `json:"errors"` Items []map[string]*BulkResponseItem `json:"items"` }
type BulkResponseItem ¶
type Client ¶
type Client struct { Addr string Username string Password string // contains filtered or unexported fields }
func NewClient ¶
func NewClient(conf *ClientConfig) (*Client, error)
func (*Client) Bulk ¶
func (c *Client) Bulk(items []*BulkRequest) error
type ClientConfig ¶
type Response ¶
type Response struct { Code int ResponseItem }
Click to show internal directories.
Click to hide internal directories.