repository

package
v0.0.27 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type RqliteUserRepository added in v0.0.25

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

func (*RqliteUserRepository) ChangeRoleAttr added in v0.0.25

func (r *RqliteUserRepository) ChangeRoleAttr(userID int64, attr string, val int64) error

func (*RqliteUserRepository) ChangeRoleExp added in v0.0.25

func (r *RqliteUserRepository) ChangeRoleExp(userID int64, exp int64) error

func (*RqliteUserRepository) Create added in v0.0.25

func (r *RqliteUserRepository) Create(user pb.User) (int64, error)

func (*RqliteUserRepository) GetByID added in v0.0.25

func (r *RqliteUserRepository) GetByID(id int64) (pb.User, error)

func (*RqliteUserRepository) GetByName added in v0.0.25

func (r *RqliteUserRepository) GetByName(name string) (pb.User, error)

func (*RqliteUserRepository) GetRole added in v0.0.25

func (r *RqliteUserRepository) GetRole(userId int64) (pb.Role, error)

func (*RqliteUserRepository) List added in v0.0.25

func (r *RqliteUserRepository) List() ([]pb.User, error)

func (*RqliteUserRepository) Update added in v0.0.25

func (r *RqliteUserRepository) Update(user pb.User) error

type UserRepository

type UserRepository interface {
	GetRole(userID int64) (pb.Role, error)
	ChangeRoleExp(userID int64, exp int64) error
	ChangeRoleAttr(userID int64, attr string, val int64) error
	List() ([]pb.User, error)
	Create(user pb.User) (int64, error)
	GetByID(id int64) (pb.User, error)
	GetByName(name string) (pb.User, error)
	Update(user pb.User) error
}

func CreateUserRepository

func CreateUserRepository(id string) (UserRepository, error)

func NewRqliteUserRepository added in v0.0.25

func NewRqliteUserRepository(logger log.Logger, db *rqlite.Conn) UserRepository

Jump to

Keyboard shortcuts

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