Documentation
¶
Index ¶
- func RepositoryUIPath(image oci.Reference) string
- type Client
- func (c *Client) GetOrganizationOrUser(ctx context.Context, organizationOrUser string) (*Entity, error)
- func (c *Client) GetRepository(ctx context.Context, image oci.Reference) (*Repository, error)
- func (c *Client) GetVulnerabilities(ctx context.Context, repo string, digest string) ([]osv.Vulnerability, error)
- type Entity
- type Image
- type Page
- type Repository
- type Tag
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RepositoryUIPath ¶
RepositoryUIPath returns a URL to an image's repository page on Docker Hub.
Types ¶
type Client ¶
func (*Client) GetOrganizationOrUser ¶
func (c *Client) GetOrganizationOrUser(ctx context.Context, organizationOrUser string) (*Entity, error)
GetOrganizationOrUser retrieves information about a Docker Hub user or organization by name.
func (*Client) GetRepository ¶
func (*Client) GetVulnerabilities ¶ added in v0.20.0
func (c *Client) GetVulnerabilities(ctx context.Context, repo string, digest string) ([]osv.Vulnerability, error)
GetVulnerabilities retrieves a Docker Scout vulnerability report for a repository and image digest. Returns nil if the results are inconclusive or an SBOM was not found.
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.