model

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type City

type City struct {
	CityID int    `json:"id" db:"CityID"`
	City   string `json:"City" db:"City"`
	Hash   string `json:"Hash" db:"Hash"` // xxhash64 (normalized) of 'City'
}

City data

type Model

type Model struct {
	DB *sqlx.DB
}

Model passes database connection pool

func NewModel

func NewModel(db *sqlx.DB) *Model

NewModel creates an echo handler with access to the database connection pool

func (*Model) SelectCities

func (m *Model) SelectCities() []City

SelectCities database query

type Nut

type Nut struct {
	Nut        string `json:"Nut"`
	Pagnut     string `json:"Pagnut"`
	Expiration int    `json:"Expiration"`
}

Nut data

Jump to

Keyboard shortcuts

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