adaptors

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2020 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	HashSalt string
)

Functions

This section is empty.

Types

type Adaptors

type Adaptors struct {
	Server   *Server
	Mobile   *Mobile
	Variable *Variable
}

func NewAdaptors

func NewAdaptors(db *gorm.DB,
	cfg *config.AppConfig,
	migrations *migrations.Migrations) (adaptors *Adaptors)

type Mobile

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

func GetMobileAdaptor

func GetMobileAdaptor(d *gorm.DB) *Mobile

func (*Mobile) Add

func (n *Mobile) Add(ver *m.Mobile) (idStr string, err error)

func (*Mobile) GetByAccessToken

func (n *Mobile) GetByAccessToken(accessToken string) (ver *m.Mobile, err error)

func (*Mobile) GetById

func (n *Mobile) GetById(verId string) (ver *m.Mobile, err error)

func (*Mobile) GetByToken

func (n *Mobile) GetByToken(token string) (ver *m.Mobile, err error)

func (*Mobile) List

func (n *Mobile) List(limit, offset int64) (list []*m.Mobile, total int64, err error)

func (*Mobile) Remove

func (n *Mobile) Remove(ver *m.Mobile) (err error)

func (*Mobile) Update

func (n *Mobile) Update(ver *m.Mobile) (err error)

type Server

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

func GetServerAdaptor

func GetServerAdaptor(d *gorm.DB) *Server

func (*Server) Add

func (n *Server) Add(ver *m.Server) (idStr string, err error)

func (*Server) GetByAccessToken

func (n *Server) GetByAccessToken(accessToken string) (ver *m.Server, err error)

func (*Server) GetById

func (n *Server) GetById(verId string) (ver *m.Server, err error)

func (*Server) GetByToken

func (n *Server) GetByToken(token string) (ver *m.Server, err error)

func (*Server) List

func (n *Server) List(limit, offset int64) (list []*m.Server, total int64, err error)

func (*Server) Remove

func (n *Server) Remove(ver *m.Server) (err error)

func (*Server) Update

func (n *Server) Update(ver *m.Server) (err error)

type Variable

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

func GetVariableAdaptor

func GetVariableAdaptor(d *gorm.DB) *Variable

func (*Variable) Add

func (n *Variable) Add(variables *m.Variable) (err error)

func (*Variable) Delete

func (n *Variable) Delete(name string) (err error)

func (*Variable) GetAllEnabled

func (n *Variable) GetAllEnabled() (list []*m.Variable, err error)

func (*Variable) GetByName

func (n *Variable) GetByName(name string) (variables *m.Variable, err error)

func (*Variable) GetHashSalt

func (n *Variable) GetHashSalt() (err error)

func (*Variable) List

func (n *Variable) List(limit, offset int64, orderBy, sort string) (list []*m.Variable, total int64, err error)

func (*Variable) Update

func (n *Variable) Update(variable *m.Variable) (err error)

Jump to

Keyboard shortcuts

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