user

package
v0.0.1-alpha.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 4, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

func (c *Controller) FindNoAuth(ctx context.Context, userUID string) (*types.User, error)

* FindNoAuth finds a user without auth checks. * WARNING: Never call as part of user flow.

func (*Controller) FindUserByEmail

func (c *Controller) FindUserByEmail(ctx context.Context, email string) (*types.User, error)

func (*Controller) GetDemoUser

func (c *Controller) GetDemoUser(ctx context.Context) (*types.DemoUser, error)

func (*Controller) Init

func (c *Controller) Init(ctx context.Context) error

func (*Controller) Update

func (c *Controller) Update(ctx context.Context, userID int64, in *UpdateInput) (*types.User, error)

Update updates the provided user.

type CreateAdminUserIntegration

type CreateAdminUserIntegration struct {
	Token   string
	Expires int64
	Refresh string
}

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL