Documentation ¶
Index ¶
- type Client
- func (client *Client) GetEmail(id string) (string, error)
- func (client *Client) LastAuthenticatedAfter(lastAuthenticatedAt time.Time) *Client
- func (client *Client) ListEmails(ids ...string) (map[string]string, error)
- func (client *Client) SetGravatar(id string, url string) error
- func (client *Client) Synchronize(id string, params *model.UserSynchronizeParams) (*model.User, error)
- func (client *Client) UnsetGravatar(id string) error
- func (client *Client) UpdateWithParams(id string, params *model.UserUpdateParams) error
- func (client *Client) WithApiKey(apiKey string) *Client
- func (client *Client) WithPagination(page, pageSize int) *Client
- func (client *Client) WithSearch(search string) *Client
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { base_clients.ResourceClient[model.User] }
Client is used to manage users in the database.
func (*Client) LastAuthenticatedAfter ¶
LastAuthenticatedAfter filters the users to only those who have authenticated after the given time.
func (*Client) ListEmails ¶
ListEmails returns a list of emails for the given user IDs.
func (*Client) SetGravatar ¶
SetGravatar updates the gravatar URL for the user.
func (*Client) Synchronize ¶
func (client *Client) Synchronize(id string, params *model.UserSynchronizeParams) (*model.User, error)
Synchronize creates a new user or updates an existing user.
func (*Client) UnsetGravatar ¶
UnsetGravatar removes the gravatar URL for the user.
func (*Client) UpdateWithParams ¶
func (client *Client) UpdateWithParams(id string, params *model.UserUpdateParams) error
UpdateWithParams updates the user with the given params.
func (*Client) WithApiKey ¶
WithApiKey filters the users to only those with the given API key.
func (*Client) WithPagination ¶
WithPagination adds pagination to the client.
func (*Client) WithSearch ¶
WithSearch searches the `users` collection for the given search string. It uses the text index on the `users` collection to search.