models

package
v0.0.0-...-efa5e72 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB *gorm.DB

Functions

func INIT

func INIT(config Config)

func ProductCreate

func ProductCreate(product *Product) error

Types

type Config

type Config struct {
	User   string
	Pass   string
	Host   string
	Port   int
	DBName string
}

type Product

type Product struct {
	gorm.Model
	Code  string
	Price uint
}

func ProductByID

func ProductByID(id int) (Product, error)

func ProductsList

func ProductsList() ([]Product, error)

Jump to

Keyboard shortcuts

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