approvalmodel

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) PRIMARY KEY" query:"userid,getoneeq,userid;deleq,userid"`
	Username     string `model:"username,VARCHAR(255) NOT NULL" query:"username"`
	PassHash     string `model:"pass_hash,VARCHAR(255) NOT NULL" query:"pass_hash"`
	Email        string `model:"email,VARCHAR(255) NOT NULL" query:"email"`
	FirstName    string `model:"first_name,VARCHAR(255) NOT NULL" query:"first_name"`
	LastName     string `model:"last_name,VARCHAR(255) NOT NULL" query:"last_name"`
	CreationTime int64  `model:"creation_time,BIGINT NOT NULL" query:"creation_time,getgroup"`
}

type Repo

type Repo interface {
	New(m *usermodel.Model) *Model
	ToUserModel(m *Model) *usermodel.Model
	GetByID(userid string) (*Model, error)
	GetGroup(limit, offset int) ([]Model, error)
	Insert(m *Model) error
	Delete(m *Model) 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