imageentity

package
v0.0.0-...-bd520fb Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TableUserContainerImageInfo        string = "UserContainerImageInfos"
	TableUserContainerImageVersionInfo string = "UserContainerImageVersionInfos"
)

table contants

View Source
const (
	TableContainerImageOrg string = "ContainerImageOrgs"
)

table contants

Variables

This section is empty.

Functions

func CreateContainerImage

func CreateContainerImage(imgInfo *UserContainerImageInfo) error

func CreateContainerImageVersion

func CreateContainerImageVersion(imgVerInfo *UserContainerImageVersionInfo) error

func CreateImageOrg

func CreateImageOrg(orgInfo *ContainerImageOrg) error

func DeleteContainerImage

func DeleteContainerImage(imgInfo *UserContainerImageInfo) error

func DeleteContainerImageVersion

func DeleteContainerImageVersion(imgVerInfo *UserContainerImageVersionInfo) error

func DeleteImageOrg

func DeleteImageOrg(orgInfo *ContainerImageOrg) error

func UpdateContainerImage

func UpdateContainerImage(imgInfo *UserContainerImageInfo) error

func UpdateContainerImageVersion

func UpdateContainerImageVersion(imgVerInfo *UserContainerImageVersionInfo) error

func UpdateImageOrg

func UpdateImageOrg(orgInfo *ContainerImageOrg) error

Types

type ContainerImageOrg

type ContainerImageOrg struct {
	ID           int64     `gorm:"column:Id;primary_key"                                    json:"id"`
	ClusterId    int64     `gorm:"uniqueIndex:cluster_org;column:ClusterId;not null"        json:"clusterId"`
	OrgName      string    `gorm:"uniqueIndex:cluster_org;column:OrgName;size:255;not null" json:"orgName"`
	OwnerGroupId int64     `gorm:"column:OwnerGroupId;not null"                             json:"ownerGroupId"`
	OwnerUserId  int64     `gorm:"column:OwnerUserId;not null"                              json:"ownerUserId"`
	CreateAt     time.Time `gorm:"column:CreateAt;not null"                                 json:"createAt"`
	UpdateAt     time.Time `gorm:"column:UpdateAt;not null"                                 json:"updateAt"`
}

The simplest implement, add RBAC if need

func (ContainerImageOrg) TableName

func (ContainerImageOrg) TableName() string

type UserContainerImageInfo

type UserContainerImageInfo struct {
	ID        int64     `gorm:"column:Id;primary_key"                                   json:"id"`
	ClusterId int64     `gorm:"uniqueIndex:user_img;column:ClusterId;not null"          json:"clusterId"`
	GroupId   int64     `gorm:"uniqueIndex:user_img;column:GroupId;not null"            json:"groupId"`
	UserId    int64     `gorm:"uniqueIndex:user_img;column:UserId;not null"             json:"userId"`
	ImageName string    `gorm:"uniqueIndex:user_img;column:ImageName;size:255;not null" json:"imageName"`
	OrgName   string    `gorm:"uniqueIndex:user_img;column:OrgName;size:255;not null"   json:"orgName"`
	CreateAt  time.Time `gorm:"column:CreateAt;not null"                                json:"createAt"`
	UpdateAt  time.Time `gorm:"column:UpdateAt;not null"                                json:"updateAt"`
}

func (UserContainerImageInfo) TableName

func (UserContainerImageInfo) TableName() string

image list

type UserContainerImageVersionInfo

type UserContainerImageVersionInfo struct {
	ID              int64     `gorm:"column:Id;primary_key"                                              json:"id"`
	ClusterId       int64     `gorm:"uniqueIndex:user_img_version;column:ClusterId;not null"             json:"clusterId"`
	GroupId         int64     `gorm:"uniqueIndex:user_img_version;column:GroupId;not null"               json:"groupId"`
	UserId          int64     `gorm:"uniqueIndex:user_img_version;column:UserId;not null"                json:"userId"`
	ImageName       string    `gorm:"uniqueIndex:user_img_version;column:ImageName;size:255;not null"    json:"imageName"`
	OrgName         string    `gorm:"uniqueIndex:user_img_version;column:OrgName;size:255;not null"      json:"orgName"`
	ImageId         string    `gorm:"column:ImageId;size:512;not null"                                   json:"imageId"`
	ImageVersion    string    `gorm:"uniqueIndex:user_img_version;column:ImageVersion;size:255;not null" json:"imageVersion"`
	ImageSize       float32   `gorm:"column:ImageSize;not null"                                          json:"imageSize"`
	DownloadCommand string    `gorm:"column:DownloadCommand;size:512;not null"                           json:"DownloadCommand"`
	CreateAt        time.Time `gorm:"column:CreateAt;not null"                                           json:"createAt"`
	UpdateAt        time.Time `gorm:"column:UpdateAt;not null"                                           json:"updateAt"`
}

func (UserContainerImageVersionInfo) TableName

image version

Jump to

Keyboard shortcuts

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