model

package
v0.0.0-...-0bed73a Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

example

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

Functions

func ContainerEnd

func ContainerEnd(id string) (string, error)

ContainerEnd

func ContainerStart

func ContainerStart(imagename string, command string) (string, error)

ContainerStart

func Delete

func Delete(id int) error

Delete

Types

type Account

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

func AccountOne

func AccountOne(id int) (Account, error)

AccountOne

func AccountsAll

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

AccountsAll

func (Account) Insert

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

Insert

func (Account) Update

func (a Account) Update() error

Update

type AddAccount

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

AddAccount

func (AddAccount) Validation

func (a AddAccount) Validation() error

Validation

type Admin

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

Admin

type Container

type Container struct {
	ID     string `json:"id" example:"25fe01fcafc5"`
	Image  string `json:"image" example:"alpine"`
	Status string `json:"status" example:"Running"`
}

Container

func ContainerOne

func ContainerOne(id string) (*Container, error)

ContainerOne

func ContainersAll

func ContainersAll() ([]Container, error)

ContainersAll

type UpdateAccount

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

UpdateAccount

func (UpdateAccount) Validation

func (a UpdateAccount) Validation() error

Validation

Jump to

Keyboard shortcuts

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