store

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ADMIN USER
	ADMIN = "admin"
	// BETATESTER USER
	BETATESTER = "betatester"
	// SII USER
	SII = "sii"
	// DEFAULTLEVEL ACCOUNT
	DEFAULTLEVEL = 5
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	*xorm.Engine
	Valid func(interface{}) (bool, error)
}

Store type is the abstraction behind data interactions Database io & validation

var (
	// Agent main object used by other packages
	Agent *Store
)

func New

func New(config db.ConnStr) (*Store, error)

New return a database engine

func (*Store) AuthentificateUser

func (s *Store) AuthentificateUser(username, password string) (bool, bool, error)

AuthentificateUser auth a user

func (*Store) CreatePathologyAL

func (s *Store) CreatePathologyAL(m *model.PathologyAnalysisLevel) error

CreatePathologyAL .

func (*Store) CreateSpec

func (s *Store) CreateSpec(name string, unit string, min string, max string) error

CreateSpec .

func (*Store) CreateUser

func (s *Store) CreateUser(email, username, password string) error

CreateUser .

func (*Store) GetPathologiesAL

func (s *Store) GetPathologiesAL() (*[]model.PathologyAnalysisLevel, error)

GetPathologiesAL .

func (*Store) GetPathologyAL

func (s *Store) GetPathologyAL(name string) (*model.PathologyAnalysisLevel, error)

GetPathologyAL .

func (*Store) GetSpec

func (s *Store) GetSpec(name string) (*model.SpecAnalysisPool, error)

GetSpec .

func (*Store) GetSpecs

func (s *Store) GetSpecs(ignore []string) (*[]model.SpecAnalysisPool, error)

GetSpecs .

func (*Store) GetUser

func (s *Store) GetUser(username string) (*model.User, error)

GetUser select a single user by it username

func (*Store) Sync

func (s *Store) Sync() error

Sync store models

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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