sql

package
v0.0.0-...-b36dac7 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2019 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RecordsPerPage = 50
View Source
var SessionLength = 3600

Functions

func CheckSession

func CheckSession(userID int) error

func Create

func Create(s CRUD) (interface{}, error)

func Delete

func Delete(s CRUD) error

func List

func List(l Lister) (interface{}, error)

func Page

func Page(p Pager) (interface{}, error)

func Read

func Read(r Reader) (interface{}, error)

func SaltAndHash

func SaltAndHash(pwd string) []byte

func Update

func Update(s CRUD) (interface{}, error)

func VerifyPassword

func VerifyPassword(username, password string) (interface{}, error)

Types

type BillSheet

type BillSheet struct {
	Data interface{}
	Stmt map[string]string
}

func NewBillSheet

func NewBillSheet(payload interface{}) *BillSheet

func (*BillSheet) CollectRows

func (s *BillSheet) CollectRows(rows *mysql.Rows, coll []*app.BillSheetItem) error

func (*BillSheet) Create

func (s *BillSheet) Create(db *mysql.DB) (interface{}, error)

func (*BillSheet) Delete

func (s *BillSheet) Delete(db *mysql.DB) error

func (*BillSheet) GetAuthLevel

func (s *BillSheet) GetAuthLevel(db *mysql.DB, specialist int) (int, error)

func (*BillSheet) GetUnitRate

func (s *BillSheet) GetUnitRate(db *mysql.DB, serviceCode int) (float64, error)

func (*BillSheet) IsDuplicateEntry

func (s *BillSheet) IsDuplicateEntry(db *mysql.DB, payload *app.BillSheetPayload, formattedDate string) (bool, error)

func (*BillSheet) IsLegalDate

func (s *BillSheet) IsLegalDate(db *mysql.DB, payload *app.BillSheetPayload) (bool, string, error)

func (*BillSheet) List

func (s *BillSheet) List(db *mysql.DB) (interface{}, error)

func (*BillSheet) Page

func (s *BillSheet) Page(db *mysql.DB) (interface{}, error)

func (*BillSheet) Update

func (s *BillSheet) Update(db *mysql.DB) (interface{}, error)

func (*BillSheet) UpdateUnitBlock

func (s *BillSheet) UpdateUnitBlock(db *mysql.DB, payload *app.BillSheetPayload, currentRecordUnits float64) error

type CRUD

type CRUD interface {
	Create(db *mysql.DB) (interface{}, error)
	Update(db *mysql.DB) (interface{}, error)
	Delete(db *mysql.DB) error
}

type Consumer

type Consumer struct {
	Data interface{}
	Stmt map[string]string
}

func NewConsumer

func NewConsumer(payload interface{}) *Consumer

func (*Consumer) CollectRows

func (s *Consumer) CollectRows(db *mysql.DB, rows *mysql.Rows, coll []*app.ConsumerItem) error

func (*Consumer) Create

func (s *Consumer) Create(db *mysql.DB) (interface{}, error)

func (*Consumer) Delete

func (s *Consumer) Delete(db *mysql.DB) error

func (*Consumer) GetServiceCodes

func (s *Consumer) GetServiceCodes(db *mysql.DB, id int) ([]*app.UnitBlockItem, error)

func (*Consumer) List

func (s *Consumer) List(db *mysql.DB) (interface{}, error)

func (*Consumer) Page

func (s *Consumer) Page(db *mysql.DB) (interface{}, error)

func (*Consumer) SetServiceCodes

func (s *Consumer) SetServiceCodes(db *mysql.DB, consumer int, serviceCodes []*app.UnitBlockItem) ([]*app.UnitBlockItem, error)

func (*Consumer) Update

func (s *Consumer) Update(db *mysql.DB) (interface{}, error)

type County

type County struct {
	Data interface{}
	Stmt map[string]string
}

func NewCounty

func NewCounty(payload interface{}) *County

func (*County) Create

func (c *County) Create(db *mysql.DB) (interface{}, error)

func (*County) Delete

func (c *County) Delete(db *mysql.DB) error

func (*County) List

func (c *County) List(db *mysql.DB) (interface{}, error)

func (*County) Page

func (c *County) Page(db *mysql.DB) (interface{}, error)

func (*County) Read

func (c *County) Read(db *mysql.DB) (interface{}, error)

func (*County) Update

func (c *County) Update(db *mysql.DB) (interface{}, error)

type DIA

type DIA struct {
	Data interface{}
	Stmt map[string]string
}

func NewDIA

func NewDIA(payload interface{}) *DIA

func (*DIA) Create

func (s *DIA) Create(db *mysql.DB) (interface{}, error)

func (*DIA) Delete

func (s *DIA) Delete(db *mysql.DB) error

func (*DIA) List

func (s *DIA) List(db *mysql.DB) (interface{}, error)

func (*DIA) Page

func (s *DIA) Page(db *mysql.DB) (interface{}, error)

func (*DIA) Update

func (s *DIA) Update(db *mysql.DB) (interface{}, error)

type FundingSource

type FundingSource struct {
	Data interface{}
	Stmt map[string]string
}

func NewFundingSource

func NewFundingSource(payload interface{}) *FundingSource

func (*FundingSource) Create

func (s *FundingSource) Create(db *mysql.DB) (interface{}, error)

func (*FundingSource) Delete

func (s *FundingSource) Delete(db *mysql.DB) error

func (*FundingSource) List

func (s *FundingSource) List(db *mysql.DB) (interface{}, error)

func (*FundingSource) Page

func (s *FundingSource) Page(db *mysql.DB) (interface{}, error)

func (*FundingSource) Update

func (s *FundingSource) Update(db *mysql.DB) (interface{}, error)

type Hasher

type Hasher interface {
	SaltAndHash(pwd []byte) string
}

type Lister

type Lister interface {
	List(db *mysql.DB) (interface{}, error)
}

type PageQuery

type PageQuery struct {
	Page        int
	WhereClause string
}

type Pager

type Pager interface {
	Page(db *mysql.DB) (interface{}, error)
}

type PayHistory

type PayHistory struct {
	Data interface{}
	Stmt map[string]string
}

func NewPayHistory

func NewPayHistory(payload interface{}) *PayHistory

func (*PayHistory) List

func (s *PayHistory) List(db *mysql.DB) (interface{}, error)

type Reader

type Reader interface {
	Read(db *mysql.DB) (interface{}, error)
}

type ServiceCode

type ServiceCode struct {
	Data interface{}
	Stmt map[string]string
}

func NewServiceCode

func NewServiceCode(payload interface{}) *ServiceCode

func (*ServiceCode) Create

func (s *ServiceCode) Create(db *mysql.DB) (interface{}, error)

func (*ServiceCode) Delete

func (s *ServiceCode) Delete(db *mysql.DB) error

func (*ServiceCode) List

func (s *ServiceCode) List(db *mysql.DB) (interface{}, error)

func (*ServiceCode) Update

func (s *ServiceCode) Update(db *mysql.DB) (interface{}, error)

type Specialist

type Specialist struct {
	Data interface{}
	Stmt map[string]string
}

func NewSpecialist

func NewSpecialist(payload interface{}) *Specialist

func (*Specialist) AddPayHistoryEntry

func (s *Specialist) AddPayHistoryEntry(db *mysql.DB, id int64, payrate float64) error

Add an entry to the pay_history table with the initial payrate.

func (*Specialist) CollectRows

func (s *Specialist) CollectRows(rows *mysql.Rows, coll []*app.SpecialistItem) error

func (*Specialist) Create

func (s *Specialist) Create(db *mysql.DB) (interface{}, error)

func (*Specialist) Delete

func (s *Specialist) Delete(db *mysql.DB) error

func (*Specialist) List

func (s *Specialist) List(db *mysql.DB) (interface{}, error)

func (*Specialist) Page

func (s *Specialist) Page(db *mysql.DB) (interface{}, error)

func (*Specialist) Read

func (s *Specialist) Read(db *mysql.DB) (interface{}, error)

func (*Specialist) Update

func (s *Specialist) Update(db *mysql.DB) (interface{}, error)

type Status

type Status struct {
	Data interface{}
	Stmt map[string]string
}

func NewStatus

func NewStatus(payload interface{}) *Status

func (*Status) Create

func (s *Status) Create(db *mysql.DB) (interface{}, error)

func (*Status) Delete

func (s *Status) Delete(db *mysql.DB) error

func (*Status) List

func (s *Status) List(db *mysql.DB) (interface{}, error)

func (*Status) Update

func (s *Status) Update(db *mysql.DB) (interface{}, error)

type Verifier

type Verifier interface {
	Verify(clearText string) (bool, error)
}

Jump to

Keyboard shortcuts

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