Documentation ¶
Overview ¶
Package docker provides a client using the Docker API. Lookup of the latest image borrows from Renovate. SEE: https://github.com/renovatebot/renovate/tree/main/lib/modules/datasource/docker SEE: https://github.com/renovatebot/renovate/tree/main/lib/modules/versioning/docker
Index ¶
- func RepositoryUIPath(image oci.Reference) string
- func TagUIPath(image oci.Reference, digest string) string
- type Client
- func (c *Client) AuthorizeOCIRequest(ctx context.Context, image oci.Reference, req *http.Request) error
- func (c *Client) GetOrganizationOrUser(ctx context.Context, organizationOrUser string) (*Entity, error)
- func (c *Client) GetRegistryToken(ctx context.Context, image oci.Reference) (string, error)
- func (c *Client) GetRepository(ctx context.Context, image oci.Reference) (*Repository, error)
- func (c *Client) GetVulnerabilityReport(ctx context.Context, repo string, digest string) (*VulnerabilityReport, error)
- type Entity
- type Image
- type Page
- type Repository
- type Tag
- type VulnerabilityReport
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RepositoryUIPath ¶
Types ¶
type Client ¶
func (*Client) AuthorizeOCIRequest ¶
func (*Client) GetOrganizationOrUser ¶
func (*Client) GetRegistryToken ¶
func (*Client) GetRepository ¶
func (*Client) GetVulnerabilityReport ¶
type Entity ¶
type Entity struct { ID string `json:"id"` UUID string `json:"uuid,omitempty"` OrganizationName string `json:"orgname"` Username string `json:"username,omitempty"` FullName string `json:"full_name"` Location string `json:"location"` Company string `json:"company"` ProfileURL string `json:"profile_url"` DateJoined time.Time `json:"date_joined"` GravatarURL string `json:"gravatar_url"` GravatarEmail string `json:"gravatar_email"` Type string `json:"type"` Badge string `json:"badge,omitempty"` }
type Image ¶
type Image struct { Architecture string `json:"architecture"` Features string `json:"features"` Variant *string `json:"variant"` Digest string `json:"digest"` OS string `json:"os"` OSFeatures string `json:"os_features"` OSVersion *string `json:"os_version"` Size int `json:"size"` Status string `json:"status"` LastPulled time.Time `json:"last_pulled"` LastPushed time.Time `json:"last_pushed"` }
type Repository ¶
type Repository struct { User string `json:"user"` Name string `json:"name"` Namespace string `json:"namespace"` Type string `json:"repository_type"` Status int `json:"status"` StatusDescription string `json:"status_description"` Description string `json:"description"` IsPrivate bool `json:"is_private"` IsAutomated bool `json:"is_automated"` StarCount int `json:"star_count"` PullCount int `json:"pull_count"` LastUpdated time.Time `json:"last_updated"` DateRegistered time.Time `json:"date_registered"` CollaboratorCount int `json:"collaborator_count"` Affiliation json.RawMessage `json:"affiliation"` // Unknown HubUser string `json:"hub_user"` HasStarred bool `json:"has_starred"` FullDescription string `json:"full_description"` Permissions struct { Read bool `json:"read"` Write bool `json:"write"` Admin bool `json:"admin"` } `json:"permissions"` MediaTypes []string `json:"media_types"` ContentTypes []string `json:"content_types"` Categories []struct { Name string `json:"name"` Slug string `json:"slug"` } `json:"categories"` ImmutableTags bool `json:"immutable_tags"` ImmutableTagsRules string `json:"immutable_tags_rules"` }
type Tag ¶
type Tag struct { Creator int `json:"creator"` ID int `json:"id"` LastUpdated time.Time `json:"last_updated"` LastUpdater int `json:"last_updater"` LastUpdaterUsername string `json:"last_updater_username"` Name string `json:"name"` Repository int `json:"repository"` FullSize int `json:"full_size"` V2 bool `json:"v2"` TagStatus string `json:"tag_status"` TagLastPulled time.Time `json:"tag_last_pulled"` TagLastPushed time.Time `json:"tag_last_pushed"` MediaType string `json:"media_type"` ContentType string `json:"content_type"` Digest string `json:"digest"` Images []Image `json:"images"` }
Click to show internal directories.
Click to hide internal directories.