repositoryimpl

package
v0.0.0-...-d7fecdb Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: Apache-2.0 Imports: 10 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"`
	Image     string `bson:"image"     json:"image"`
	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 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