models

package
v4.13.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Widget

type Widget struct {
	ID          uuid.UUID    `xml:"id" db:"id"`
	CreatedAt   time.Time    `xml:"created_at" db:"created_at"`
	UpdatedAt   time.Time    `xml:"updated_at" db:"updated_at"`
	Name        string       `xml:"name" db:"name"`
	Description string       `xml:"description" db:"description"`
	Age         int          `xml:"age" db:"age"`
	Bar         nulls.String `xml:"bar" db:"bar"`
}

Widget is used by pop to map your widgets database table to your go code.

func (Widget) String

func (w Widget) String() string

String is not required by pop and may be deleted

func (*Widget) Validate

func (w *Widget) Validate(tx *pop.Connection) (*validate.Errors, error)

Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method. This method is not required and may be deleted.

func (*Widget) ValidateCreate

func (w *Widget) ValidateCreate(tx *pop.Connection) (*validate.Errors, error)

ValidateCreate gets run every time you call "pop.ValidateAndCreate" method. This method is not required and may be deleted.

func (*Widget) ValidateUpdate

func (w *Widget) ValidateUpdate(tx *pop.Connection) (*validate.Errors, error)

ValidateUpdate gets run every time you call "pop.ValidateAndUpdate" method. This method is not required and may be deleted.

type Widgets

type Widgets []Widget

Widgets is not required by pop and may be deleted

func (Widgets) String

func (w Widgets) String() string

String is not required by pop and may be deleted

Jump to

Keyboard shortcuts

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