rolemodel

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2020 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

type Model struct {
	Userid string `model:"userid,VARCHAR(31);index" query:"userid,getgroupeq,role;deleq,userid"`
	Role   string `` /* 178-byte string literal not displayed */
}

Model is the db User role model

type Repo

type Repo interface {
	New(userid, role string) *Model
	GetByID(userid, role string) (*Model, error)
	IntersectRoles(userid string, roles rank.Rank) (rank.Rank, error)
	GetByRole(role string, limit, offset int) ([]string, error)
	GetRoles(userid string, limit, offset int) (rank.Rank, error)
	InsertRoles(userid string, roles rank.Rank) error
	DeleteRoles(userid string, roles rank.Rank) error
	DeleteUserRoles(userid string) error
	Setup() error
}

func New

func New(database db.Database) Repo

Jump to

Keyboard shortcuts

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