Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ContainerImage ¶
type ContainerImage struct { ID int `orm:"column(id);auto"` Tag string `orm:"column(tag);size(255);null"` Size int64 `orm:"column(size);null"` RepoID int `orm:"column(repo_id);null"` // docker, oci, rkt... Proto string `orm:"column(proto);size(15);null"` ProtoVersion string `orm:"column(proto_version);size(15);null"` }
ContainerImage defines the container image struct.
func AddImage ¶
func AddImage(reponame string, tags string, proto string, protoVerion string) (*ContainerImage, error)
AddImage adds an image to the database. If the target repo is not exist, it will create a repo. TODO: lots of rollback
func QueryImage ¶
QueryImage returns a container image by 'repoid, tag, proto and proto version'
type ContainerRepo ¶
type ContainerRepo struct { ID int `orm:"column(id);auto"` Name string `orm:"unique;column(name);size(255);null"` Star int `orm:"column(star);null"` DownloadNum int `orm:"column(download_num);null"` Description string `orm:"column(description);null"` }
ContainerRepo defines the container repo struct, will support dockerv2, ociv1.
func AddRepo ¶
func AddRepo(reponame string) (*ContainerRepo, error)
AddRepo adds a repo to the database
Click to show internal directories.
Click to hide internal directories.