Documentation
¶
Index ¶
- Variables
- type Controller
- func (c *Controller) CountTotal(ctx context.Context) (int64, error)
- func (c *Controller) CreateNoAuth(ctx context.Context, in *CreateInput) (*types.User, error)
- func (c *Controller) Find(ctx context.Context, session *auth.Session, userUID string) (*types.User, error)
- func (c *Controller) FindNoAuth(ctx context.Context, userUID string) (*types.User, error)
- func (c *Controller) FindUserByEmail(ctx context.Context, email string) (*types.User, error)
- func (c *Controller) GetDemoUser(ctx context.Context) (*types.DemoUser, error)
- func (c *Controller) Init(ctx context.Context) error
- func (c *Controller) Update(ctx context.Context, userID int64, in *UpdateInput) (*types.User, error)
- type CreateAdminUserIntegration
- type CreateInput
- type UpdateInput
Constants ¶
This section is empty.
Variables ¶
var WireSet = wire.NewSet( ProvideController, )
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( tx dbtx.Transactor, userStore store.PrincipalStore, ) *Controller
func ProvideController ¶
func ProvideController( tx dbtx.Transactor, userStore store.PrincipalStore, ) *Controller
func (*Controller) CountTotal ¶
func (c *Controller) CountTotal(ctx context.Context) (int64, error)
func (*Controller) CreateNoAuth ¶
func (c *Controller) CreateNoAuth(ctx context.Context, in *CreateInput) (*types.User, error)
* CreateNoAuth creates a new user 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, userUID string) (*types.User, error)
* Find tries to find the provided user.
func (*Controller) FindNoAuth ¶
* FindNoAuth finds a user without auth checks. * WARNING: Never call as part of user flow.
func (*Controller) FindUserByEmail ¶
func (*Controller) GetDemoUser ¶
func (*Controller) Update ¶
func (c *Controller) Update(ctx context.Context, userID int64, in *UpdateInput) (*types.User, error)
Update updates the provided user.
type CreateAdminUserIntegration ¶
CreateAdminUserIntegration struct is the input to create and integration along with user creation for SCM, should be populated only for admin
type CreateInput ¶
type CreateInput struct {
Email string `json:"email"`
DisplayName string `json:"display_name"`
Password string `json:"-"`
AvatarUrl string `json:"avatar_url"`
}
CreateInput is the input used for create operations. On purpose don't expose admin, has to be enabled explicitly.
type UpdateInput ¶
type UpdateInput struct {
DisplayName string `json:"name"`
}
UpdateInput store infos to update an existing user.