Documentation
¶
Index ¶
- type AlreadyExistsError
- type Client
- func (c *Client) ActiveUsersByDate(ctx context.Context, start, end time.Time) ([]types.User, error)
- func (c *Client) ActivitiesByUser(ctx context.Context, userID string, start, end time.Time) ([]types.APIActivity, error)
- func (c *Client) AddActivityForToday(ctx context.Context, userID string) error
- func (c *Client) Close() error
- func (c *Client) CreateImage(ctx context.Context, data []byte, mimeType string) (*types.Image, error)
- func (c *Client) CreateRunState(ctx context.Context, runState *types.RunState) error
- func (c *Client) DeleteImage(ctx context.Context, id string) error
- func (c *Client) DeleteRunState(ctx context.Context, namespace, name string) error
- func (c *Client) DeleteUser(ctx context.Context, username string) (*types.User, error)
- func (c *Client) EnsureIdentity(ctx context.Context, id *types.Identity, timezone string) (*types.User, error)
- func (c *Client) EnsureIdentityWithRole(ctx context.Context, id *types.Identity, timezone string, role types2.Role) (*types.User, error)
- func (c *Client) GetImage(ctx context.Context, id string) (*types.Image, error)
- func (c *Client) IsExplicitAdmin(email string) bool
- func (c *Client) RemoveIdentity(ctx context.Context, id *types.Identity) error
- func (c *Client) RunState(ctx context.Context, namespace, name string) (*types.RunState, error)
- func (c *Client) UpdateProfileIconIfNeeded(ctx context.Context, user *types.User, ...) error
- func (c *Client) UpdateRunState(ctx context.Context, runState *types.RunState) error
- func (c *Client) UpdateUser(ctx context.Context, actingUserIsAdmin bool, updatedUser *types.User, ...) (*types.User, error)
- func (c *Client) User(ctx context.Context, username string) (*types.User, error)
- func (c *Client) UserByID(ctx context.Context, id string) (*types.User, error)
- func (c *Client) Users(ctx context.Context, query types.UserQuery) ([]types.User, error)
- type ExplicitAdminError
- type LastAdminError
- type UserDecorator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlreadyExistsError ¶ added in v0.5.0
type AlreadyExistsError struct {
// contains filtered or unexported fields
}
func (*AlreadyExistsError) Error ¶ added in v0.5.0
func (e *AlreadyExistsError) Error() string
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) ActiveUsersByDate ¶ added in v0.7.1
func (*Client) ActivitiesByUser ¶ added in v0.7.1
func (*Client) AddActivityForToday ¶ added in v0.7.1
func (*Client) CreateImage ¶ added in v0.7.0
func (c *Client) CreateImage(ctx context.Context, data []byte, mimeType string) (*types.Image, error)
CreateImage stores a new image in the database
func (*Client) CreateRunState ¶ added in v0.7.0
func (*Client) DeleteImage ¶ added in v0.7.0
DeleteImage removes an image from the database
func (*Client) DeleteRunState ¶ added in v0.7.0
func (*Client) DeleteUser ¶ added in v0.5.0
func (*Client) EnsureIdentity ¶
func (c *Client) EnsureIdentity(ctx context.Context, id *types.Identity, timezone string) (*types.User, error)
EnsureIdentity ensures that the given identity exists in the database, and returns the user associated with it.
func (*Client) EnsureIdentityWithRole ¶ added in v0.5.0
func (c *Client) EnsureIdentityWithRole(ctx context.Context, id *types.Identity, timezone string, role types2.Role) (*types.User, error)
EnsureIdentityWithRole ensures the given identity exists in the database with the given role, and returns the user associated with it.
func (*Client) IsExplicitAdmin ¶ added in v0.5.0
func (*Client) RemoveIdentity ¶ added in v0.5.0
RemoveIdentity deletes an identity and the associated user from the database. The identity and user are deleted using UserID if set, otherwise ProviderUsername. The method is idempotent and ignores not-found errors, returning only unexpected errors.
func (*Client) UpdateProfileIconIfNeeded ¶
func (*Client) UpdateRunState ¶ added in v0.7.0
func (*Client) UpdateUser ¶ added in v0.5.0
type ExplicitAdminError ¶ added in v0.5.0
type ExplicitAdminError struct {
// contains filtered or unexported fields
}
func (*ExplicitAdminError) Error ¶ added in v0.5.0
func (e *ExplicitAdminError) Error() string
type LastAdminError ¶ added in v0.5.0
type LastAdminError struct{}
func (*LastAdminError) Error ¶ added in v0.5.0
func (e *LastAdminError) Error() string
type UserDecorator ¶
type UserDecorator struct {
// contains filtered or unexported fields
}
func NewUserDecorator ¶
func NewUserDecorator(next authenticator.Request, client *Client) *UserDecorator
func (UserDecorator) AuthenticateRequest ¶
func (u UserDecorator) AuthenticateRequest(req *http.Request) (*authenticator.Response, bool, error)
Click to show internal directories.
Click to hide internal directories.