user

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entity

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

func (*Entity) CreateUser

func (e *Entity) CreateUser(ctx context.Context, id int64, name string) error

func (*Entity) GetUserById

func (e *Entity) GetUserById(ctx context.Context, id int64) (model.User, error)

func (*Entity) GetUsersList

func (e *Entity) GetUsersList(ctx context.Context, ids []int64) ([]model.User, error)

func (*Entity) ModifyUser

func (e *Entity) ModifyUser(ctx context.Context, userId int64, name *string, avatar *int64) error

func (*Entity) SetUploadLimit

func (e *Entity) SetUploadLimit(ctx context.Context, id int64, uploadLimit int64) error

func (*Entity) SetUserAvatar

func (e *Entity) SetUserAvatar(ctx context.Context, id, attachmentId int64) error

func (*Entity) SetUserBlocked

func (e *Entity) SetUserBlocked(ctx context.Context, id int64, blocked bool) error

func (*Entity) SetUsername

func (e *Entity) SetUsername(ctx context.Context, id, name string) error

type User

type User interface {
	ModifyUser(ctx context.Context, userId int64, name *string, avatar *int64) error
	GetUserById(ctx context.Context, id int64) (model.User, error)
	GetUsersList(ctx context.Context, ids []int64) ([]model.User, error)
	CreateUser(ctx context.Context, id int64, name string) error
	SetUserAvatar(ctx context.Context, id, attachmentId int64) error
	SetUsername(ctx context.Context, id, name string) error
	SetUserBlocked(ctx context.Context, id int64, blocked bool) error
	SetUploadLimit(ctx context.Context, id int64, uploadLimit int64) error
}

func New

func New(c *sqlx.DB) User

Jump to

Keyboard shortcuts

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