db

package
v0.0.0-...-d9ca063 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2019 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CarByEmail

func CarByEmail(email string) (car model.Car, err error)

func CarByID

func CarByID(id string) (car model.Car, err error)

func CarCount

func CarCount() int

func Cars

func Cars(all bool) (cars []model.Car, err error)

func CielToDto

func CielToDto(ciel model.Ciel) model.CielDto

func CreateToken

func CreateToken(userid string) string

func DtoCiele

func DtoCiele(person model.Person) (tasks []model.CielDto)

func DtoVisits

func DtoVisits(person model.Person) (visits []model.VisitDto)

func GetCode6

func GetCode6(key string) (value model.Code6)

func GetDiagnozy

func GetDiagnozy(filter string, max int) []model.Diagnoza

func GetDiagnozyAll

func GetDiagnozyAll() []model.TextValueDto

func GetLieky

func GetLieky(filterBy string, max int) (lieky []model.Liek)

func ImportCache

func ImportCache(dir string)

func InitDB

func InitDB()

func Login

func Login(email string, password string) (user model.User, token string, err error)

func PasswordCheck

func PasswordCheck(user model.User, password string) bool

func PersonByID

func PersonByID(id string) (person model.Person, err error)

func Persons

func Persons() (persons []model.Person, err error)

func PersonsCount

func PersonsCount() int

func PersonsFiltered

func PersonsFiltered(filter model.PersonFilter) (persons []model.Person, err error)

func RelationByID

func RelationByID(id string) (relation model.PersonRelation, err error)

func RelationDelete

func RelationDelete(id string, authorID string) error

func Relatives

func Relatives(person model.Person) ([]model.PersonRelation, []model.PersonRelation, error)

func SaveCar

func SaveCar(car *model.Car, authorID string) error

func SaveCiel

func SaveCiel(ciel *model.Ciel, authorID string) error

func SavePerson

func SavePerson(person *model.Person, authorID string) error

func SaveRelation

func SaveRelation(person, relative model.Person, relationship enum.Relationship, authorID string) error

func SaveSession

func SaveSession(session *model.Session, authorID string) error

func SaveUser

func SaveUser(user *model.User, authorID string) error

func SaveVisitCall

func SaveVisitCall(visit *model.VisitCall, authorID string) (err error)

func SaveVisitHome

func SaveVisitHome(visit *model.VisitHome, authorID string) (err error)

func Sessions

func Sessions() (sessions []model.Session, err error)

func SetCode6

func SetCode6(key string, value model.Code6)

func SetNewPassword

func SetNewPassword(user model.User, password string)

func UserByEmail

func UserByEmail(email string) (user model.User, err error)

func UserByID

func UserByID(id string) (user model.User, err error)

func UserCount

func UserCount() int

func Users

func Users(all bool) (users []model.User, err error)

func ValidToken

func ValidToken(tokenKey string) (user model.User, err error)

func VisitCallByID

func VisitCallByID(id string) (visit model.VisitCall, err error)

func VisitCalls

func VisitCalls() (visits []model.VisitCall, err error)

func VisitCount

func VisitCount() int

func VisitHomeByID

func VisitHomeByID(id string) (visit model.VisitHome, err error)

func VisitHomes

func VisitHomes() (visits []model.VisitHome, err error)

Types

type DiagnozyCache

type DiagnozyCache struct {
	Data []model.Diagnoza
}
var Diagnozy DiagnozyCache

type LiekyCache

type LiekyCache struct {
	Data []model.Liek
}
var Lieky LiekyCache

Jump to

Keyboard shortcuts

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