models

package
v0.0.0-...-c6e3130 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2022 License: Apache-2.0 Imports: 4 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Name         string    `json:"name"`
	MaxInstances int       `json:"max_instances"`
	LastDeploy   time.Time `json:"last_deploy"`
}

App is a Model implementation for an application in the PaaS

func (*App) MarshalBinary

func (a *App) MarshalBinary() ([]byte, error)

MarshalBinary is the encoding.BinaryMarshaler interface implementation

func (*App) Set

func (a *App) Set(m Model) error

Set is the Model interface implementation

func (*App) UnmarshalBinary

func (a *App) UnmarshalBinary(b []byte) error

UnmarshalBinary is the encoding.BinaryUnmarshaler interface implementation

type AppKey

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

AppKey is a models.Key implementation specifically for App models

func NewAppKey

func NewAppKey(name string) *AppKey

NewAppKey creates and returns a new AppKey with the given app name

func (*AppKey) String

func (a *AppKey) String() string

String is the fmt.Stringer interface implementation

type Key

type Key interface {
	fmt.Stringer
}

Key is the generic key that's used to identify Models in db.DB implementations

type Model

type Model interface {
	encoding.BinaryMarshaler
	encoding.BinaryUnmarshaler
	// Set replaces the contents of the model with the given model
	Set(Model) error
}

Model is the generic interface to represent data that's stored in db.DB implementations

Jump to

Keyboard shortcuts

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