rest

package
v0.0.0-...-e78e600 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2020 License: GPL-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindMaxReferenceCount

func FindMaxReferenceCount() int

Finds the highest referenceCount value from the orders table

func Generate

func Generate() error

func InsertNewAddress

func InsertNewAddress(address database.Address) error

Inserts new address to the database

func InsertNewOrder

func InsertNewOrder(order *database.Order) error

Inserts new order to the database

func QueryCategoriesFlat

func QueryCategoriesFlat() interface{}

Queries all categories without a tree structure.

func QueryCategoriesWithChildrenAndScores

func QueryCategoriesWithChildrenAndScores() interface{}

func QueryCategoriesWithChildrenAndScoresPreserve

func QueryCategoriesWithChildrenAndScoresPreserve() []database.Category

func QueryOrders

func QueryOrders(payed bool) []database.Order

func QueryScoresFlat

func QueryScoresFlat() interface{}

Queries all scores without a tree structure.

func SaveAddress

func SaveAddress(address database.Address) error

Inserts or updates a address to the database

func SaveCategory

func SaveCategory(category database.Category) error

Inserts or updates a category to the database

func SaveOrder

func SaveOrder(order database.Order) error

Inserts or updates a order to the database

func SaveScore

func SaveScore(score database.Score) error

Inserts or updates a score to the database

func Serve

Serve function for this package.

Types

type Attachment

type Attachment struct {
	Filename string
	Data     string
}

type DataQuery

type DataQuery func() interface{}

type MailData

type MailData struct {
	Order      *database.Order
	Date       string
	To         string
	From       string
	Attachment Attachment
	Boundary   string
}

type PostedOrder

type PostedOrder struct {
	Dcity         string
	DpostCode     string
	Dstate        string
	Dstreet       string
	DstreetNumber string
	City          string
	PostCode      string
	ScoreId       uint
	State         string
	Street        string
	StreetNumber  string
	Company       string
	Email         string
	FirstName     string
	LastName      string
	Salutation    string
	Telephone     string
}

func (*PostedOrder) Order

func (p *PostedOrder) Order() *database.Order

Jump to

Keyboard shortcuts

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