swag: github.com/swaggo/swag/example/celler/model Index | Files

package model

import "github.com/swaggo/swag/example/celler/model"

Index

Package Files

account.go admin.go bottle.go error.go

Variables

var (
    ErrNameInvalid = errors.New("name is empty")
)

example

var (
    // ErrNoRow example
    ErrNoRow = errors.New("no rows in result set")
)

func Delete Uses

func Delete(id int) error

Delete example

type Account Uses

type Account struct {
    ID   int       `json:"id" example:"1" format:"int64"`
    Name string    `json:"name" example:"account name"`
    UUID uuid.UUID `json:"uuid" example:"550e8400-e29b-41d4-a716-446655440000" format:"uuid"`
}

Account example

func AccountOne Uses

func AccountOne(id int) (Account, error)

AccountOne example

func AccountsAll Uses

func AccountsAll(q string) ([]Account, error)

AccountsAll example

func (Account) Insert Uses

func (a Account) Insert() (int, error)

Insert example

func (Account) Update Uses

func (a Account) Update() error

Update example

type AddAccount Uses

type AddAccount struct {
    Name string `json:"name" example:"account name"`
}

AddAccount example

func (AddAccount) Validation Uses

func (a AddAccount) Validation() error

Validation example

type Admin Uses

type Admin struct {
    ID   int    `json:"id" example:"1"`
    Name string `json:"name" example:"admin name"`
}

Admin example

type Bottle Uses

type Bottle struct {
    ID      int     `json:"id" example:"1"`
    Name    string  `json:"name" example:"bottle_name"`
    Account Account `json:"account"`
}

Bottle example

func BottleOne Uses

func BottleOne(id int) (*Bottle, error)

BottleOne example

func BottlesAll Uses

func BottlesAll() ([]Bottle, error)

BottlesAll example

type UpdateAccount Uses

type UpdateAccount struct {
    Name string `json:"name" example:"account name"`
}

UpdateAccount example

func (UpdateAccount) Validation Uses

func (a UpdateAccount) Validation() error

Validation example

Package model imports 3 packages (graph) and is imported by 1 packages. Updated 2019-04-23. Refresh now. Tools for package owners.