Documentation ¶
Index ¶
- Variables
- func ExecuteRequest(ctx context.Context, client *http.Client, method string, url string, ...) error
- func NewRegistryClient(registry name.Registry, keychain authn.Keychain, scopes ...string) (*http.Client, error)
- type DockerHubRegistry
- func (d *DockerHubRegistry) Keychain() authn.Keychain
- func (d *DockerHubRegistry) ResolveImages(ctx context.Context, directory string) ([]string, error)
- func (d *DockerHubRegistry) ResolveTagDetails(ctx context.Context, tag *TagDetails) (*TagDetails, error)
- func (d *DockerHubRegistry) ResolveTags(ctx context.Context, image string) ([]*TagDetails, error)
- func (d *DockerHubRegistry) String() string
- func (d *DockerHubRegistry) StripBaseURL(ref string) (string, error)
- type GcrRegistry
- func (g *GcrRegistry) Keychain() authn.Keychain
- func (g *GcrRegistry) ResolveImages(ctx context.Context, directory string) ([]string, error)
- func (g *GcrRegistry) ResolveTagDetails(ctx context.Context, tag *TagDetails) (*TagDetails, error)
- func (g *GcrRegistry) ResolveTags(ctx context.Context, image string) ([]*TagDetails, error)
- func (g *GcrRegistry) String() string
- func (g *GcrRegistry) StripBaseURL(ref string) (string, error)
- type Registry
- type TagDetails
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func ExecuteRequest ¶
func ExecuteRequest(ctx context.Context, client *http.Client, method string, url string, result interface{}) error
ExecuteRequest executes an HTTP request for <method> and <url> using <client> and returns the decoded response in <result> (which therefore should be a pointer to a struct type with json tags) Opinionated and expects a JSON response
Types ¶
type DockerHubRegistry ¶
type DockerHubRegistry struct {
// contains filtered or unexported fields
}
func (*DockerHubRegistry) Keychain ¶
func (d *DockerHubRegistry) Keychain() authn.Keychain
func (*DockerHubRegistry) ResolveImages ¶
func (*DockerHubRegistry) ResolveTagDetails ¶
func (d *DockerHubRegistry) ResolveTagDetails(ctx context.Context, tag *TagDetails) (*TagDetails, error)
func (*DockerHubRegistry) ResolveTags ¶
func (d *DockerHubRegistry) ResolveTags(ctx context.Context, image string) ([]*TagDetails, error)
func (*DockerHubRegistry) String ¶
func (d *DockerHubRegistry) String() string
func (*DockerHubRegistry) StripBaseURL ¶
func (d *DockerHubRegistry) StripBaseURL(ref string) (string, error)
type GcrRegistry ¶
type GcrRegistry struct {
// contains filtered or unexported fields
}
func (*GcrRegistry) Keychain ¶
func (g *GcrRegistry) Keychain() authn.Keychain
func (*GcrRegistry) ResolveImages ¶
func (*GcrRegistry) ResolveTagDetails ¶
func (g *GcrRegistry) ResolveTagDetails(ctx context.Context, tag *TagDetails) (*TagDetails, error)
func (*GcrRegistry) ResolveTags ¶
func (g *GcrRegistry) ResolveTags(ctx context.Context, image string) ([]*TagDetails, error)
func (*GcrRegistry) String ¶
func (g *GcrRegistry) String() string
func (*GcrRegistry) StripBaseURL ¶
func (g *GcrRegistry) StripBaseURL(ref string) (string, error)
type Registry ¶
type Registry interface { fmt.Stringer ResolveImages(ctx context.Context, directory string) ([]string, error) ResolveTags(ctx context.Context, image string) ([]*TagDetails, error) ResolveTagDetails(ctx context.Context, tag *TagDetails) (*TagDetails, error) Keychain() authn.Keychain StripBaseURL(ref string) (string, error) }
type TagDetails ¶
type TagDetails struct { // Image name including registry url and repo, e.g. "docker.io/danielsel/test" Image string // Digest is the image tag digest Digest string // Original remembers the original tag url used for the details request Original string // LastModified stores the last modified timestamp LastModified *time.Time // Size in bytes Size uint64 }
func (*TagDetails) Equals ¶
func (t *TagDetails) Equals(b *TagDetails) bool
func (*TagDetails) String ¶
func (t *TagDetails) String() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.