Documentation
¶
Index ¶
- func RoleGetId(cReg *components.Registry, ctx context.Context, name string) (string, error)
- func UserDelete(cReg *components.Registry, ctx context.Context, id string) error
- type User
- func UserCreate(cReg *components.Registry, ctx context.Context, ...) (*User, error)
- func UserDetail(cReg *components.Registry, ctx context.Context, id string) (*User, error)
- func UserFindById(cReg *components.Registry, ctx context.Context, id string) (*User, error)
- func UserFindByUsername(cReg *components.Registry, ctx context.Context, username string) (*User, error)
- func UserList(cReg *components.Registry, ctx context.Context, limit, offset uint64) ([]User, error)
- func UserUpdateRoles(cReg *components.Registry, ctx context.Context, id string, roles []string) (*User, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RoleGetId ¶
Types ¶
type User ¶
type User struct { bun.BaseModel `bun:"users,alias:u"` ID uuid.UUID `bun:"id,pk,type:uuid,default:uuid_generate_v4()" json:"id" yaml:"id"` Username string `bun:"username" json:"username" yaml:"username"` Password string `bun:"password" json:"-" yaml:"-"` Email string `bun:"email" json:"email" yaml:"email"` Roles []string `bun:",array,scanonly" json:"roles" yaml:"roles"` // Timestamps CreatedAt time.Time `bun:"created_at,nullzero,notnull,default:current_timestamp" json:"created_at" yaml:"created_at"` UpdatedAt bun.NullTime `bun:"updated_at" json:"updated_at" yaml:"updated_at"` // SoftDelete DeletedAt bun.NullTime `bun:"deleted_at,soft_delete,nullzero" json:"deleted_at" yaml:"deleted_at"` }
func UserCreate ¶
func UserDetail ¶
func UserFindById ¶
func UserFindByUsername ¶
func UserList ¶
Source Files
¶
- role.go
- user.go
Click to show internal directories.
Click to hide internal directories.