Documentation
¶
Index ¶
- type Client
- func (c *Client) ApiKeys() api.ApiKeys
- func (c *Client) Discover(opts ...opts.DiscoverOpts) ([]body.UserReadDiscovery, error)
- func (c *Client) Exists(id string) (bool, error)
- func (c *Client) FetchGravatar(userID string) (*string, error)
- func (c *Client) Get(id string, opts ...opts.GetOpts) (*model.User, error)
- func (c *Client) GetByApiKey(apiKey string) (*model.User, error)
- func (c *Client) GetUsage(userID string) (*model.UserUsage, error)
- func (c *Client) List(opts ...opts.ListOpts) ([]model.User, error)
- func (c *Client) ListTestUsers() ([]model.User, error)
- func (c *Client) RefreshTeam(id string, tmc *team_repo.Client) (*model.Team, error)
- func (c *Client) RefreshUser(id string, umc *user_repo.Client) (*model.User, error)
- func (c *Client) Synchronize(authParams *model.AuthParams) (*model.User, error)
- func (c *Client) Team(id string, tmc *team_repo.Client) (*model.Team, error)
- func (c *Client) Teams(tmc *team_repo.Client) ([]model.Team, error)
- func (c *Client) Update(userID string, dtoUserUpdate *body.UserUpdate) (*model.User, error)
- func (c *Client) User(id string, umc *user_repo.Client) (*model.User, error)
- func (c *Client) Users(umc *user_repo.Client) ([]model.User, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { V2 clients.V2 // Cache is used to cache the resources fetched inside the service. Cache *core.Cache }
Client is the client for the User service.
func (*Client) Discover ¶
func (c *Client) Discover(opts ...opts.DiscoverOpts) ([]body.UserReadDiscovery, error)
Discover returns a list of users that the requesting user has access to.
It uses search param to enable searching in multiple fields. If UserID is provided, it returns a single user.
func (*Client) FetchGravatar ¶
FetchGravatar checks if the user has a gravatar image and fetches it if it exists. If the user does not have a gravatar image, it returns nil.
func (*Client) GetByApiKey ¶
GetByApiKey gets a user by their API key
func (*Client) GetUsage ¶
GetUsage gets the usage of a user, such as number of deployments and CPU cores used
func (*Client) RefreshTeam ¶
RefreshTeam refreshes the Team with the given ID. After a successful fetch, the Team will be cached.
func (*Client) RefreshUser ¶
RefreshUser refreshes the User with the given ID. After a successful fetch, the User will be cached.
func (*Client) Synchronize ¶
Synchronize creates a user or updates an existing user. It does nothing if no auth info is provided.
It does not use AuthInfo as it is meant to be used by the auth service.
func (*Client) Team ¶
Team returns the Team with the given ID. After a successful fetch, the Team will be cached.
func (*Client) Teams ¶
Teams returns a list of Teams. After a successful fetch, the Teams will be cached.