Documentation ¶
Index ¶
- type Add
- type Find
- type List
- type SetBlocked
- type SetEmail
- type SetPassword
- type SetPhone
- type SetterHandler
- type UserBuilder
- type UserClient
- func (u *UserClient[U]) Add(ctx op_context.Context, login string, password string, ...) (U, error)
- func (u *UserClient[U]) Find(ctx op_context.Context, id string) (U, error)
- func (u *UserClient[U]) FindAuthUser(ctx op_context.Context, login string) (auth.User, error)
- func (u *UserClient[U]) FindByLogin(ctx op_context.Context, login string) (U, error)
- func (u *UserClient[U]) FindUsers(ctx op_context.Context, filter *db.Filter) ([]U, int64, error)
- func (u *UserClient[U]) GetUserId(ctx op_context.Context, id string, idIsLogin ...bool) (string, error)
- func (c *UserClient[U]) MakeUser() U
- func (c *UserClient[U]) OpLog(ctx op_context.Context, op string, userId string, login string)
- func (u *UserClient[U]) SetBlocked(ctx op_context.Context, id string, blocked bool, idIsLogin ...bool) error
- func (u *UserClient[U]) SetEmail(ctx op_context.Context, id string, email string, idIsLogin ...bool) error
- func (c *UserClient[U]) SetOplogBuilder(userBuilder func() user.OpLogUserI)
- func (u *UserClient[U]) SetPassword(ctx op_context.Context, id string, password string, idIsLogin ...bool) error
- func (u *UserClient[U]) SetPhone(ctx op_context.Context, id string, phone string, idIsLogin ...bool) error
- func (c *UserClient[U]) SetTenancy(tenancyResource api.Resource)
- func (c *UserClient[U]) SetUserBuilder(userBuilder func() U)
- func (u *UserClient[U]) UserOperation(userId string, resourceName string, op api.Operation) api.Operation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Add ¶
func (*Add[U]) Exec ¶
func (a *Add[U]) Exec(client api_client.Client, ctx op_context.Context, operation api.Operation) error
type Find ¶
func (*Find[U]) Exec ¶
func (a *Find[U]) Exec(client api_client.Client, ctx op_context.Context, operation api.Operation) error
type List ¶
func (*List[U]) Exec ¶
func (a *List[U]) Exec(client api_client.Client, ctx op_context.Context, operation api.Operation) error
type SetBlocked ¶
type SetBlocked = SetterHandler[user.UserBlocked]
type SetEmail ¶
type SetEmail = SetterHandler[user.UserEmail]
type SetPassword ¶
type SetPassword = SetterHandler[user.UserPlainPassword]
type SetPhone ¶
type SetPhone = SetterHandler[user.UserPhone]
type SetterHandler ¶
type SetterHandler[T interface{}] struct {
Cmd T
}
func (*SetterHandler[T]) Exec ¶
func (s *SetterHandler[T]) Exec(client api_client.Client, ctx op_context.Context, operation api.Operation) error
type UserBuilder ¶
type UserClient ¶
type UserClient[U user.User] struct { api_client.ServiceClient CollectionResource api.Resource UserResource api.Resource // contains filtered or unexported fields }
func NewUserClient ¶
func NewUserClient[U user.User](client api_client.Client, userBuilder UserBuilder[U], userTypeName ...string) *UserClient[U]
func (*UserClient[U]) Add ¶
func (u *UserClient[U]) Add(ctx op_context.Context, login string, password string, extraFieldsSetters ...user.SetUserFields[U]) (U, error)
func (*UserClient[U]) Find ¶
func (u *UserClient[U]) Find(ctx op_context.Context, id string) (U, error)
func (*UserClient[U]) FindAuthUser ¶
func (u *UserClient[U]) FindAuthUser(ctx op_context.Context, login string) (auth.User, error)
func (*UserClient[U]) FindByLogin ¶
func (u *UserClient[U]) FindByLogin(ctx op_context.Context, login string) (U, error)
func (*UserClient[U]) FindUsers ¶
func (u *UserClient[U]) FindUsers(ctx op_context.Context, filter *db.Filter) ([]U, int64, error)
func (*UserClient[U]) GetUserId ¶
func (u *UserClient[U]) GetUserId(ctx op_context.Context, id string, idIsLogin ...bool) (string, error)
func (*UserClient[U]) MakeUser ¶
func (c *UserClient[U]) MakeUser() U
func (*UserClient[U]) OpLog ¶
func (c *UserClient[U]) OpLog(ctx op_context.Context, op string, userId string, login string)
func (*UserClient[U]) SetBlocked ¶
func (u *UserClient[U]) SetBlocked(ctx op_context.Context, id string, blocked bool, idIsLogin ...bool) error
func (*UserClient[U]) SetEmail ¶
func (u *UserClient[U]) SetEmail(ctx op_context.Context, id string, email string, idIsLogin ...bool) error
func (*UserClient[U]) SetOplogBuilder ¶
func (c *UserClient[U]) SetOplogBuilder(userBuilder func() user.OpLogUserI)
func (*UserClient[U]) SetPassword ¶
func (u *UserClient[U]) SetPassword(ctx op_context.Context, id string, password string, idIsLogin ...bool) error
func (*UserClient[U]) SetPhone ¶
func (u *UserClient[U]) SetPhone(ctx op_context.Context, id string, phone string, idIsLogin ...bool) error
func (*UserClient[U]) SetTenancy ¶
func (c *UserClient[U]) SetTenancy(tenancyResource api.Resource)
func (*UserClient[U]) SetUserBuilder ¶
func (c *UserClient[U]) SetUserBuilder(userBuilder func() U)
func (*UserClient[U]) UserOperation ¶
Click to show internal directories.
Click to hide internal directories.