user

package
v1.0.49 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2026 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

type Repository interface {
	Create(ctx context.Context, user *User) error
	GetByID(ctx context.Context, id string) (*User, error)
	GetByEmail(ctx context.Context, email string) (*User, error)
	ListByFilter(ctx context.Context, filter *types.UserFilter) ([]*User, int64, error)
}

type User

type User struct {
	ID    string         `json:"id"`
	Email string         `json:"email"` // Empty for service accounts
	Type  types.UserType `json:"type"`
	Roles []string       `json:"roles"`
	types.BaseModel
}

func FromEnt

func FromEnt(e *ent.User) *User

FromEnt converts an ent User to a domain User

func FromEntList

func FromEntList(users []*ent.User) []*User

FromEntList converts a list of ent Users to domain Users

func NewUser

func NewUser(email, tenantID string) *User

func (*User) Validate added in v1.0.36

func (u *User) Validate() error

Validate validates the user

Jump to

Keyboard shortcuts

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