Documentation ¶
Index ¶
- func NewObjectId(v interface{}) *objectId
- type Client
- func (m *Client) Close()
- func (m *Client) Connect(url string, db string, collection string) error
- func (m *Client) CreateCollection() error
- func (m *Client) DeleteById(objectId string) error
- func (m *Client) DeleteBySlug(slug string, v interface{}) error
- func (m *Client) DropCollection() error
- func (m *Client) FindAll(v interface{}) error
- func (m *Client) FindById(objectId string, v interface{}) error
- func (m *Client) FindByValue(q interface{}, v interface{}) error
- func (m *Client) FindByValueSorted(q interface{}, v interface{}, fields ...string) error
- func (m *Client) FindGroup(q interface{}, groupPipe bson.M, sortPipe bson.M, v interface{}) error
- func (m *Client) FindRedact(q interface{}, redactPipe bson.M, sortPipe bson.M, v interface{}) error
- func (m *Client) Insert(v interface{}) error
- func (m *Client) ReadByID(objectId string, v interface{}) error
- func (m *Client) ReadBySlug(slug string, v interface{}) error
- func (m *Client) ReadByValue(v interface{}) error
- func (m *Client) ReadByValueFiltered(f interface{}, v interface{}) error
- func (m *Client) ReadRaw(q bson.M, v interface{}) error
- func (m *Client) Update(v interface{}) error
- func (m *Client) UpdateRaw(q bson.M) error
- func (m *Client) UpdateRawFiltered(f bson.M, q bson.M) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewObjectId ¶
func NewObjectId(v interface{}) *objectId
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CreateCollection ¶
func (*Client) DeleteById ¶
func (*Client) DeleteBySlug ¶
func (*Client) DropCollection ¶
func (*Client) FindByValue ¶
func (*Client) FindByValueSorted ¶
func (*Client) FindRedact ¶
func (*Client) ReadBySlug ¶
func (*Client) ReadByValue ¶
func (*Client) ReadByValueFiltered ¶
Click to show internal directories.
Click to hide internal directories.