Documentation
¶
Index ¶
- Variables
- type Controller
- func (c *Controller) Create(ctx context.Context, session *auth.Session, in *CreateInput) (*types.Service, error)
- func (c *Controller) CreateNoAuth(ctx context.Context, in *CreateInput, admin bool) (*types.Service, error)
- func (c *Controller) Delete(ctx context.Context, session *auth.Session, serviceUID string) error
- func (c *Controller) Find(ctx context.Context, session *auth.Session, serviceUID string) (*types.Service, error)
- func (c *Controller) FindNoAuth(ctx context.Context, serviceUID string) (*types.Service, error)
- func (c *Controller) List(ctx context.Context, session *auth.Session) (int64, []*types.Service, error)
- func (c *Controller) Update(ctx context.Context, session *auth.Session, serviceUID string, in *UpdateInput) (*types.Service, error)
- func (c *Controller) UpdateAdmin(ctx context.Context, session *auth.Session, serviceUID string, admin bool) (*types.Service, error)
- type CreateInput
- type UpdateInput
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) *Controller
func ProvideController ¶
func ProvideController(principalUIDCheck check.PrincipalUID, authorizer authz.Authorizer, principalStore store.PrincipalStore) *Controller
func (*Controller) Create ¶
func (c *Controller) Create(ctx context.Context, session *auth.Session, in *CreateInput) (*types.Service, error)
Create creates a new service.
func (*Controller) CreateNoAuth ¶
func (c *Controller) CreateNoAuth(ctx context.Context, in *CreateInput, admin bool) (*types.Service, error)
* CreateNoAuth creates a new service without auth checks. * WARNING: Never call as part of user flow. * * Note: take admin separately to avoid potential vulnerabilities for user calls.
func (*Controller) Find ¶
func (c *Controller) Find(ctx context.Context, session *auth.Session, serviceUID string) (*types.Service, error)
Find tries to find the provided service.
func (*Controller) FindNoAuth ¶
* FindNoAuth finds a service without auth checks. * WARNING: Never call as part of user flow.
func (*Controller) List ¶
func (c *Controller) List(ctx context.Context, session *auth.Session) (int64, []*types.Service, error)
List lists all services of the system.
type CreateInput ¶
type CreateInput struct { UID string `json:"uid"` Email string `json:"email"` DisplayName string `json:"display_name"` }
CreateInput is the input used for create operations.
type UpdateInput ¶
UpdateInput store infos to update an existing service.
Click to show internal directories.
Click to hide internal directories.