Documentation
¶
Index ¶
- Variables
- type Controller
- func (c *Controller) Create(ctx context.Context, session *auth.Session, in *CreateInput) (*types.ServiceAccount, error)
- func (c *Controller) CreateNoAuth(ctx context.Context, in *CreateInput, uid string) (*types.ServiceAccount, error)
- func (c *Controller) CreateToken(ctx context.Context, session *auth.Session, saUID string, in *CreateTokenInput) (*types.TokenResponse, error)
- func (c *Controller) Delete(ctx context.Context, session *auth.Session, saUID string) error
- func (c *Controller) DeleteToken(ctx context.Context, session *auth.Session, saUID string, identifier string) error
- func (c *Controller) Find(ctx context.Context, session *auth.Session, saUID string) (*types.ServiceAccount, error)
- func (c *Controller) FindNoAuth(ctx context.Context, saUID string) (*types.ServiceAccount, error)
- func (c *Controller) ListTokens(ctx context.Context, session *auth.Session, saUID string) ([]*types.Token, error)
- type CreateInput
- type CreateTokenInput
Constants ¶
This section is empty.
Variables ¶
View Source
var WireSet = wire.NewSet( NewController, )
WireSet provides a wire set for this package.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func NewController ¶
func NewController(principalUIDCheck check.PrincipalUID, authorizer authz.Authorizer, principalStore store.PrincipalStore, spaceStore store.SpaceStore, repoStore store.RepoStore, tokenStore store.TokenStore) *Controller
func ProvideController ¶
func ProvideController(principalUIDCheck check.PrincipalUID, authorizer authz.Authorizer, principalStore store.PrincipalStore, spaceStore store.SpaceStore, repoStore store.RepoStore, tokenStore store.TokenStore) *Controller
func (*Controller) Create ¶
func (c *Controller) Create(ctx context.Context, session *auth.Session, in *CreateInput) (*types.ServiceAccount, error)
Create creates a new service account.
func (*Controller) CreateNoAuth ¶
func (c *Controller) CreateNoAuth(ctx context.Context, in *CreateInput, uid string) (*types.ServiceAccount, error)
* CreateNoAuth creates a new service account without auth checks. * WARNING: Never call as part of user flow. * * Note: take uid separately to allow internally created non-random uids.
func (*Controller) CreateToken ¶
func (c *Controller) CreateToken( ctx context.Context, session *auth.Session, saUID string, in *CreateTokenInput, ) (*types.TokenResponse, error)
CreateToken creates a new service account access token.
func (*Controller) DeleteToken ¶
func (c *Controller) DeleteToken( ctx context.Context, session *auth.Session, saUID string, identifier string, ) error
DeleteToken deletes a token of a service account.
func (*Controller) Find ¶
func (c *Controller) Find(ctx context.Context, session *auth.Session, saUID string) (*types.ServiceAccount, error)
Find tries to find the provided service account.
func (*Controller) FindNoAuth ¶
func (c *Controller) FindNoAuth(ctx context.Context, saUID string) (*types.ServiceAccount, error)
* FindNoAuth finds a service account without auth checks. * WARNING: Never call as part of user flow.
type CreateInput ¶
type CreateInput struct { Email string `json:"email"` DisplayName string `json:"display_name"` ParentType enum.ParentResourceType `json:"parent_type"` ParentID int64 `json:"parent_id"` }
Click to show internal directories.
Click to hide internal directories.