user

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2026 License: Apache-2.0 Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UserAPI

type UserAPI struct {
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, logger *zap.Logger, storage storageTY.Plugin) *UserAPI

func (*UserAPI) Create added in v2.2.0

func (u *UserAPI) Create(user *userTY.User, plainPassword string) error

Create creates a new user with plain password and optional policies.

func (*UserAPI) Delete

func (u *UserAPI) Delete(IDs []string) (int64, error)

Delete items

func (*UserAPI) Get

func (u *UserAPI) Get(filters []storageTY.Filter) (userTY.User, error)

Get returns a item

func (*UserAPI) GetByEmail

func (u *UserAPI) GetByEmail(email string) (userTY.User, error)

GetByEmail returns a item

func (*UserAPI) GetByID

func (u *UserAPI) GetByID(ID string) (userTY.User, error)

GetByID returns a item

func (*UserAPI) GetByUsername

func (u *UserAPI) GetByUsername(username string) (userTY.User, error)

GetByUsername returns a item

func (*UserAPI) GetEntityInterface

func (u *UserAPI) GetEntityInterface() interface{}

func (*UserAPI) Import

func (u *UserAPI) Import(data interface{}) error

func (*UserAPI) List

func (u *UserAPI) List(filters []storageTY.Filter, pagination *storageTY.Pagination) (*storageTY.Result, error)

List by filter and pagination

func (*UserAPI) Save

func (u *UserAPI) Save(user *userTY.User) error

Save config into disk

func (*UserAPI) SaveAdmin added in v2.2.0

func (u *UserAPI) SaveAdmin(update *userTY.UserAdminUpdate) error

SaveAdmin updates user including disabled flag and policies (admin path).

func (*UserAPI) UpdateProfile

func (u *UserAPI) UpdateProfile(userData *userTY.UserProfileUpdate) error

UpdateProfile updates the user profile

Jump to

Keyboard shortcuts

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