example

package
Version: v0.0.0-...-63151c3 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB *gorm.DB

Functions

func Migrate

func Migrate(db *gorm.DB)

Migrate the job models

func Register

func Register(group string, router *echo.Echo) error

Register the main input to for a example route

func RegisterValidator

func RegisterValidator(e *echo.Echo)

RegisterValidator for the example

func Registration

func Registration(c echo.Context) (err error)

Registration example registration for the default route

func Update

func Update(c echo.Context) (err error)

Update for adding a job

Types

type CustomValidator

type CustomValidator struct {
	// contains filtered or unexported fields
}

CustomValidator for the example

func (*CustomValidator) Validate

func (cv *CustomValidator) Validate(i interface{}) error

Validate the example route

type ExampleModel

type ExampleModel struct {
	gorm.Model
	ExampleID int64
	Pin       int64
	Customer  string
	Quantity  int64
	// DueDate  *time.time
	Notes string
}

ExampleModel for the example

type ExampleModelValidator

type ExampleModelValidator struct {
	gorm.Model
	ExampleID int64  `validate:"required"`
	Pin       int64  `validate:"required"`
	Customer  string `validate:"required"`
	Quantity  int64  `validate:"required"`
	Notes     string
}

ExampleModelValidator for example

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL