repositoryimpl

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCloudRepo

func NewCloudRepo(m mongodbClient) repository.Cloud

func NewPodRepo

func NewPodRepo(cfg *Config) repository.Pod

Types

type Config

type Config struct {
	Table Table `json:"table" required:"true"`
}

type DCloudConf

type DCloudConf struct {
	Id        string    `bson:"id"         json:"id"`
	Name      string    `bson:"name"       json:"name"`
	Spec      string    `bson:"spec"       json:"spec"`
	Images    []ImageDO `bson:"images"     json:"images"`
	Feature   string    `bson:"feature"    json:"feature"`
	Processor string    `bson:"processor"  json:"processor"`
	Limited   int       `bson:"limited"    json:"limited"`
	Credit    int64     `bson:"credit"     json:"credit"`
}

type ImageDO added in v1.1.1

type ImageDO struct {
	Alias   string `bson:"alias" json:"alias"`
	Image   string `bson:"image" json:"image"`
	Default bool   `bson:"default" json:"default"`
}

type TPod

type TPod struct {
	Id        string `gorm:"type:uuid;default:gen_random_uuid();primaryKey"`
	CloudId   string `gorm:"column:cloud_id;not null"`
	Owner     string `gorm:"column:owner;not null"`
	Status    string `gorm:"column:status;not null"`
	Expiry    int64  `gorm:"column:expiry;not null"`
	Error     string `gorm:"column:error"`
	AccessURL string `gorm:"column:access_url"`
	CreatedAt int64  `gorm:"column:created_at;not null;default:extract(epoch from now())"`
}

func (TPod) TableName

func (TPod) TableName() string

type Table

type Table struct {
	Pod string `json:"pod" required:"true"`
}

Jump to

Keyboard shortcuts

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