Documentation
¶
Index ¶
- type Client
- func (c *Client) Begin() (*CommandResponse, error)
- func (c *Client) Close() error
- func (c *Client) CollectionCreate(name string) (*CommandResponse, error)
- func (c *Client) CollectionDelete(name string) (*CommandResponse, error)
- func (c *Client) CollectionIndexCreate(collectionName, fieldName string) (*CommandResponse, error)
- func (c *Client) CollectionIndexDelete(collectionName, fieldName string) (*CommandResponse, error)
- func (c *Client) CollectionIndexList(collectionName string) ([]string, error)
- func (c *Client) CollectionItemDelete(collectionName, key string) (*CommandResponse, error)
- func (c *Client) CollectionItemDeleteMany(collectionName string, keys []string) (*CommandResponse, error)
- func (c *Client) CollectionItemGet(collectionName, key string) (*GetResult, error)
- func (c *Client) CollectionItemSet(collectionName, key string, value any, ttl time.Duration) (*CommandResponse, error)
- func (c *Client) CollectionItemSetMany(collectionName string, items []any) (*CommandResponse, error)
- func (c *Client) CollectionItemUpdate(collectionName, key string, patchValue any) (*CommandResponse, error)
- func (c *Client) CollectionItemUpdateMany(collectionName string, items []any) (*CommandResponse, error)
- func (c *Client) CollectionList() ([]string, error)
- func (c *Client) CollectionQuery(collectionName string, query Query) (*CommandResponse, error)
- func (c *Client) Commit() (*CommandResponse, error)
- func (c *Client) Connect() error
- func (c *Client) IsAuthenticated() bool
- func (c *Client) Rollback() (*CommandResponse, error)
- type ClientOptions
- type CommandResponse
- type GetResult
- type Query
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(opts ClientOptions) *Client
func (*Client) Begin ¶
func (c *Client) Begin() (*CommandResponse, error)
func (*Client) CollectionCreate ¶
func (c *Client) CollectionCreate(name string) (*CommandResponse, error)
func (*Client) CollectionDelete ¶
func (c *Client) CollectionDelete(name string) (*CommandResponse, error)
func (*Client) CollectionIndexCreate ¶
func (c *Client) CollectionIndexCreate(collectionName, fieldName string) (*CommandResponse, error)
func (*Client) CollectionIndexDelete ¶
func (c *Client) CollectionIndexDelete(collectionName, fieldName string) (*CommandResponse, error)
func (*Client) CollectionIndexList ¶
func (*Client) CollectionItemDelete ¶
func (c *Client) CollectionItemDelete(collectionName, key string) (*CommandResponse, error)
func (*Client) CollectionItemDeleteMany ¶
func (c *Client) CollectionItemDeleteMany(collectionName string, keys []string) (*CommandResponse, error)
func (*Client) CollectionItemGet ¶
func (*Client) CollectionItemSet ¶
func (*Client) CollectionItemSetMany ¶
func (c *Client) CollectionItemSetMany(collectionName string, items []any) (*CommandResponse, error)
func (*Client) CollectionItemUpdate ¶
func (c *Client) CollectionItemUpdate(collectionName, key string, patchValue any) (*CommandResponse, error)
func (*Client) CollectionItemUpdateMany ¶
func (c *Client) CollectionItemUpdateMany(collectionName string, items []any) (*CommandResponse, error)
func (*Client) CollectionList ¶
func (*Client) CollectionQuery ¶
func (c *Client) CollectionQuery(collectionName string, query Query) (*CommandResponse, error)
func (*Client) Commit ¶
func (c *Client) Commit() (*CommandResponse, error)
func (*Client) IsAuthenticated ¶
func (*Client) Rollback ¶
func (c *Client) Rollback() (*CommandResponse, error)
type ClientOptions ¶
type CommandResponse ¶
func (*CommandResponse) JSON ¶
func (r *CommandResponse) JSON(v any) error
func (*CommandResponse) OK ¶
func (r *CommandResponse) OK() bool
type GetResult ¶
type GetResult struct {
*CommandResponse
}
type Query ¶
type Query struct {
Filter map[string]any `json:"filter,omitempty"`
OrderBy []any `json:"order_by,omitempty"`
Limit *int `json:"limit,omitempty"`
Offset int `json:"offset,omitempty"`
Count bool `json:"count,omitempty"`
Aggregations map[string]any `json:"aggregations,omitempty"`
GroupBy []string `json:"group_by,omitempty"`
Having map[string]any `json:"having,omitempty"`
Distinct string `json:"distinct,omitempty"`
Projection []string `json:"projection,omitempty"`
Lookups []any `json:"lookups,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.