Documentation ¶
Index ¶
- Constants
- type AuxData
- type IImages
- type SImages
- func (d *SImages) AddTargetHash(repo notaryClient.Repository, digest *models.ContentDigest, tag string, ...) error
- func (d *SImages) CheckChangelist(repo notaryClient.Repository, ip prompts.IPrompts) error
- func (d *SImages) DeleteTag(imageName, tagName string) error
- func (d *SImages) DeleteTargets(repo notaryClient.Repository, tags []string, publish bool) error
- func (d *SImages) GetGloballyUniqueNamespace(name string, env *models.Environment, includeRegistry bool) (string, string, error)
- func (d *SImages) GetNotaryRepository(pod, imageName string, user *models.User) notaryClient.Repository
- func (d *SImages) InitNotaryRepo(repo notaryClient.Repository, rootKeyPath string) error
- func (d *SImages) ListImages() (*[]string, error)
- func (d *SImages) ListTags(imageName string) (*[]string, error)
- func (d *SImages) ListTargets(repo notaryClient.Repository, roles ...string) ([]*Target, error)
- func (d *SImages) LookupTarget(repo notaryClient.Repository, tag string) (*Target, error)
- func (d *SImages) PrintChangelist(changes []changelist.Change)
- func (d *SImages) Publish(repo notaryClient.Repository) error
- func (d *SImages) Pull(name string, target *Target, user *models.User, env *models.Environment) error
- func (d *SImages) Push(name string, user *models.User, env *models.Environment, ip prompts.IPrompts) (*models.Image, error)
- type Target
Constants ¶
const ( InvalidImageName = "Invalid image name" IncorrectNamespace = "Incorrect namespace for your environment" IncorrectRegistryOrNamespace = "Incorrect registry or namespace for your environment" MissingTrustData = "does not have trust data for" ImageDoesNotExist = "No such image" CancelingPush = "Canceling push request" CanonicalTargetsRole = "targets" )
Errors for image handling
const (
DefaultTag = "latest"
)
Constants for image handling
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuxData ¶
type AuxData struct { Tag string `json:"Tag"` Digest string `json:"Digest"` Size int64 `json:"Size"` }
AuxData contains metadata about the content that was pushed
type IImages ¶
type IImages interface { ListImages() (*[]string, error) ListTags(imageName string) (*[]string, error) DeleteTag(imageName, tagName string) error Push(name string, user *models.User, env *models.Environment, ip prompts.IPrompts) (*models.Image, error) Pull(name string, target *Target, user *models.User, env *models.Environment) error InitNotaryRepo(repo notaryClient.Repository, rootKeyPath string) error AddTargetHash(repo notaryClient.Repository, digest *models.ContentDigest, tag string, publish bool) error ListTargets(repo notaryClient.Repository, roles ...string) ([]*Target, error) LookupTarget(repo notaryClient.Repository, tag string) (*Target, error) DeleteTargets(repo notaryClient.Repository, tags []string, publish bool) error PrintChangelist(changes []changelist.Change) CheckChangelist(repo notaryClient.Repository, ip prompts.IPrompts) error GetNotaryRepository(pod, imageName string, user *models.User) notaryClient.Repository GetGloballyUniqueNamespace(name string, env *models.Environment, includeRegistry bool) (string, string, error) Publish(repo notaryClient.Repository) error }
IImages describes container-image-related functionality
type SImages ¶
SImages is a concrete implementation of IImages
func (*SImages) AddTargetHash ¶
func (d *SImages) AddTargetHash(repo notaryClient.Repository, digest *models.ContentDigest, tag string, publish bool) error
AddTargetHash adds the given content hash to a notary repo and sends a signing request to the server
func (*SImages) CheckChangelist ¶
func (d *SImages) CheckChangelist(repo notaryClient.Repository, ip prompts.IPrompts) error
CheckChangelist prompts the user if they have unpublished changes to let them clear
undesired changes before publishing, or verify that the changes should be published
func (*SImages) DeleteTargets ¶
func (d *SImages) DeleteTargets(repo notaryClient.Repository, tags []string, publish bool) error
DeleteTargets deletes the signed targets for a list of tags
func (*SImages) GetGloballyUniqueNamespace ¶
func (d *SImages) GetGloballyUniqueNamespace(name string, env *models.Environment, includeRegistry bool) (string, string, error)
GetGloballyUniqueNamespace returns the fully formatted name for an image <registry>/<namespace>/<image> and a tag if present
func (*SImages) GetNotaryRepository ¶
func (d *SImages) GetNotaryRepository(pod, imageName string, user *models.User) notaryClient.Repository
GetNotaryRepository returns a pointer to the notary repository for an image
func (*SImages) InitNotaryRepo ¶
func (d *SImages) InitNotaryRepo(repo notaryClient.Repository, rootKeyPath string) error
InitNotaryRepo intializes a notary repository
func (*SImages) ListImages ¶
ListImages lists images for an environment.
func (*SImages) ListTargets ¶
func (d *SImages) ListTargets(repo notaryClient.Repository, roles ...string) ([]*Target, error)
ListTargets intializes a notary repository
func (*SImages) LookupTarget ¶
func (d *SImages) LookupTarget(repo notaryClient.Repository, tag string) (*Target, error)
LookupTarget searches for a specific target in a repository by tag name
func (*SImages) PrintChangelist ¶
func (d *SImages) PrintChangelist(changes []changelist.Change)
PrintChangelist prints out the users unpublished changes in a formatted table
func (*SImages) Publish ¶
func (d *SImages) Publish(repo notaryClient.Repository) error
Publish publishes changes to a repo