provider

package
v0.0.0-...-e4b6a09 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PreheatingImageTypeImage defines the 'image' type of preheating images
	PreheatingImageTypeImage = "image"
	// PreheatingStatusPending means the preheating is waiting for starting
	PreheatingStatusPending = "PENDING"
	// PreheatingStatusRunning means the preheating is ongoing
	PreheatingStatusRunning = "RUNNING"
	// PreheatingStatusSuccess means the preheating is success
	PreheatingStatusSuccess = "SUCCESS"
	// PreheatingStatusFail means the preheating is failed
	PreheatingStatusFail = "FAIL"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Instance

type Instance struct {
	ID          int64  `orm:"pk;auto;column(id)" json:"id"`
	Name        string `orm:"column(name)" json:"name"`
	Description string `orm:"column(description)" json:"description"`
	Vendor      string `orm:"column(vendor)" json:"vendor"`
	Endpoint    string `orm:"column(endpoint)" json:"endpoint"`
	AuthMode    string `orm:"column(auth_mode)" json:"auth_mode"`
	// The auth credential data if exists
	AuthInfo map[string]string `orm:"-" json:"auth_info,omitempty"`
	// Data format for "AuthInfo"
	AuthData string `orm:"column(auth_data)" json:"-"`
	// Default 'Unknown', use separate API for client to retrieve
	Status         string `orm:"-" json:"status"`
	Enabled        bool   `orm:"column(enabled)" json:"enabled"`
	Default        bool   `orm:"column(is_default)" json:"default"`
	Insecure       bool   `orm:"column(insecure)" json:"insecure"`
	SetupTimestamp int64  `orm:"column(setup_timestamp)" json:"setup_timestamp"`
}

Instance defines the properties of the preheating provider instance.

func (*Instance) FromJSON

func (ins *Instance) FromJSON(data string) error

FromJSON build instance from the given data.

func (*Instance) TableName

func (ins *Instance) TableName() string

TableName ...

func (*Instance) ToJSON

func (ins *Instance) ToJSON() (string, error)

ToJSON encodes the instance to JSON data.

Jump to

Keyboard shortcuts

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