Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DAO ¶
type DAO interface { // Create the registry Create(ctx context.Context, registry *Registry) (id int64, err error) // Count returns the count of registries according to the query Count(ctx context.Context, query *q.Query) (count int64, err error) // List the registries according to the query List(ctx context.Context, query *q.Query) (registries []*Registry, err error) // Get the registry specified by ID Get(ctx context.Context, id int64) (registry *Registry, err error) // Update the specified registry Update(ctx context.Context, registry *Registry, props ...string) (err error) // Delete the registry specified by ID Delete(ctx context.Context, id int64) (err error) }
DAO defines the DAO operations of registry
type Registry ¶
type Registry struct { ID int64 `orm:"pk;auto;column(id)"` URL string `orm:"column(url)"` Name string `orm:"column(name)"` CredentialType string `orm:"column(credential_type);default(basic)"` AccessKey string `orm:"column(access_key)"` AccessSecret string `orm:"column(access_secret)"` Type string `orm:"column(type)"` Insecure bool `orm:"column(insecure)"` Description string `orm:"column(description)"` Status string `orm:"column(health)"` CreationTime time.Time `orm:"column(creation_time);auto_now_add"` UpdateTime time.Time `orm:"column(update_time);auto_now"` }
Registry is the model for a registry, which wraps the endpoint URL and credential of a remote registry.
Click to show internal directories.
Click to hide internal directories.