db

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Image

type Image struct {
	dbengine.BaseModel
	ReleaseID string `json:"releaseId" gorm:"index:idx_release_id"`       // release
	ImageName string `json:"imageName" gorm:"type:varchar(128);not null"` // image name
	ImageTag  string `json:"imageTag" gorm:"type:varchar(64)"`            // image tag
	Image     string `json:"image" gorm:"not null"`                       // image addr
}

func (Image) TableName

func (Image) TableName() string

Set table name

type ImageConfigDB

type ImageConfigDB struct {
	*gorm.DB
}

ImageConfig .

func (*ImageConfigDB) CreateImage

func (client *ImageConfigDB) CreateImage(image *Image) error

CreateImage

func (*ImageConfigDB) DeleteImage

func (client *ImageConfigDB) DeleteImage(imageID int64) error

DeleteImage

func (*ImageConfigDB) GetImageByID

func (client *ImageConfigDB) GetImageByID(imageID int64) (*Image, error)

GetImagesByID Get image by imageID

func (*ImageConfigDB) GetImageByImage

func (client *ImageConfigDB) GetImageByImage(image string) (*Image, error)

GetImageByImage Get image by image string

func (*ImageConfigDB) GetImageCount

func (client *ImageConfigDB) GetImageCount(releaseID, image string) (int64, error)

GetImageCount Get the quantity not equal releaseID

func (*ImageConfigDB) GetImagesByRelease

func (client *ImageConfigDB) GetImagesByRelease(releaseID string) ([]Image, error)

GetImagesByRelease Get image list by releaseID

func (*ImageConfigDB) ListImages

func (client *ImageConfigDB) ListImages(orgID, pageNo, pageSize int64) (int64, []Image, error)

ListImages Get image list

func (*ImageConfigDB) UpdateImage

func (client *ImageConfigDB) UpdateImage(image *Image) error

UpdateImage

Jump to

Keyboard shortcuts

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