db

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2021 License: Apache-2.0 Imports: 2 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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