Documentation
¶
Overview ¶
Package client provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.8.1 DO NOT EDIT.
Package client is a typed Go client for strata's HTTP API, generated from api/openapi.yaml.
Index ¶
- func NewGetAncestryRequest(server string, params *GetAncestryParams) (*http.Request, error)
- func NewGetCleanupRequest(server string, params *GetCleanupParams) (*http.Request, error)
- func NewGetDescendantsRequest(server string, params *GetDescendantsParams) (*http.Request, error)
- func NewGetHealthRequest(server string) (*http.Request, error)
- func NewGetImageRequest(server string, digest string, params *GetImageParams) (*http.Request, error)
- func NewGetLifecyclesRequest(server string, params *GetLifecyclesParams) (*http.Request, error)
- func NewGetMapRequest(server string, params *GetMapParams) (*http.Request, error)
- func NewGetOutlineRequest(server string, params *GetOutlineParams) (*http.Request, error)
- func NewGetOverviewRequest(server string) (*http.Request, error)
- func NewGetQueryGraphRequest(server string, params *GetQueryGraphParams) (*http.Request, error)
- func NewGetRootsRequest(server string) (*http.Request, error)
- func NewGetStaleRequest(server string, params *GetStaleParams) (*http.Request, error)
- func NewGetStatusRequest(server string) (*http.Request, error)
- func NewGetSummaryRequest(server string, params *GetSummaryParams) (*http.Request, error)
- func NewResolveRefRequest(server string, params *ResolveRefParams) (*http.Request, error)
- func NewRunQueryRequest(server string, params *RunQueryParams) (*http.Request, error)
- func NewSearchRequest(server string, params *SearchParams) (*http.Request, error)
- type BadRequest
- type BaseVersion
- type BaseVersionConfidence
- type BaseVersionSource
- type Budget
- type BuiltFrom
- type BuiltFromStatus
- type Change
- type Cleanup
- type CleanupCandidate
- type CleanupRepo
- type CleanupScope
- type Client
- func (c *Client) GetAncestry(ctx context.Context, params *GetAncestryParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetCleanup(ctx context.Context, params *GetCleanupParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetDescendants(ctx context.Context, params *GetDescendantsParams, ...) (*http.Response, error)
- func (c *Client) GetHealth(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetImage(ctx context.Context, digest string, params *GetImageParams, ...) (*http.Response, error)
- func (c *Client) GetLifecycles(ctx context.Context, params *GetLifecyclesParams, ...) (*http.Response, error)
- func (c *Client) GetMap(ctx context.Context, params *GetMapParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetOutline(ctx context.Context, params *GetOutlineParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetOverview(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetQueryGraph(ctx context.Context, params *GetQueryGraphParams, ...) (*http.Response, error)
- func (c *Client) GetRoots(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetStale(ctx context.Context, params *GetStaleParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetStatus(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetSummary(ctx context.Context, params *GetSummaryParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ResolveRef(ctx context.Context, params *ResolveRefParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) RunQuery(ctx context.Context, params *RunQueryParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) Search(ctx context.Context, params *SearchParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) GetAncestryWithResponse(ctx context.Context, params *GetAncestryParams, reqEditors ...RequestEditorFn) (*GetAncestryResponse, error)
- func (c *ClientWithResponses) GetCleanupWithResponse(ctx context.Context, params *GetCleanupParams, reqEditors ...RequestEditorFn) (*GetCleanupResponse, error)
- func (c *ClientWithResponses) GetDescendantsWithResponse(ctx context.Context, params *GetDescendantsParams, ...) (*GetDescendantsResponse, error)
- func (c *ClientWithResponses) GetHealthWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetHealthResponse, error)
- func (c *ClientWithResponses) GetImageWithResponse(ctx context.Context, digest string, params *GetImageParams, ...) (*GetImageResponse, error)
- func (c *ClientWithResponses) GetLifecyclesWithResponse(ctx context.Context, params *GetLifecyclesParams, ...) (*GetLifecyclesResponse, error)
- func (c *ClientWithResponses) GetMapWithResponse(ctx context.Context, params *GetMapParams, reqEditors ...RequestEditorFn) (*GetMapResponse, error)
- func (c *ClientWithResponses) GetOutlineWithResponse(ctx context.Context, params *GetOutlineParams, reqEditors ...RequestEditorFn) (*GetOutlineResponse, error)
- func (c *ClientWithResponses) GetOverviewWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetOverviewResponse, error)
- func (c *ClientWithResponses) GetQueryGraphWithResponse(ctx context.Context, params *GetQueryGraphParams, ...) (*GetQueryGraphResponse, error)
- func (c *ClientWithResponses) GetRootsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetRootsResponse, error)
- func (c *ClientWithResponses) GetStaleWithResponse(ctx context.Context, params *GetStaleParams, reqEditors ...RequestEditorFn) (*GetStaleResponse, error)
- func (c *ClientWithResponses) GetStatusWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetStatusResponse, error)
- func (c *ClientWithResponses) GetSummaryWithResponse(ctx context.Context, params *GetSummaryParams, reqEditors ...RequestEditorFn) (*GetSummaryResponse, error)
- func (c *ClientWithResponses) ResolveRefWithResponse(ctx context.Context, params *ResolveRefParams, reqEditors ...RequestEditorFn) (*ResolveRefResponse, error)
- func (c *ClientWithResponses) RunQueryWithResponse(ctx context.Context, params *RunQueryParams, reqEditors ...RequestEditorFn) (*RunQueryResponse, error)
- func (c *ClientWithResponses) SearchWithResponse(ctx context.Context, params *SearchParams, reqEditors ...RequestEditorFn) (*SearchResponse, error)
- type ClientWithResponsesInterface
- type ConfigInfo
- type CrawlStats
- type DescendantResult
- type Edge
- type EdgeConfidence
- type EdgeSource
- type Error
- type Explanation
- type Facet
- type FacetValue
- type Filter
- type GetAncestryParams
- type GetAncestryResponse
- func (r GetAncestryResponse) ContentType() string
- func (r GetAncestryResponse) GetBody() []byte
- func (r GetAncestryResponse) GetJSON200() *Graph
- func (r GetAncestryResponse) GetJSON404() *NotFound
- func (r GetAncestryResponse) GetJSONDefault() *Error
- func (r GetAncestryResponse) Status() string
- func (r GetAncestryResponse) StatusCode() int
- type GetCleanupParams
- type GetCleanupParamsFormat
- type GetCleanupParamsScope
- type GetCleanupResponse
- func (r GetCleanupResponse) ContentType() string
- func (r GetCleanupResponse) GetBody() []byte
- func (r GetCleanupResponse) GetJSON200() *Cleanup
- func (r GetCleanupResponse) GetJSON400() *BadRequest
- func (r GetCleanupResponse) GetJSONDefault() *Error
- func (r GetCleanupResponse) Status() string
- func (r GetCleanupResponse) StatusCode() int
- type GetDescendantsParams
- type GetDescendantsResponse
- func (r GetDescendantsResponse) ContentType() string
- func (r GetDescendantsResponse) GetBody() []byte
- func (r GetDescendantsResponse) GetJSON200() *DescendantResult
- func (r GetDescendantsResponse) GetJSON404() *NotFound
- func (r GetDescendantsResponse) GetJSONDefault() *Error
- func (r GetDescendantsResponse) Status() string
- func (r GetDescendantsResponse) StatusCode() int
- type GetHealthResponse
- type GetImageParams
- type GetImageResponse
- func (r GetImageResponse) ContentType() string
- func (r GetImageResponse) GetBody() []byte
- func (r GetImageResponse) GetJSON200() *Explanation
- func (r GetImageResponse) GetJSON404() *NotFound
- func (r GetImageResponse) GetJSONDefault() *Error
- func (r GetImageResponse) Status() string
- func (r GetImageResponse) StatusCode() int
- type GetLifecyclesParams
- type GetLifecyclesResponse
- func (r GetLifecyclesResponse) ContentType() string
- func (r GetLifecyclesResponse) GetBody() []byte
- func (r GetLifecyclesResponse) GetJSON200() *[]Lifecycle
- func (r GetLifecyclesResponse) GetJSON400() *BadRequest
- func (r GetLifecyclesResponse) GetJSONDefault() *Error
- func (r GetLifecyclesResponse) Status() string
- func (r GetLifecyclesResponse) StatusCode() int
- type GetMapParams
- type GetMapResponse
- type GetOutlineParams
- type GetOutlineResponse
- func (r GetOutlineResponse) ContentType() string
- func (r GetOutlineResponse) GetBody() []byte
- func (r GetOutlineResponse) GetJSON200() *Outline
- func (r GetOutlineResponse) GetJSON400() *BadRequest
- func (r GetOutlineResponse) GetJSONDefault() *Error
- func (r GetOutlineResponse) Status() string
- func (r GetOutlineResponse) StatusCode() int
- type GetOverviewResponse
- type GetQueryGraphParams
- type GetQueryGraphResponse
- func (r GetQueryGraphResponse) ContentType() string
- func (r GetQueryGraphResponse) GetBody() []byte
- func (r GetQueryGraphResponse) GetJSON200() *Graph
- func (r GetQueryGraphResponse) GetJSON400() *BadRequest
- func (r GetQueryGraphResponse) GetJSONDefault() *Error
- func (r GetQueryGraphResponse) Status() string
- func (r GetQueryGraphResponse) StatusCode() int
- type GetRootsResponse
- type GetStaleParams
- type GetStaleResponse
- func (r GetStaleResponse) ContentType() string
- func (r GetStaleResponse) GetBody() []byte
- func (r GetStaleResponse) GetJSON200() *Table
- func (r GetStaleResponse) GetJSON400() *BadRequest
- func (r GetStaleResponse) GetJSONDefault() *Error
- func (r GetStaleResponse) Status() string
- func (r GetStaleResponse) StatusCode() int
- type GetStatusResponse
- type GetSummaryParams
- type GetSummaryResponse
- func (r GetSummaryResponse) ContentType() string
- func (r GetSummaryResponse) GetBody() []byte
- func (r GetSummaryResponse) GetJSON200() *Summary
- func (r GetSummaryResponse) GetJSON400() *BadRequest
- func (r GetSummaryResponse) GetJSONDefault() *Error
- func (r GetSummaryResponse) Status() string
- func (r GetSummaryResponse) StatusCode() int
- type Graph
- type GraphKind
- type GroupBy
- type GroupMetrics
- type Health
- type HealthStatus
- type HistoryEntry
- type HttpRequestDoer
- type ImageInfo
- type IndexStatus
- type LayerInfo
- type Lifecycle
- type Limit
- type LineageInfo
- type LineageInfoStatus
- type Node
- type NodeKind
- type NotFound
- type Offset
- type Outline
- type OutlineRow
- type OutlineRowKind
- type Overview
- type Platform
- type Ref
- type Referrer
- type ReferrerKind
- type RefreshStats
- type RequestEditorFn
- type ResolveRefParams
- type ResolveRefResponse
- func (r ResolveRefResponse) ContentType() string
- func (r ResolveRefResponse) GetBody() []byte
- func (r ResolveRefResponse) GetJSON200() *Resolved
- func (r ResolveRefResponse) GetJSON404() *NotFound
- func (r ResolveRefResponse) GetJSONDefault() *Error
- func (r ResolveRefResponse) Status() string
- func (r ResolveRefResponse) StatusCode() int
- type Resolved
- type Root
- type RootStat
- type RunQueryParams
- type RunQueryResponse
- func (r RunQueryResponse) ContentType() string
- func (r RunQueryResponse) GetBody() []byte
- func (r RunQueryResponse) GetJSON200() *Table
- func (r RunQueryResponse) GetJSON400() *BadRequest
- func (r RunQueryResponse) GetJSONDefault() *Error
- func (r RunQueryResponse) Status() string
- func (r RunQueryResponse) StatusCode() int
- type SearchHit
- type SearchParams
- type SearchParamsAge
- type SearchParamsPushed
- type SearchResponse
- func (r SearchResponse) ContentType() string
- func (r SearchResponse) GetBody() []byte
- func (r SearchResponse) GetJSON200() *SearchResult
- func (r SearchResponse) GetJSON400() *BadRequest
- func (r SearchResponse) GetJSONDefault() *Error
- func (r SearchResponse) Status() string
- func (r SearchResponse) StatusCode() int
- type SearchResult
- type StalenessInfo
- type Summary
- type Table
- type Verdict
- type VerdictCounts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGetAncestryRequest ¶
func NewGetAncestryRequest(server string, params *GetAncestryParams) (*http.Request, error)
NewGetAncestryRequest constructs an http.Request for the GetAncestry method
func NewGetCleanupRequest ¶ added in v0.3.0
func NewGetCleanupRequest(server string, params *GetCleanupParams) (*http.Request, error)
NewGetCleanupRequest constructs an http.Request for the GetCleanup method
func NewGetDescendantsRequest ¶
func NewGetDescendantsRequest(server string, params *GetDescendantsParams) (*http.Request, error)
NewGetDescendantsRequest constructs an http.Request for the GetDescendants method
func NewGetHealthRequest ¶
NewGetHealthRequest constructs an http.Request for the GetHealth method
func NewGetImageRequest ¶
func NewGetImageRequest(server string, digest string, params *GetImageParams) (*http.Request, error)
NewGetImageRequest constructs an http.Request for the GetImage method
func NewGetLifecyclesRequest ¶ added in v0.3.0
func NewGetLifecyclesRequest(server string, params *GetLifecyclesParams) (*http.Request, error)
NewGetLifecyclesRequest constructs an http.Request for the GetLifecycles method
func NewGetMapRequest ¶
func NewGetMapRequest(server string, params *GetMapParams) (*http.Request, error)
NewGetMapRequest constructs an http.Request for the GetMap method
func NewGetOutlineRequest ¶
func NewGetOutlineRequest(server string, params *GetOutlineParams) (*http.Request, error)
NewGetOutlineRequest constructs an http.Request for the GetOutline method
func NewGetOverviewRequest ¶
NewGetOverviewRequest constructs an http.Request for the GetOverview method
func NewGetQueryGraphRequest ¶
func NewGetQueryGraphRequest(server string, params *GetQueryGraphParams) (*http.Request, error)
NewGetQueryGraphRequest constructs an http.Request for the GetQueryGraph method
func NewGetRootsRequest ¶
NewGetRootsRequest constructs an http.Request for the GetRoots method
func NewGetStaleRequest ¶
func NewGetStaleRequest(server string, params *GetStaleParams) (*http.Request, error)
NewGetStaleRequest constructs an http.Request for the GetStale method
func NewGetStatusRequest ¶ added in v0.2.0
NewGetStatusRequest constructs an http.Request for the GetStatus method
func NewGetSummaryRequest ¶
func NewGetSummaryRequest(server string, params *GetSummaryParams) (*http.Request, error)
NewGetSummaryRequest constructs an http.Request for the GetSummary method
func NewResolveRefRequest ¶
func NewResolveRefRequest(server string, params *ResolveRefParams) (*http.Request, error)
NewResolveRefRequest constructs an http.Request for the ResolveRef method
func NewRunQueryRequest ¶
func NewRunQueryRequest(server string, params *RunQueryParams) (*http.Request, error)
NewRunQueryRequest constructs an http.Request for the RunQuery method
func NewSearchRequest ¶
func NewSearchRequest(server string, params *SearchParams) (*http.Request, error)
NewSearchRequest constructs an http.Request for the Search method
Types ¶
type BaseVersion ¶
type BaseVersion struct {
Children int `json:"children"`
Confidence BaseVersionConfidence `json:"confidence"`
Current bool `json:"current"`
Descendants int `json:"descendants"`
Digest string `json:"digest"`
Label string `json:"label"`
Source BaseVersionSource `json:"source"`
}
BaseVersion One digest a base tag has held, and how much is built on it
type BaseVersionConfidence ¶
type BaseVersionConfidence string
BaseVersionConfidence defines model for BaseVersion.Confidence.
const ( BaseVersionConfidenceDeclared BaseVersionConfidence = "declared" BaseVersionConfidenceExact BaseVersionConfidence = "exact" BaseVersionConfidenceInferred BaseVersionConfidence = "inferred" )
Defines values for BaseVersionConfidence.
func (BaseVersionConfidence) Valid ¶
func (e BaseVersionConfidence) Valid() bool
Valid indicates whether the value is a known member of the BaseVersionConfidence enum.
type BaseVersionSource ¶
type BaseVersionSource string
BaseVersionSource defines model for BaseVersion.Source.
const ( BaseVersionSourceFile BaseVersionSource = "file" BaseVersionSourceRepo BaseVersionSource = "repo" BaseVersionSourceTag BaseVersionSource = "tag" BaseVersionSourceTagHistory BaseVersionSource = "tag_history" )
Defines values for BaseVersionSource.
func (BaseVersionSource) Valid ¶
func (e BaseVersionSource) Valid() bool
Valid indicates whether the value is a known member of the BaseVersionSource enum.
type BuiltFrom ¶ added in v0.3.1
type BuiltFrom struct {
// Digest The digest the build resolved it to
Digest *string `json:"digest,omitempty"`
// Reason Why a missing base could not be fetched
Reason *string `json:"reason,omitempty"`
// Ref repo:tag as the build named it
Ref string `json:"ref"`
// Status parent: built on it; stage: another build stage's image; missing: could not be fetched; pending: the next index fetches it
Status BuiltFromStatus `json:"status"`
}
BuiltFrom An image a build pulled, by its BuildKit provenance
type BuiltFromStatus ¶ added in v0.3.1
type BuiltFromStatus string
BuiltFromStatus parent: built on it; stage: another build stage's image; missing: could not be fetched; pending: the next index fetches it
const ( Missing BuiltFromStatus = "missing" Parent BuiltFromStatus = "parent" Pending BuiltFromStatus = "pending" Stage BuiltFromStatus = "stage" )
Defines values for BuiltFromStatus.
func (BuiltFromStatus) Valid ¶ added in v0.3.1
func (e BuiltFromStatus) Valid() bool
Valid indicates whether the value is a known member of the BuiltFromStatus enum.
type Change ¶
type Change struct {
From float32 `json:"from"`
Group string `json:"group"`
Kind string `json:"kind"`
Metric *string `json:"metric,omitempty"`
To float32 `json:"to"`
}
Change One line of a diff between snapshots
type Cleanup ¶ added in v0.3.0
type Cleanup struct {
Candidates []CleanupCandidate `json:"candidates"`
// Held Matching images kept because kept images are built on them or share their index
Held int `json:"held"`
// Images Platform images in the candidates
Images int `json:"images"`
// ReclaimableBytes Layers freed, each once, none a kept image uses
ReclaimableBytes int64 `json:"reclaimable_bytes"`
// RepoCount Every repo with candidates
RepoCount int `json:"repo_count"`
// Repos Repos with candidates, most reclaimable first, capped by limit
Repos []CleanupRepo `json:"repos"`
Scope CleanupScope `json:"scope"`
// Size Sizes the manifests state, a shared layer counted per image
Size int64 `json:"size"`
// Total Candidates: manifests or whole indexes
Total int `json:"total"`
Where string `json:"where"`
}
Cleanup Deletion candidates and what deleting them frees
type CleanupCandidate ¶ added in v0.3.0
type CleanupCandidate struct {
Digest string `json:"digest"`
// ExclusiveBytes Freed by deleting this candidate alone
ExclusiveBytes int64 `json:"exclusive_bytes"`
Images int `json:"images"`
LastPulledDays *int `json:"last_pulled_days"`
PushedDays *int `json:"pushed_days"`
Reason string `json:"reason"`
Repo string `json:"repo"`
Size int64 `json:"size"`
Verdict string `json:"verdict"`
}
CleanupCandidate A manifest or index that can be deleted
type CleanupRepo ¶ added in v0.3.0
type CleanupRepo struct {
Candidates int `json:"candidates"`
ReclaimableBytes int64 `json:"reclaimable_bytes"`
Repo string `json:"repo"`
Size int64 `json:"size"`
}
CleanupRepo Candidates of one repo
type CleanupScope ¶ added in v0.3.0
type CleanupScope string
CleanupScope defines model for Cleanup.Scope.
const ( CleanupScopeRegistry CleanupScope = "registry" CleanupScopeRepo CleanupScope = "repo" )
Defines values for CleanupScope.
func (CleanupScope) Valid ¶ added in v0.3.0
func (e CleanupScope) Valid() bool
Valid indicates whether the value is a known member of the CleanupScope enum.
type Client ¶
type Client struct {
// The endpoint of the server conforming to this interface, with scheme,
// https://api.deepmap.com for example. This can contain a path relative
// to the server, such as https://api.deepmap.com/dev-test, and all the
// paths in the swagger spec will be appended to the server.
Server string
// Doer for performing requests, typically a *http.Client with any
// customized settings, such as certificate chains.
Client HttpRequestDoer
// A list of callbacks for modifying requests which are generated before sending over
// the network.
RequestEditors []RequestEditorFn
}
Client which conforms to the OpenAPI3 specification for this service.
func NewClient ¶
func NewClient(server string, opts ...ClientOption) (*Client, error)
Creates a new Client, with reasonable defaults
func (*Client) GetAncestry ¶
func (c *Client) GetAncestry(ctx context.Context, params *GetAncestryParams, reqEditors ...RequestEditorFn) (*http.Response, error)
GetAncestry Walk an image's ancestry to its root base
Corresponds with GET /v1/ancestry (the `GetAncestry` operationId).
func (*Client) GetCleanup ¶ added in v0.3.0
func (c *Client) GetCleanup(ctx context.Context, params *GetCleanupParams, reqEditors ...RequestEditorFn) (*http.Response, error)
GetCleanup Images safe to delete and the storage deleting them frees
Deletion candidates: images matching `where` (abandoned ones by default), whole multi-platform indexes only, leaving out any a kept image is built on. `reclaimable_bytes` counts each layer once and only when no kept image uses it. `format=csv` exports every candidate.
Corresponds with GET /v1/cleanup (the `GetCleanup` operationId).
func (*Client) GetDescendants ¶
func (c *Client) GetDescendants(ctx context.Context, params *GetDescendantsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
GetDescendants Find everything built on a base
Corresponds with GET /v1/descendants (the `GetDescendants` operationId).
func (*Client) GetHealth ¶
func (c *Client) GetHealth(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
GetHealth Report server health and index size
Corresponds with GET /v1/healthz (the `GetHealth` operationId).
func (*Client) GetImage ¶
func (c *Client) GetImage(ctx context.Context, digest string, params *GetImageParams, reqEditors ...RequestEditorFn) (*http.Response, error)
GetImage Explain one image
Labels, config, layers, referrers, lineage with provenance and the staleness verdict with reasons.
Corresponds with GET /v1/images/{digest} (the `GetImage` operationId).
func (*Client) GetLifecycles ¶ added in v0.3.0
func (c *Client) GetLifecycles(ctx context.Context, params *GetLifecyclesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
GetLifecycles ECR lifecycle policies that expire what strata calls abandoned
One policy per repo expiring untagged images pushed more than the staleness policy's abandoned window ago, checked against the index. A repo where the rule would expire an image strata keeps gets no policy unless `include_conflicts` is set.
Corresponds with GET /v1/cleanup/lifecycle (the `GetLifecycles` operationId).
func (*Client) GetMap ¶
func (c *Client) GetMap(ctx context.Context, params *GetMapParams, reqEditors ...RequestEditorFn) (*http.Response, error)
GetMap Aggregated registry map
Root bases and up to three levels below them, leaf images grouped by repo, capped to stay drawable at any registry size.
Corresponds with GET /v1/map (the `GetMap` operationId).
func (*Client) GetOutline ¶
func (c *Client) GetOutline(ctx context.Context, params *GetOutlineParams, reqEditors ...RequestEditorFn) (*http.Response, error)
GetOutline One level of the lineage outline
Children of an outline node. With no parent, the root bases. Children with descendants come back as base rows; leaf images are grouped into one row per repo, and a repo row's children are its images, paged.
Corresponds with GET /v1/outline (the `GetOutline` operationId).
func (*Client) GetOverview ¶
func (c *Client) GetOverview(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
GetOverview Registry overview for the web UI
Headline counts, the staleness mix, the root bases holding the most stale images, and changes in the last week.
Corresponds with GET /v1/overview (the `GetOverview` operationId).
func (*Client) GetQueryGraph ¶
func (c *Client) GetQueryGraph(ctx context.Context, params *GetQueryGraphParams, reqEditors ...RequestEditorFn) (*http.Response, error)
GetQueryGraph Draw the images a filter matches plus their ancestry
Corresponds with GET /v1/query/graph (the `GetQueryGraph` operationId).
func (*Client) GetRoots ¶
func (c *Client) GetRoots(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
GetRoots List root bases and their descendant counts
Corresponds with GET /v1/roots (the `GetRoots` operationId).
func (*Client) GetStale ¶
func (c *Client) GetStale(ctx context.Context, params *GetStaleParams, reqEditors ...RequestEditorFn) (*http.Response, error)
GetStale Report the staleness mix
Corresponds with GET /v1/stale (the `GetStale` operationId).
func (*Client) GetStatus ¶ added in v0.2.0
func (c *Client) GetStatus(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
GetStatus Progress of the running index
Whether `strata serve` is crawling, how far it has got, and when the views were last refreshed. While a long crawl runs, the other UI endpoints answer from what is indexed so far.
Corresponds with GET /v1/status (the `GetStatus` operationId).
func (*Client) GetSummary ¶
func (c *Client) GetSummary(ctx context.Context, params *GetSummaryParams, reqEditors ...RequestEditorFn) (*http.Response, error)
GetSummary Footprint summary of the registry
Corresponds with GET /v1/summary (the `GetSummary` operationId).
func (*Client) ResolveRef ¶
func (c *Client) ResolveRef(ctx context.Context, params *ResolveRefParams, reqEditors ...RequestEditorFn) (*http.Response, error)
ResolveRef Resolve a ref to a platform manifest digest
Corresponds with GET /v1/resolve (the `ResolveRef` operationId).
func (*Client) RunQuery ¶
func (c *Client) RunQuery(ctx context.Context, params *RunQueryParams, reqEditors ...RequestEditorFn) (*http.Response, error)
RunQuery Filter images with the query language
Corresponds with GET /v1/query (the `RunQuery` operationId).
func (*Client) Search ¶
func (c *Client) Search(ctx context.Context, params *SearchParams, reqEditors ...RequestEditorFn) (*http.Response, error)
Search Filter images with facet counts
Runs a filter, applies the selected facet values, and returns one page of images plus counts for every facet. Each facet's counts apply every selection except its own, so choosing a value never hides the others.
Corresponds with GET /v1/search (the `Search` operationId).
type ClientInterface ¶
type ClientInterface interface {
// GetAncestry Walk an image's ancestry to its root base
//
// Corresponds with GET /v1/ancestry (the `GetAncestry` operationId).
GetAncestry(ctx context.Context, params *GetAncestryParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetCleanup Images safe to delete and the storage deleting them frees
//
// Deletion candidates: images matching `where` (abandoned ones by
// default), whole multi-platform indexes only, leaving out any a kept
// image is built on. `reclaimable_bytes` counts each layer once and
// only when no kept image uses it. `format=csv` exports every
// candidate.
//
// Corresponds with GET /v1/cleanup (the `GetCleanup` operationId).
GetCleanup(ctx context.Context, params *GetCleanupParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetLifecycles ECR lifecycle policies that expire what strata calls abandoned
//
// One policy per repo expiring untagged images pushed more than the
// staleness policy's abandoned window ago, checked against the index.
// A repo where the rule would expire an image strata keeps gets no
// policy unless `include_conflicts` is set.
//
// Corresponds with GET /v1/cleanup/lifecycle (the `GetLifecycles` operationId).
GetLifecycles(ctx context.Context, params *GetLifecyclesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetDescendants Find everything built on a base
//
// Corresponds with GET /v1/descendants (the `GetDescendants` operationId).
GetDescendants(ctx context.Context, params *GetDescendantsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetHealth Report server health and index size
//
// Corresponds with GET /v1/healthz (the `GetHealth` operationId).
GetHealth(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetImage Explain one image
//
// Labels, config, layers, referrers, lineage with provenance and the staleness verdict with reasons.
//
// Corresponds with GET /v1/images/{digest} (the `GetImage` operationId).
GetImage(ctx context.Context, digest string, params *GetImageParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetMap Aggregated registry map
//
// Root bases and up to three levels below them, leaf images grouped by repo, capped to stay drawable at any registry size.
//
// Corresponds with GET /v1/map (the `GetMap` operationId).
GetMap(ctx context.Context, params *GetMapParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetOutline One level of the lineage outline
//
// Children of an outline node. With no parent, the root bases. Children
// with descendants come back as base rows; leaf images are grouped into
// one row per repo, and a repo row's children are its images, paged.
//
// Corresponds with GET /v1/outline (the `GetOutline` operationId).
GetOutline(ctx context.Context, params *GetOutlineParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetOverview Registry overview for the web UI
//
// Headline counts, the staleness mix, the root bases holding the most stale images, and changes in the last week.
//
// Corresponds with GET /v1/overview (the `GetOverview` operationId).
GetOverview(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// RunQuery Filter images with the query language
//
// Corresponds with GET /v1/query (the `RunQuery` operationId).
RunQuery(ctx context.Context, params *RunQueryParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetQueryGraph Draw the images a filter matches plus their ancestry
//
// Corresponds with GET /v1/query/graph (the `GetQueryGraph` operationId).
GetQueryGraph(ctx context.Context, params *GetQueryGraphParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// ResolveRef Resolve a ref to a platform manifest digest
//
// Corresponds with GET /v1/resolve (the `ResolveRef` operationId).
ResolveRef(ctx context.Context, params *ResolveRefParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetRoots List root bases and their descendant counts
//
// Corresponds with GET /v1/roots (the `GetRoots` operationId).
GetRoots(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// Search Filter images with facet counts
//
// Runs a filter, applies the selected facet values, and returns one page
// of images plus counts for every facet. Each facet's counts apply every
// selection except its own, so choosing a value never hides the others.
//
// Corresponds with GET /v1/search (the `Search` operationId).
Search(ctx context.Context, params *SearchParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetStale Report the staleness mix
//
// Corresponds with GET /v1/stale (the `GetStale` operationId).
GetStale(ctx context.Context, params *GetStaleParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetStatus Progress of the running index
//
// Whether `strata serve` is crawling, how far it has got, and when the
// views were last refreshed. While a long crawl runs, the other UI
// endpoints answer from what is indexed so far.
//
// Corresponds with GET /v1/status (the `GetStatus` operationId).
GetStatus(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetSummary Footprint summary of the registry
//
// Corresponds with GET /v1/summary (the `GetSummary` operationId).
GetSummary(ctx context.Context, params *GetSummaryParams, reqEditors ...RequestEditorFn) (*http.Response, error)
}
The interface specification for the client above.
type ClientOption ¶
ClientOption allows setting custom parameters during construction
func WithHTTPClient ¶
func WithHTTPClient(doer HttpRequestDoer) ClientOption
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
func WithRequestEditorFn ¶
func WithRequestEditorFn(fn RequestEditorFn) ClientOption
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
ClientWithResponses builds on ClientInterface to offer response payloads
func NewClientWithResponses ¶
func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) GetAncestryWithResponse ¶
func (c *ClientWithResponses) GetAncestryWithResponse(ctx context.Context, params *GetAncestryParams, reqEditors ...RequestEditorFn) (*GetAncestryResponse, error)
GetAncestryWithResponse Walk an image's ancestry to its root base
Returns a wrapper object for the known response body format(s).
Corresponds with GET /v1/ancestry (the `GetAncestry` operationId).
func (*ClientWithResponses) GetCleanupWithResponse ¶ added in v0.3.0
func (c *ClientWithResponses) GetCleanupWithResponse(ctx context.Context, params *GetCleanupParams, reqEditors ...RequestEditorFn) (*GetCleanupResponse, error)
GetCleanupWithResponse Images safe to delete and the storage deleting them frees
Deletion candidates: images matching `where` (abandoned ones by default), whole multi-platform indexes only, leaving out any a kept image is built on. `reclaimable_bytes` counts each layer once and only when no kept image uses it. `format=csv` exports every candidate.
Returns a wrapper object for the known response body format(s).
Corresponds with GET /v1/cleanup (the `GetCleanup` operationId).
func (*ClientWithResponses) GetDescendantsWithResponse ¶
func (c *ClientWithResponses) GetDescendantsWithResponse(ctx context.Context, params *GetDescendantsParams, reqEditors ...RequestEditorFn) (*GetDescendantsResponse, error)
GetDescendantsWithResponse Find everything built on a base
Returns a wrapper object for the known response body format(s).
Corresponds with GET /v1/descendants (the `GetDescendants` operationId).
func (*ClientWithResponses) GetHealthWithResponse ¶
func (c *ClientWithResponses) GetHealthWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetHealthResponse, error)
GetHealthWithResponse Report server health and index size
Returns a wrapper object for the known response body format(s).
Corresponds with GET /v1/healthz (the `GetHealth` operationId).
func (*ClientWithResponses) GetImageWithResponse ¶
func (c *ClientWithResponses) GetImageWithResponse(ctx context.Context, digest string, params *GetImageParams, reqEditors ...RequestEditorFn) (*GetImageResponse, error)
GetImageWithResponse Explain one image
Labels, config, layers, referrers, lineage with provenance and the staleness verdict with reasons.
Returns a wrapper object for the known response body format(s).
Corresponds with GET /v1/images/{digest} (the `GetImage` operationId).
func (*ClientWithResponses) GetLifecyclesWithResponse ¶ added in v0.3.0
func (c *ClientWithResponses) GetLifecyclesWithResponse(ctx context.Context, params *GetLifecyclesParams, reqEditors ...RequestEditorFn) (*GetLifecyclesResponse, error)
GetLifecyclesWithResponse ECR lifecycle policies that expire what strata calls abandoned
One policy per repo expiring untagged images pushed more than the staleness policy's abandoned window ago, checked against the index. A repo where the rule would expire an image strata keeps gets no policy unless `include_conflicts` is set.
Returns a wrapper object for the known response body format(s).
Corresponds with GET /v1/cleanup/lifecycle (the `GetLifecycles` operationId).
func (*ClientWithResponses) GetMapWithResponse ¶
func (c *ClientWithResponses) GetMapWithResponse(ctx context.Context, params *GetMapParams, reqEditors ...RequestEditorFn) (*GetMapResponse, error)
GetMapWithResponse Aggregated registry map
Root bases and up to three levels below them, leaf images grouped by repo, capped to stay drawable at any registry size.
Returns a wrapper object for the known response body format(s).
Corresponds with GET /v1/map (the `GetMap` operationId).
func (*ClientWithResponses) GetOutlineWithResponse ¶
func (c *ClientWithResponses) GetOutlineWithResponse(ctx context.Context, params *GetOutlineParams, reqEditors ...RequestEditorFn) (*GetOutlineResponse, error)
GetOutlineWithResponse One level of the lineage outline
Children of an outline node. With no parent, the root bases. Children with descendants come back as base rows; leaf images are grouped into one row per repo, and a repo row's children are its images, paged.
Returns a wrapper object for the known response body format(s).
Corresponds with GET /v1/outline (the `GetOutline` operationId).
func (*ClientWithResponses) GetOverviewWithResponse ¶
func (c *ClientWithResponses) GetOverviewWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetOverviewResponse, error)
GetOverviewWithResponse Registry overview for the web UI
Headline counts, the staleness mix, the root bases holding the most stale images, and changes in the last week.
Returns a wrapper object for the known response body format(s).
Corresponds with GET /v1/overview (the `GetOverview` operationId).
func (*ClientWithResponses) GetQueryGraphWithResponse ¶
func (c *ClientWithResponses) GetQueryGraphWithResponse(ctx context.Context, params *GetQueryGraphParams, reqEditors ...RequestEditorFn) (*GetQueryGraphResponse, error)
GetQueryGraphWithResponse Draw the images a filter matches plus their ancestry
Returns a wrapper object for the known response body format(s).
Corresponds with GET /v1/query/graph (the `GetQueryGraph` operationId).
func (*ClientWithResponses) GetRootsWithResponse ¶
func (c *ClientWithResponses) GetRootsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetRootsResponse, error)
GetRootsWithResponse List root bases and their descendant counts
Returns a wrapper object for the known response body format(s).
Corresponds with GET /v1/roots (the `GetRoots` operationId).
func (*ClientWithResponses) GetStaleWithResponse ¶
func (c *ClientWithResponses) GetStaleWithResponse(ctx context.Context, params *GetStaleParams, reqEditors ...RequestEditorFn) (*GetStaleResponse, error)
GetStaleWithResponse Report the staleness mix
Returns a wrapper object for the known response body format(s).
Corresponds with GET /v1/stale (the `GetStale` operationId).
func (*ClientWithResponses) GetStatusWithResponse ¶ added in v0.2.0
func (c *ClientWithResponses) GetStatusWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetStatusResponse, error)
GetStatusWithResponse Progress of the running index
Whether `strata serve` is crawling, how far it has got, and when the views were last refreshed. While a long crawl runs, the other UI endpoints answer from what is indexed so far.
Returns a wrapper object for the known response body format(s).
Corresponds with GET /v1/status (the `GetStatus` operationId).
func (*ClientWithResponses) GetSummaryWithResponse ¶
func (c *ClientWithResponses) GetSummaryWithResponse(ctx context.Context, params *GetSummaryParams, reqEditors ...RequestEditorFn) (*GetSummaryResponse, error)
GetSummaryWithResponse Footprint summary of the registry
Returns a wrapper object for the known response body format(s).
Corresponds with GET /v1/summary (the `GetSummary` operationId).
func (*ClientWithResponses) ResolveRefWithResponse ¶
func (c *ClientWithResponses) ResolveRefWithResponse(ctx context.Context, params *ResolveRefParams, reqEditors ...RequestEditorFn) (*ResolveRefResponse, error)
ResolveRefWithResponse Resolve a ref to a platform manifest digest
Returns a wrapper object for the known response body format(s).
Corresponds with GET /v1/resolve (the `ResolveRef` operationId).
func (*ClientWithResponses) RunQueryWithResponse ¶
func (c *ClientWithResponses) RunQueryWithResponse(ctx context.Context, params *RunQueryParams, reqEditors ...RequestEditorFn) (*RunQueryResponse, error)
RunQueryWithResponse Filter images with the query language
Returns a wrapper object for the known response body format(s).
Corresponds with GET /v1/query (the `RunQuery` operationId).
func (*ClientWithResponses) SearchWithResponse ¶
func (c *ClientWithResponses) SearchWithResponse(ctx context.Context, params *SearchParams, reqEditors ...RequestEditorFn) (*SearchResponse, error)
SearchWithResponse Filter images with facet counts
Runs a filter, applies the selected facet values, and returns one page of images plus counts for every facet. Each facet's counts apply every selection except its own, so choosing a value never hides the others.
Returns a wrapper object for the known response body format(s).
Corresponds with GET /v1/search (the `Search` operationId).
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// GetAncestryWithResponse Walk an image's ancestry to its root base
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /v1/ancestry (the `GetAncestry` operationId).
GetAncestryWithResponse(ctx context.Context, params *GetAncestryParams, reqEditors ...RequestEditorFn) (*GetAncestryResponse, error)
// GetCleanupWithResponse Images safe to delete and the storage deleting them frees
//
// Deletion candidates: images matching `where` (abandoned ones by
// default), whole multi-platform indexes only, leaving out any a kept
// image is built on. `reclaimable_bytes` counts each layer once and
// only when no kept image uses it. `format=csv` exports every
// candidate.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /v1/cleanup (the `GetCleanup` operationId).
GetCleanupWithResponse(ctx context.Context, params *GetCleanupParams, reqEditors ...RequestEditorFn) (*GetCleanupResponse, error)
// GetLifecyclesWithResponse ECR lifecycle policies that expire what strata calls abandoned
//
// One policy per repo expiring untagged images pushed more than the
// staleness policy's abandoned window ago, checked against the index.
// A repo where the rule would expire an image strata keeps gets no
// policy unless `include_conflicts` is set.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /v1/cleanup/lifecycle (the `GetLifecycles` operationId).
GetLifecyclesWithResponse(ctx context.Context, params *GetLifecyclesParams, reqEditors ...RequestEditorFn) (*GetLifecyclesResponse, error)
// GetDescendantsWithResponse Find everything built on a base
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /v1/descendants (the `GetDescendants` operationId).
GetDescendantsWithResponse(ctx context.Context, params *GetDescendantsParams, reqEditors ...RequestEditorFn) (*GetDescendantsResponse, error)
// GetHealthWithResponse Report server health and index size
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /v1/healthz (the `GetHealth` operationId).
GetHealthWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetHealthResponse, error)
// GetImageWithResponse Explain one image
//
// Labels, config, layers, referrers, lineage with provenance and the staleness verdict with reasons.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /v1/images/{digest} (the `GetImage` operationId).
GetImageWithResponse(ctx context.Context, digest string, params *GetImageParams, reqEditors ...RequestEditorFn) (*GetImageResponse, error)
// GetMapWithResponse Aggregated registry map
//
// Root bases and up to three levels below them, leaf images grouped by repo, capped to stay drawable at any registry size.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /v1/map (the `GetMap` operationId).
GetMapWithResponse(ctx context.Context, params *GetMapParams, reqEditors ...RequestEditorFn) (*GetMapResponse, error)
// GetOutlineWithResponse One level of the lineage outline
//
// Children of an outline node. With no parent, the root bases. Children
// with descendants come back as base rows; leaf images are grouped into
// one row per repo, and a repo row's children are its images, paged.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /v1/outline (the `GetOutline` operationId).
GetOutlineWithResponse(ctx context.Context, params *GetOutlineParams, reqEditors ...RequestEditorFn) (*GetOutlineResponse, error)
// GetOverviewWithResponse Registry overview for the web UI
//
// Headline counts, the staleness mix, the root bases holding the most stale images, and changes in the last week.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /v1/overview (the `GetOverview` operationId).
GetOverviewWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetOverviewResponse, error)
// RunQueryWithResponse Filter images with the query language
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /v1/query (the `RunQuery` operationId).
RunQueryWithResponse(ctx context.Context, params *RunQueryParams, reqEditors ...RequestEditorFn) (*RunQueryResponse, error)
// GetQueryGraphWithResponse Draw the images a filter matches plus their ancestry
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /v1/query/graph (the `GetQueryGraph` operationId).
GetQueryGraphWithResponse(ctx context.Context, params *GetQueryGraphParams, reqEditors ...RequestEditorFn) (*GetQueryGraphResponse, error)
// ResolveRefWithResponse Resolve a ref to a platform manifest digest
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /v1/resolve (the `ResolveRef` operationId).
ResolveRefWithResponse(ctx context.Context, params *ResolveRefParams, reqEditors ...RequestEditorFn) (*ResolveRefResponse, error)
// GetRootsWithResponse List root bases and their descendant counts
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /v1/roots (the `GetRoots` operationId).
GetRootsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetRootsResponse, error)
// SearchWithResponse Filter images with facet counts
//
// Runs a filter, applies the selected facet values, and returns one page
// of images plus counts for every facet. Each facet's counts apply every
// selection except its own, so choosing a value never hides the others.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /v1/search (the `Search` operationId).
SearchWithResponse(ctx context.Context, params *SearchParams, reqEditors ...RequestEditorFn) (*SearchResponse, error)
// GetStaleWithResponse Report the staleness mix
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /v1/stale (the `GetStale` operationId).
GetStaleWithResponse(ctx context.Context, params *GetStaleParams, reqEditors ...RequestEditorFn) (*GetStaleResponse, error)
// GetStatusWithResponse Progress of the running index
//
// Whether `strata serve` is crawling, how far it has got, and when the
// views were last refreshed. While a long crawl runs, the other UI
// endpoints answer from what is indexed so far.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /v1/status (the `GetStatus` operationId).
GetStatusWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetStatusResponse, error)
// GetSummaryWithResponse Footprint summary of the registry
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /v1/summary (the `GetSummary` operationId).
GetSummaryWithResponse(ctx context.Context, params *GetSummaryParams, reqEditors ...RequestEditorFn) (*GetSummaryResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type ConfigInfo ¶
type ConfigInfo struct {
Cmd []string `json:"cmd"`
Entrypoint []string `json:"entrypoint"`
EnvKeys []string `json:"env_keys"`
EnvValues *map[string]string `json:"env_values,omitempty"`
Healthcheck bool `json:"healthcheck"`
Ports []string `json:"ports"`
StopSignal string `json:"stop_signal"`
User string `json:"user"`
Workdir string `json:"workdir"`
}
ConfigInfo Run-time fields from the image config; environment values are never stored except allowlisted ones
type CrawlStats ¶ added in v0.2.0
type CrawlStats struct {
// BasesFetched Bases fetched by digest because provenance named them
BasesFetched *int64 `json:"bases_fetched,omitempty"`
// BasesMissing Bases provenance named that could not be fetched
BasesMissing *int64 `json:"bases_missing,omitempty"`
ImagesFiltered int64 `json:"images_filtered"`
NewImages int64 `json:"new_images"`
// ProvenanceBackfilled Already indexed images whose provenance this crawl read
ProvenanceBackfilled *int64 `json:"provenance_backfilled,omitempty"`
Referrers int64 `json:"referrers"`
// Repos Repos crawled so far
Repos int64 `json:"repos"`
ReposFiltered int64 `json:"repos_filtered"`
// ReposResumed Repos an earlier run already finished
ReposResumed int64 `json:"repos_resumed"`
// ReposTotal Repos this crawl visits, once listed
ReposTotal int64 `json:"repos_total"`
Requests int64 `json:"requests"`
TagMoves int64 `json:"tag_moves"`
Tags int64 `json:"tags"`
TagsFiltered int64 `json:"tags_filtered"`
}
CrawlStats Running totals of a crawl
type DescendantResult ¶
type DescendantResult struct {
// Graph A lineage graph: an ancestry chain, a descendant tree, a query graph or the registry map
Graph Graph `json:"graph"`
Images int `json:"images"`
Versions []BaseVersion `json:"versions"`
}
DescendantResult A descendant graph and the base versions it starts from
type Edge ¶
type Edge struct {
Child string `json:"child"`
Confidence *EdgeConfidence `json:"confidence,omitempty"`
Conflict *bool `json:"conflict,omitempty"`
Parent string `json:"parent"`
Source EdgeSource `json:"source"`
}
Edge A child-to-parent lineage edge with how it was found
type EdgeConfidence ¶
type EdgeConfidence string
EdgeConfidence defines model for Edge.Confidence.
const ( EdgeConfidenceDeclared EdgeConfidence = "declared" EdgeConfidenceExact EdgeConfidence = "exact" EdgeConfidenceInferred EdgeConfidence = "inferred" )
Defines values for EdgeConfidence.
func (EdgeConfidence) Valid ¶
func (e EdgeConfidence) Valid() bool
Valid indicates whether the value is a known member of the EdgeConfidence enum.
type EdgeSource ¶
type EdgeSource string
EdgeSource defines model for Edge.Source.
const ( EdgeSourceAnnotation EdgeSource = "annotation" EdgeSourceAttestation EdgeSource = "attestation" EdgeSourceLabel EdgeSource = "label" EdgeSourceLayers EdgeSource = "layers" )
Defines values for EdgeSource.
func (EdgeSource) Valid ¶
func (e EdgeSource) Valid() bool
Valid indicates whether the value is a known member of the EdgeSource enum.
type Explanation ¶
type Explanation struct {
Findings []string `json:"findings"`
History *[]HistoryEntry `json:"history,omitempty"`
// Image What the index knows about one image
Image ImageInfo `json:"image"`
Layers []LayerInfo `json:"layers"`
// Lineage Where an image sits in the lineage graph, with the evidence for its parent
Lineage LineageInfo `json:"lineage"`
Referrers []Referrer `json:"referrers"`
// Staleness A staleness verdict with the reasons behind it
Staleness StalenessInfo `json:"staleness"`
}
Explanation Everything known about one image
type Facet ¶
type Facet struct {
// Field The query-language field the facet filters
Field string `json:"field"`
Name string `json:"name"`
Values []FacetValue `json:"values"`
}
Facet A field the search can be narrowed by
type FacetValue ¶
type FacetValue struct {
Count int64 `json:"count"`
Selected bool `json:"selected"`
Value string `json:"value"`
}
FacetValue One value of a facet and how many images have it
type GetAncestryParams ¶
type GetAncestryParams struct {
// Ref repo:tag, repo@digest, a digest or a digest prefix
Ref Ref `form:"ref" json:"ref"`
// Platform Platform to pick when the ref names a multi-platform index, such as linux/arm64
Platform *Platform `form:"platform,omitempty" json:"platform,omitempty"`
}
GetAncestryParams defines parameters for GetAncestry.
type GetAncestryResponse ¶
type GetAncestryResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Graph
// JSON404 the response for an HTTP 404 `application/json` response
JSON404 *NotFound
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Error
}
func ParseGetAncestryResponse ¶
func ParseGetAncestryResponse(rsp *http.Response) (*GetAncestryResponse, error)
ParseGetAncestryResponse parses an HTTP response from a GetAncestryWithResponse call
func (GetAncestryResponse) ContentType ¶
func (r GetAncestryResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetAncestryResponse) GetBody ¶
func (r GetAncestryResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetAncestryResponse) GetJSON200 ¶
func (r GetAncestryResponse) GetJSON200() *Graph
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetAncestryResponse) GetJSON404 ¶
func (r GetAncestryResponse) GetJSON404() *NotFound
GetJSON404 returns the response for an HTTP 404 `application/json` response
func (GetAncestryResponse) GetJSONDefault ¶
func (r GetAncestryResponse) GetJSONDefault() *Error
GetJSONDefault returns the response for an HTTP default `application/json` response
func (GetAncestryResponse) Status ¶
func (r GetAncestryResponse) Status() string
Status returns HTTPResponse.Status
func (GetAncestryResponse) StatusCode ¶
func (r GetAncestryResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetCleanupParams ¶ added in v0.3.0
type GetCleanupParams struct {
// Where Select candidates with the query language; empty means stale = "abandoned"
Where *string `form:"where,omitempty" json:"where,omitempty"`
// Scope Count a layer as freed when no kept image in the registry, or in the same repo, uses it
Scope *GetCleanupParamsScope `form:"scope,omitempty" json:"scope,omitempty"`
// Limit Most candidates and repos to list, largest first; totals count them all. 0 lists all.
Limit *int `form:"limit,omitempty" json:"limit,omitempty"`
// Format json, or csv to export every candidate
Format *GetCleanupParamsFormat `form:"format,omitempty" json:"format,omitempty"`
}
GetCleanupParams defines parameters for GetCleanup.
type GetCleanupParamsFormat ¶ added in v0.3.0
type GetCleanupParamsFormat string
GetCleanupParamsFormat defines parameters for GetCleanup.
const ( Csv GetCleanupParamsFormat = "csv" Json GetCleanupParamsFormat = "json" )
Defines values for GetCleanupParamsFormat.
func (GetCleanupParamsFormat) Valid ¶ added in v0.3.0
func (e GetCleanupParamsFormat) Valid() bool
Valid indicates whether the value is a known member of the GetCleanupParamsFormat enum.
type GetCleanupParamsScope ¶ added in v0.3.0
type GetCleanupParamsScope string
GetCleanupParamsScope defines parameters for GetCleanup.
const ( GetCleanupParamsScopeRegistry GetCleanupParamsScope = "registry" GetCleanupParamsScopeRepo GetCleanupParamsScope = "repo" )
Defines values for GetCleanupParamsScope.
func (GetCleanupParamsScope) Valid ¶ added in v0.3.0
func (e GetCleanupParamsScope) Valid() bool
Valid indicates whether the value is a known member of the GetCleanupParamsScope enum.
type GetCleanupResponse ¶ added in v0.3.0
type GetCleanupResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Cleanup
// JSON400 the response for an HTTP 400 `application/json` response
JSON400 *BadRequest
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Error
}
func ParseGetCleanupResponse ¶ added in v0.3.0
func ParseGetCleanupResponse(rsp *http.Response) (*GetCleanupResponse, error)
ParseGetCleanupResponse parses an HTTP response from a GetCleanupWithResponse call
func (GetCleanupResponse) ContentType ¶ added in v0.3.0
func (r GetCleanupResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetCleanupResponse) GetBody ¶ added in v0.3.0
func (r GetCleanupResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetCleanupResponse) GetJSON200 ¶ added in v0.3.0
func (r GetCleanupResponse) GetJSON200() *Cleanup
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetCleanupResponse) GetJSON400 ¶ added in v0.3.0
func (r GetCleanupResponse) GetJSON400() *BadRequest
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (GetCleanupResponse) GetJSONDefault ¶ added in v0.3.0
func (r GetCleanupResponse) GetJSONDefault() *Error
GetJSONDefault returns the response for an HTTP default `application/json` response
func (GetCleanupResponse) Status ¶ added in v0.3.0
func (r GetCleanupResponse) Status() string
Status returns HTTPResponse.Status
func (GetCleanupResponse) StatusCode ¶ added in v0.3.0
func (r GetCleanupResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetDescendantsParams ¶
type GetDescendantsParams struct {
// Ref repo:tag, repo@digest, a digest or a digest prefix
Ref Ref `form:"ref" json:"ref"`
// Platform Platform to pick when the ref names a multi-platform index, such as linux/arm64
Platform *Platform `form:"platform,omitempty" json:"platform,omitempty"`
// Depth Levels below the base; 0 means the whole subtree
Depth *int `form:"depth,omitempty" json:"depth,omitempty"`
// AllVersions Match every digest the base tag has held
AllVersions *bool `form:"all_versions,omitempty" json:"all_versions,omitempty"`
// Budget Maximum graph nodes
Budget *Budget `form:"budget,omitempty" json:"budget,omitempty"`
}
GetDescendantsParams defines parameters for GetDescendants.
type GetDescendantsResponse ¶
type GetDescendantsResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *DescendantResult
// JSON404 the response for an HTTP 404 `application/json` response
JSON404 *NotFound
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Error
}
func ParseGetDescendantsResponse ¶
func ParseGetDescendantsResponse(rsp *http.Response) (*GetDescendantsResponse, error)
ParseGetDescendantsResponse parses an HTTP response from a GetDescendantsWithResponse call
func (GetDescendantsResponse) ContentType ¶
func (r GetDescendantsResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetDescendantsResponse) GetBody ¶
func (r GetDescendantsResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetDescendantsResponse) GetJSON200 ¶
func (r GetDescendantsResponse) GetJSON200() *DescendantResult
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetDescendantsResponse) GetJSON404 ¶
func (r GetDescendantsResponse) GetJSON404() *NotFound
GetJSON404 returns the response for an HTTP 404 `application/json` response
func (GetDescendantsResponse) GetJSONDefault ¶
func (r GetDescendantsResponse) GetJSONDefault() *Error
GetJSONDefault returns the response for an HTTP default `application/json` response
func (GetDescendantsResponse) Status ¶
func (r GetDescendantsResponse) Status() string
Status returns HTTPResponse.Status
func (GetDescendantsResponse) StatusCode ¶
func (r GetDescendantsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetHealthResponse ¶
type GetHealthResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Health
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Error
}
func ParseGetHealthResponse ¶
func ParseGetHealthResponse(rsp *http.Response) (*GetHealthResponse, error)
ParseGetHealthResponse parses an HTTP response from a GetHealthWithResponse call
func (GetHealthResponse) ContentType ¶
func (r GetHealthResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetHealthResponse) GetBody ¶
func (r GetHealthResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetHealthResponse) GetJSON200 ¶
func (r GetHealthResponse) GetJSON200() *Health
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetHealthResponse) GetJSONDefault ¶
func (r GetHealthResponse) GetJSONDefault() *Error
GetJSONDefault returns the response for an HTTP default `application/json` response
func (GetHealthResponse) Status ¶
func (r GetHealthResponse) Status() string
Status returns HTTPResponse.Status
func (GetHealthResponse) StatusCode ¶
func (r GetHealthResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetImageParams ¶
type GetImageParams struct {
// History Include the build steps from the config history
History *bool `form:"history,omitempty" json:"history,omitempty"`
}
GetImageParams defines parameters for GetImage.
type GetImageResponse ¶
type GetImageResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Explanation
// JSON404 the response for an HTTP 404 `application/json` response
JSON404 *NotFound
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Error
}
func ParseGetImageResponse ¶
func ParseGetImageResponse(rsp *http.Response) (*GetImageResponse, error)
ParseGetImageResponse parses an HTTP response from a GetImageWithResponse call
func (GetImageResponse) ContentType ¶
func (r GetImageResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetImageResponse) GetBody ¶
func (r GetImageResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetImageResponse) GetJSON200 ¶
func (r GetImageResponse) GetJSON200() *Explanation
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetImageResponse) GetJSON404 ¶
func (r GetImageResponse) GetJSON404() *NotFound
GetJSON404 returns the response for an HTTP 404 `application/json` response
func (GetImageResponse) GetJSONDefault ¶
func (r GetImageResponse) GetJSONDefault() *Error
GetJSONDefault returns the response for an HTTP default `application/json` response
func (GetImageResponse) Status ¶
func (r GetImageResponse) Status() string
Status returns HTTPResponse.Status
func (GetImageResponse) StatusCode ¶
func (r GetImageResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetLifecyclesParams ¶ added in v0.3.0
type GetLifecyclesParams struct {
// Repo Only repos matching these globs, with the host
Repo *[]string `form:"repo,omitempty" json:"repo,omitempty"`
// Days Expire untagged images pushed more than this many days ago; 0 uses the policy
Days *int `form:"days,omitempty" json:"days,omitempty"`
// IncludeConflicts Write a repo's rule even when it would expire images strata keeps
IncludeConflicts *bool `form:"include_conflicts,omitempty" json:"include_conflicts,omitempty"`
}
GetLifecyclesParams defines parameters for GetLifecycles.
type GetLifecyclesResponse ¶ added in v0.3.0
type GetLifecyclesResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *[]Lifecycle
// JSON400 the response for an HTTP 400 `application/json` response
JSON400 *BadRequest
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Error
}
func ParseGetLifecyclesResponse ¶ added in v0.3.0
func ParseGetLifecyclesResponse(rsp *http.Response) (*GetLifecyclesResponse, error)
ParseGetLifecyclesResponse parses an HTTP response from a GetLifecyclesWithResponse call
func (GetLifecyclesResponse) ContentType ¶ added in v0.3.0
func (r GetLifecyclesResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetLifecyclesResponse) GetBody ¶ added in v0.3.0
func (r GetLifecyclesResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetLifecyclesResponse) GetJSON200 ¶ added in v0.3.0
func (r GetLifecyclesResponse) GetJSON200() *[]Lifecycle
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetLifecyclesResponse) GetJSON400 ¶ added in v0.3.0
func (r GetLifecyclesResponse) GetJSON400() *BadRequest
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (GetLifecyclesResponse) GetJSONDefault ¶ added in v0.3.0
func (r GetLifecyclesResponse) GetJSONDefault() *Error
GetJSONDefault returns the response for an HTTP default `application/json` response
func (GetLifecyclesResponse) Status ¶ added in v0.3.0
func (r GetLifecyclesResponse) Status() string
Status returns HTTPResponse.Status
func (GetLifecyclesResponse) StatusCode ¶ added in v0.3.0
func (r GetLifecyclesResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetMapParams ¶
type GetMapParams struct {
// Depth Levels below the roots
Depth *int `form:"depth,omitempty" json:"depth,omitempty"`
}
GetMapParams defines parameters for GetMap.
type GetMapResponse ¶
type GetMapResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *[]OutlineRow
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Error
}
func ParseGetMapResponse ¶
func ParseGetMapResponse(rsp *http.Response) (*GetMapResponse, error)
ParseGetMapResponse parses an HTTP response from a GetMapWithResponse call
func (GetMapResponse) ContentType ¶
func (r GetMapResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetMapResponse) GetBody ¶
func (r GetMapResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetMapResponse) GetJSON200 ¶
func (r GetMapResponse) GetJSON200() *[]OutlineRow
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetMapResponse) GetJSONDefault ¶
func (r GetMapResponse) GetJSONDefault() *Error
GetJSONDefault returns the response for an HTTP default `application/json` response
func (GetMapResponse) Status ¶
func (r GetMapResponse) Status() string
Status returns HTTPResponse.Status
func (GetMapResponse) StatusCode ¶
func (r GetMapResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetOutlineParams ¶
type GetOutlineParams struct {
// Parent Outline row id to expand; empty for the roots
Parent *string `form:"parent,omitempty" json:"parent,omitempty"`
// OnlyStale Only rows holding stale or abandoned images
OnlyStale *bool `form:"only_stale,omitempty" json:"only_stale,omitempty"`
// Offset Rows to skip
Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"`
// Limit Rows to return
Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"`
}
GetOutlineParams defines parameters for GetOutline.
type GetOutlineResponse ¶
type GetOutlineResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Outline
// JSON400 the response for an HTTP 400 `application/json` response
JSON400 *BadRequest
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Error
}
func ParseGetOutlineResponse ¶
func ParseGetOutlineResponse(rsp *http.Response) (*GetOutlineResponse, error)
ParseGetOutlineResponse parses an HTTP response from a GetOutlineWithResponse call
func (GetOutlineResponse) ContentType ¶
func (r GetOutlineResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetOutlineResponse) GetBody ¶
func (r GetOutlineResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetOutlineResponse) GetJSON200 ¶
func (r GetOutlineResponse) GetJSON200() *Outline
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetOutlineResponse) GetJSON400 ¶
func (r GetOutlineResponse) GetJSON400() *BadRequest
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (GetOutlineResponse) GetJSONDefault ¶
func (r GetOutlineResponse) GetJSONDefault() *Error
GetJSONDefault returns the response for an HTTP default `application/json` response
func (GetOutlineResponse) Status ¶
func (r GetOutlineResponse) Status() string
Status returns HTTPResponse.Status
func (GetOutlineResponse) StatusCode ¶
func (r GetOutlineResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetOverviewResponse ¶
type GetOverviewResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Overview
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Error
}
func ParseGetOverviewResponse ¶
func ParseGetOverviewResponse(rsp *http.Response) (*GetOverviewResponse, error)
ParseGetOverviewResponse parses an HTTP response from a GetOverviewWithResponse call
func (GetOverviewResponse) ContentType ¶
func (r GetOverviewResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetOverviewResponse) GetBody ¶
func (r GetOverviewResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetOverviewResponse) GetJSON200 ¶
func (r GetOverviewResponse) GetJSON200() *Overview
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetOverviewResponse) GetJSONDefault ¶
func (r GetOverviewResponse) GetJSONDefault() *Error
GetJSONDefault returns the response for an HTTP default `application/json` response
func (GetOverviewResponse) Status ¶
func (r GetOverviewResponse) Status() string
Status returns HTTPResponse.Status
func (GetOverviewResponse) StatusCode ¶
func (r GetOverviewResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetQueryGraphParams ¶
type GetQueryGraphParams struct {
// Filter A filter in strata's query language; empty matches every image
Filter *Filter `form:"filter,omitempty" json:"filter,omitempty"`
// Budget Maximum graph nodes
Budget *Budget `form:"budget,omitempty" json:"budget,omitempty"`
}
GetQueryGraphParams defines parameters for GetQueryGraph.
type GetQueryGraphResponse ¶
type GetQueryGraphResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Graph
// JSON400 the response for an HTTP 400 `application/json` response
JSON400 *BadRequest
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Error
}
func ParseGetQueryGraphResponse ¶
func ParseGetQueryGraphResponse(rsp *http.Response) (*GetQueryGraphResponse, error)
ParseGetQueryGraphResponse parses an HTTP response from a GetQueryGraphWithResponse call
func (GetQueryGraphResponse) ContentType ¶
func (r GetQueryGraphResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetQueryGraphResponse) GetBody ¶
func (r GetQueryGraphResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetQueryGraphResponse) GetJSON200 ¶
func (r GetQueryGraphResponse) GetJSON200() *Graph
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetQueryGraphResponse) GetJSON400 ¶
func (r GetQueryGraphResponse) GetJSON400() *BadRequest
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (GetQueryGraphResponse) GetJSONDefault ¶
func (r GetQueryGraphResponse) GetJSONDefault() *Error
GetJSONDefault returns the response for an HTTP default `application/json` response
func (GetQueryGraphResponse) Status ¶
func (r GetQueryGraphResponse) Status() string
Status returns HTTPResponse.Status
func (GetQueryGraphResponse) StatusCode ¶
func (r GetQueryGraphResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetRootsResponse ¶
type GetRootsResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *[]Root
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Error
}
func ParseGetRootsResponse ¶
func ParseGetRootsResponse(rsp *http.Response) (*GetRootsResponse, error)
ParseGetRootsResponse parses an HTTP response from a GetRootsWithResponse call
func (GetRootsResponse) ContentType ¶
func (r GetRootsResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetRootsResponse) GetBody ¶
func (r GetRootsResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetRootsResponse) GetJSON200 ¶
func (r GetRootsResponse) GetJSON200() *[]Root
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetRootsResponse) GetJSONDefault ¶
func (r GetRootsResponse) GetJSONDefault() *Error
GetJSONDefault returns the response for an HTTP default `application/json` response
func (GetRootsResponse) Status ¶
func (r GetRootsResponse) Status() string
Status returns HTTPResponse.Status
func (GetRootsResponse) StatusCode ¶
func (r GetRootsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetStaleParams ¶
type GetStaleParams struct {
// GroupBy Field to group by, such as repo, root or label.team
GroupBy *GroupBy `form:"group_by,omitempty" json:"group_by,omitempty"`
}
GetStaleParams defines parameters for GetStale.
type GetStaleResponse ¶
type GetStaleResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Table
// JSON400 the response for an HTTP 400 `application/json` response
JSON400 *BadRequest
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Error
}
func ParseGetStaleResponse ¶
func ParseGetStaleResponse(rsp *http.Response) (*GetStaleResponse, error)
ParseGetStaleResponse parses an HTTP response from a GetStaleWithResponse call
func (GetStaleResponse) ContentType ¶
func (r GetStaleResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetStaleResponse) GetBody ¶
func (r GetStaleResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetStaleResponse) GetJSON200 ¶
func (r GetStaleResponse) GetJSON200() *Table
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetStaleResponse) GetJSON400 ¶
func (r GetStaleResponse) GetJSON400() *BadRequest
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (GetStaleResponse) GetJSONDefault ¶
func (r GetStaleResponse) GetJSONDefault() *Error
GetJSONDefault returns the response for an HTTP default `application/json` response
func (GetStaleResponse) Status ¶
func (r GetStaleResponse) Status() string
Status returns HTTPResponse.Status
func (GetStaleResponse) StatusCode ¶
func (r GetStaleResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetStatusResponse ¶ added in v0.2.0
type GetStatusResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *IndexStatus
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Error
}
func ParseGetStatusResponse ¶ added in v0.2.0
func ParseGetStatusResponse(rsp *http.Response) (*GetStatusResponse, error)
ParseGetStatusResponse parses an HTTP response from a GetStatusWithResponse call
func (GetStatusResponse) ContentType ¶ added in v0.2.0
func (r GetStatusResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetStatusResponse) GetBody ¶ added in v0.2.0
func (r GetStatusResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetStatusResponse) GetJSON200 ¶ added in v0.2.0
func (r GetStatusResponse) GetJSON200() *IndexStatus
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetStatusResponse) GetJSONDefault ¶ added in v0.2.0
func (r GetStatusResponse) GetJSONDefault() *Error
GetJSONDefault returns the response for an HTTP default `application/json` response
func (GetStatusResponse) Status ¶ added in v0.2.0
func (r GetStatusResponse) Status() string
Status returns HTTPResponse.Status
func (GetStatusResponse) StatusCode ¶ added in v0.2.0
func (r GetStatusResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetSummaryParams ¶
type GetSummaryParams struct {
// GroupBy Field to group by, such as repo, root or label.team
GroupBy *GroupBy `form:"group_by,omitempty" json:"group_by,omitempty"`
}
GetSummaryParams defines parameters for GetSummary.
type GetSummaryResponse ¶
type GetSummaryResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Summary
// JSON400 the response for an HTTP 400 `application/json` response
JSON400 *BadRequest
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Error
}
func ParseGetSummaryResponse ¶
func ParseGetSummaryResponse(rsp *http.Response) (*GetSummaryResponse, error)
ParseGetSummaryResponse parses an HTTP response from a GetSummaryWithResponse call
func (GetSummaryResponse) ContentType ¶
func (r GetSummaryResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetSummaryResponse) GetBody ¶
func (r GetSummaryResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetSummaryResponse) GetJSON200 ¶
func (r GetSummaryResponse) GetJSON200() *Summary
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetSummaryResponse) GetJSON400 ¶
func (r GetSummaryResponse) GetJSON400() *BadRequest
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (GetSummaryResponse) GetJSONDefault ¶
func (r GetSummaryResponse) GetJSONDefault() *Error
GetJSONDefault returns the response for an HTTP default `application/json` response
func (GetSummaryResponse) Status ¶
func (r GetSummaryResponse) Status() string
Status returns HTTPResponse.Status
func (GetSummaryResponse) StatusCode ¶
func (r GetSummaryResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type Graph ¶
type Graph struct {
Edges []Edge `json:"edges"`
Hidden *int `json:"hidden,omitempty"`
Kind GraphKind `json:"kind"`
Nodes []Node `json:"nodes"`
Root *string `json:"root,omitempty"`
Title string `json:"title"`
}
Graph A lineage graph: an ancestry chain, a descendant tree, a query graph or the registry map
type GraphKind ¶
type GraphKind string
GraphKind defines model for Graph.Kind.
type GroupMetrics ¶
type GroupMetrics struct {
Abandoned int64 `json:"abandoned"`
ApparentBytes int64 `json:"apparent_bytes"`
DedupBytes int64 `json:"dedup_bytes"`
Drifting int64 `json:"drifting"`
ExclusiveBytes int64 `json:"exclusive_bytes"`
Fresh int64 `json:"fresh"`
Group string `json:"group"`
Manifests int64 `json:"manifests"`
Repos int64 `json:"repos"`
Stale int64 `json:"stale"`
Tags int64 `json:"tags"`
UniqueStacks int64 `json:"unique_stacks"`
UntaggedPct float32 `json:"untagged_pct"`
}
GroupMetrics Footprint metrics for one group of images
type Health ¶
type Health struct {
Images int64 `json:"images"`
Status HealthStatus `json:"status"`
Version string `json:"version"`
}
Health Server status and index size
type HealthStatus ¶
type HealthStatus string
HealthStatus defines model for Health.Status.
const (
Ok HealthStatus = "ok"
)
Defines values for HealthStatus.
func (HealthStatus) Valid ¶
func (e HealthStatus) Valid() bool
Valid indicates whether the value is a known member of the HealthStatus enum.
type HistoryEntry ¶
type HistoryEntry struct {
CreatedBy string `json:"created_by"`
EmptyLayer bool `json:"empty_layer"`
}
HistoryEntry One build step from the config history
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type ImageInfo ¶
type ImageInfo struct {
AgeDays *int `json:"age_days,omitempty"`
// Config Run-time fields from the image config; environment values are never stored except allowlisted ones
Config ConfigInfo `json:"config"`
Created *time.Time `json:"created,omitempty"`
Digest string `json:"digest"`
External bool `json:"external"`
// FirstSeen When strata first indexed the image
FirstSeen *time.Time `json:"first_seen,omitempty"`
IndexDigest *string `json:"index_digest,omitempty"`
Label string `json:"label"`
Labels map[string]string `json:"labels"`
LayerCount int `json:"layer_count"`
Platform string `json:"platform"`
Platforms *[]string `json:"platforms,omitempty"`
// Pushed When the registry says the image was first pushed (ECR only)
Pushed *time.Time `json:"pushed,omitempty"`
Repo string `json:"repo"`
Size int64 `json:"size"`
Tags []string `json:"tags"`
TopChainId string `json:"top_chain_id"`
}
ImageInfo What the index knows about one image
type IndexStatus ¶ added in v0.2.0
type IndexStatus struct {
// Crawl Running totals of a crawl
Crawl CrawlStats `json:"crawl"`
// Error Why the last index failed
Error *string `json:"error,omitempty"`
FinishedAt *time.Time `json:"finished_at,omitempty"`
// LastRefresh What the last refresh rewrote; refreshes are incremental
LastRefresh *RefreshStats `json:"last_refresh,omitempty"`
// RefreshError Why the last refresh failed; cleared when one succeeds
RefreshError *string `json:"refresh_error,omitempty"`
// RefreshEverySeconds How often views refresh during a crawl; 0 means only at the end
RefreshEverySeconds int64 `json:"refresh_every_seconds"`
// RefreshedAt When lineage, staleness and the views were last recomputed; unset until the first refresh finishes
RefreshedAt *time.Time `json:"refreshed_at,omitempty"`
// Refreshing A refresh is running now
Refreshing bool `json:"refreshing"`
Registry *string `json:"registry,omitempty"`
Running bool `json:"running"`
StartedAt *time.Time `json:"started_at,omitempty"`
}
IndexStatus State of the running or last index
type LayerInfo ¶
type LayerInfo struct {
BlobDigest string `json:"blob_digest"`
CreatedBy string `json:"created_by"`
DiffId string `json:"diff_id"`
Position int `json:"position"`
Size int64 `json:"size"`
}
LayerInfo One layer and the build step that created it
type Lifecycle ¶ added in v0.3.0
type Lifecycle struct {
// Agree Of those, images strata lists for cleanup
Agree int `json:"agree"`
Conflicts []struct {
Digest string `json:"digest"`
Reason string `json:"reason"`
} `json:"conflicts"`
Days int `json:"days"`
// Expires Images the rule would expire today
Expires int `json:"expires"`
// Name The repository name ECR uses, without the host
Name string `json:"name"`
// Policy The lifecycle policy document, or null when the repo is skipped
Policy *struct {
Rules []struct {
Action struct {
Type string `json:"type"`
} `json:"action"`
Description string `json:"description"`
RulePriority int `json:"rulePriority"`
Selection struct {
CountNumber int `json:"countNumber"`
CountType string `json:"countType"`
CountUnit *string `json:"countUnit,omitempty"`
TagStatus string `json:"tagStatus"`
} `json:"selection"`
} `json:"rules"`
} `json:"policy"`
Repo string `json:"repo"`
// Skipped Why the repo has no policy
Skipped *string `json:"skipped,omitempty"`
}
Lifecycle A generated ECR lifecycle policy for one repo, checked against the index
type LineageInfo ¶
type LineageInfo struct {
// Ancestry A lineage graph: an ancestry chain, a descendant tree, a query graph or the registry map
Ancestry Graph `json:"ancestry"`
// BuiltFrom Images the build's provenance says it pulled, and whether each is indexed
BuiltFrom *[]BuiltFrom `json:"built_from,omitempty"`
Children int `json:"children"`
Conflict bool `json:"conflict"`
Descendants int `json:"descendants"`
Edges []Edge `json:"edges"`
Generation int `json:"generation"`
Parent *string `json:"parent,omitempty"`
Root *string `json:"root,omitempty"`
Status LineageInfoStatus `json:"status"`
}
LineageInfo Where an image sits in the lineage graph, with the evidence for its parent
type LineageInfoStatus ¶
type LineageInfoStatus string
LineageInfoStatus defines model for LineageInfo.Status.
const ( LineageInfoStatusDerived LineageInfoStatus = "derived" LineageInfoStatusRoot LineageInfoStatus = "root" LineageInfoStatusUnknown LineageInfoStatus = "unknown" )
Defines values for LineageInfoStatus.
func (LineageInfoStatus) Valid ¶
func (e LineageInfoStatus) Valid() bool
Valid indicates whether the value is a known member of the LineageInfoStatus enum.
type Node ¶
type Node struct {
Count *int `json:"count,omitempty"`
Created *string `json:"created,omitempty"`
Depth int `json:"depth"`
Id string `json:"id"`
Kind NodeKind `json:"kind"`
Label string `json:"label"`
Layers *int `json:"layers,omitempty"`
Matched *bool `json:"matched,omitempty"`
Members *[]string `json:"members,omitempty"`
Note *string `json:"note,omitempty"`
Platform *string `json:"platform,omitempty"`
Reasons *[]string `json:"reasons,omitempty"`
Refs *[]string `json:"refs,omitempty"`
Repo *string `json:"repo,omitempty"`
Size *int64 `json:"size,omitempty"`
// Verdict A staleness verdict; empty when not computed yet
Verdict *Verdict `json:"verdict,omitempty"`
}
Node A graph node: an image, an external root, a phantom ancestor not in the registry, or a collapsed group
type NodeKind ¶
type NodeKind string
NodeKind defines model for Node.Kind.
type Outline ¶
type Outline struct {
Offset int `json:"offset"`
Parent *string `json:"parent,omitempty"`
Rows []OutlineRow `json:"rows"`
// Total Rows at this level before paging
Total int64 `json:"total"`
}
Outline Children of an outline row
type OutlineRow ¶
type OutlineRow struct {
Depth int `json:"depth"`
Digest *string `json:"digest,omitempty"`
// Drift Generations the row's base is behind its tag; for repo rows, the most among its images
Drift *int `json:"drift,omitempty"`
HasChildren bool `json:"has_children"`
// Id Row id; pass it as parent to expand the row
Id string `json:"id"`
// Images Images in this row's subtree, itself included
Images int64 `json:"images"`
Kind OutlineRowKind `json:"kind"`
Name string `json:"name"`
// Newest Creation time of the newest image in the subtree
Newest *time.Time `json:"newest,omitempty"`
Parent *string `json:"parent,omitempty"`
Repo *string `json:"repo,omitempty"`
Tags *[]string `json:"tags,omitempty"`
Team *string `json:"team,omitempty"`
// Verdict A staleness verdict; empty when not computed yet
Verdict *Verdict `json:"verdict,omitempty"`
// Verdicts Images per verdict
Verdicts VerdictCounts `json:"verdicts"`
}
OutlineRow One row of the lineage outline: a base, a repo group or an image
type OutlineRowKind ¶
type OutlineRowKind string
OutlineRowKind defines model for OutlineRow.Kind.
const ( OutlineRowKindBase OutlineRowKind = "base" OutlineRowKindExternal OutlineRowKind = "external" OutlineRowKindImage OutlineRowKind = "image" OutlineRowKindPhantom OutlineRowKind = "phantom" OutlineRowKindRepo OutlineRowKind = "repo" OutlineRowKindUnrooted OutlineRowKind = "unrooted" )
Defines values for OutlineRowKind.
func (OutlineRowKind) Valid ¶
func (e OutlineRowKind) Valid() bool
Valid indicates whether the value is a known member of the OutlineRowKind enum.
type Overview ¶
type Overview struct {
ApparentBytes int64 `json:"apparent_bytes"`
Changes []Change `json:"changes"`
DedupBytes int64 `json:"dedup_bytes"`
// Host The registry host every image shares, if there is one
Host *string `json:"host,omitempty"`
Images int64 `json:"images"`
IndexedAt *time.Time `json:"indexed_at,omitempty"`
Repos int64 `json:"repos"`
Roots []RootStat `json:"roots"`
Stacks int64 `json:"stacks"`
Tags int64 `json:"tags"`
// Verdicts Images per verdict
Verdicts VerdictCounts `json:"verdicts"`
}
Overview Headline numbers for the web UI
type Referrer ¶
type Referrer struct {
ArtifactType string `json:"artifact_type"`
Digest string `json:"digest"`
Kind ReferrerKind `json:"kind"`
Subject string `json:"subject"`
}
Referrer An artifact attached to an image, such as an SBOM or a signature
type ReferrerKind ¶
type ReferrerKind string
ReferrerKind defines model for Referrer.Kind.
const ( ReferrerKindAttestation ReferrerKind = "attestation" ReferrerKindOther ReferrerKind = "other" ReferrerKindSbom ReferrerKind = "sbom" ReferrerKindSignature ReferrerKind = "signature" )
Defines values for ReferrerKind.
func (ReferrerKind) Valid ¶
func (e ReferrerKind) Valid() bool
Valid indicates whether the value is a known member of the ReferrerKind enum.
type RefreshStats ¶ added in v0.2.1
type RefreshStats struct {
// Duration Nanoseconds the refresh took
Duration int64 `json:"duration"`
// FactsRebuilt Image rows rebuilt in the query table; -1 when rebuilt in full
FactsRebuilt int `json:"facts_rebuilt"`
// Full Every derived table was rebuilt
Full bool `json:"full"`
// LineageChanged Lineage rows rewritten
LineageChanged int `json:"lineage_changed"`
// LineageSkipped No input to lineage changed
LineageSkipped bool `json:"lineage_skipped"`
// SnapshotRows Snapshot rows added, changed or removed
SnapshotRows int `json:"snapshot_rows"`
// SnapshotSkipped No image row changed since today's snapshot
SnapshotSkipped bool `json:"snapshot_skipped"`
// VerdictsChanged Staleness rows rewritten
VerdictsChanged int `json:"verdicts_changed"`
}
RefreshStats What the last refresh rewrote; refreshes are incremental
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type ResolveRefParams ¶
type ResolveRefParams struct {
// Ref repo:tag, repo@digest, a digest or a digest prefix
Ref Ref `form:"ref" json:"ref"`
// Platform Platform to pick when the ref names a multi-platform index, such as linux/arm64
Platform *Platform `form:"platform,omitempty" json:"platform,omitempty"`
}
ResolveRefParams defines parameters for ResolveRef.
type ResolveRefResponse ¶
type ResolveRefResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Resolved
// JSON404 the response for an HTTP 404 `application/json` response
JSON404 *NotFound
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Error
}
func ParseResolveRefResponse ¶
func ParseResolveRefResponse(rsp *http.Response) (*ResolveRefResponse, error)
ParseResolveRefResponse parses an HTTP response from a ResolveRefWithResponse call
func (ResolveRefResponse) ContentType ¶
func (r ResolveRefResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ResolveRefResponse) GetBody ¶
func (r ResolveRefResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (ResolveRefResponse) GetJSON200 ¶
func (r ResolveRefResponse) GetJSON200() *Resolved
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (ResolveRefResponse) GetJSON404 ¶
func (r ResolveRefResponse) GetJSON404() *NotFound
GetJSON404 returns the response for an HTTP 404 `application/json` response
func (ResolveRefResponse) GetJSONDefault ¶
func (r ResolveRefResponse) GetJSONDefault() *Error
GetJSONDefault returns the response for an HTTP default `application/json` response
func (ResolveRefResponse) Status ¶
func (r ResolveRefResponse) Status() string
Status returns HTTPResponse.Status
func (ResolveRefResponse) StatusCode ¶
func (r ResolveRefResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type Root ¶
type Root struct {
Children int `json:"children"`
Descendants int `json:"descendants"`
Id string `json:"id"`
Kind string `json:"kind"`
Label string `json:"label"`
StalePct float32 `json:"stale_pct"`
}
Root A root base and how much descends from it
type RootStat ¶
type RootStat struct {
Id string `json:"id"`
Images int64 `json:"images"`
Kind string `json:"kind"`
Name string `json:"name"`
// Verdicts Images per verdict
Verdicts VerdictCounts `json:"verdicts"`
}
RootStat A root base and the stale images built on it
type RunQueryParams ¶
type RunQueryParams struct {
// Filter A filter in strata's query language; empty matches every image
Filter *Filter `form:"filter,omitempty" json:"filter,omitempty"`
// Fields Columns to return
Fields *[]string `form:"fields,omitempty" json:"fields,omitempty"`
// Sort Fields to sort by; a leading - sorts descending
Sort *[]string `form:"sort,omitempty" json:"sort,omitempty"`
// Limit Maximum rows; 0 means all
Limit *int `form:"limit,omitempty" json:"limit,omitempty"`
// GroupBy Field to group by, such as repo, root or label.team
GroupBy *GroupBy `form:"group_by,omitempty" json:"group_by,omitempty"`
}
RunQueryParams defines parameters for RunQuery.
type RunQueryResponse ¶
type RunQueryResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Table
// JSON400 the response for an HTTP 400 `application/json` response
JSON400 *BadRequest
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Error
}
func ParseRunQueryResponse ¶
func ParseRunQueryResponse(rsp *http.Response) (*RunQueryResponse, error)
ParseRunQueryResponse parses an HTTP response from a RunQueryWithResponse call
func (RunQueryResponse) ContentType ¶
func (r RunQueryResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (RunQueryResponse) GetBody ¶
func (r RunQueryResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (RunQueryResponse) GetJSON200 ¶
func (r RunQueryResponse) GetJSON200() *Table
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (RunQueryResponse) GetJSON400 ¶
func (r RunQueryResponse) GetJSON400() *BadRequest
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (RunQueryResponse) GetJSONDefault ¶
func (r RunQueryResponse) GetJSONDefault() *Error
GetJSONDefault returns the response for an HTTP default `application/json` response
func (RunQueryResponse) Status ¶
func (r RunQueryResponse) Status() string
Status returns HTTPResponse.Status
func (RunQueryResponse) StatusCode ¶
func (r RunQueryResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type SearchHit ¶
type SearchHit struct {
AgeDays *int `json:"age_days,omitempty"`
Digest string `json:"digest"`
Name string `json:"name"`
Platform string `json:"platform"`
Repo string `json:"repo"`
Root *string `json:"root,omitempty"`
Size int64 `json:"size"`
Tags []string `json:"tags"`
Team *string `json:"team,omitempty"`
// Verdict A staleness verdict; empty when not computed yet
Verdict Verdict `json:"verdict"`
}
SearchHit One image in search results
type SearchParams ¶
type SearchParams struct {
// Filter A filter in strata's query language; empty matches every image
Filter *Filter `form:"filter,omitempty" json:"filter,omitempty"`
// Team Selected label.team values
Team *[]string `form:"team,omitempty" json:"team,omitempty"`
// Root Selected root bases
Root *[]string `form:"root,omitempty" json:"root,omitempty"`
// Verdict Selected verdicts
Verdict *[]string `form:"verdict,omitempty" json:"verdict,omitempty"`
// Platform Selected platforms
Platform *[]string `form:"platform,omitempty" json:"platform,omitempty"`
// Age Selected age buckets
Age *[]SearchParamsAge `form:"age,omitempty" json:"age,omitempty"`
// Pushed Selected push-age buckets, from registries that report push times (ECR)
Pushed *[]SearchParamsPushed `form:"pushed,omitempty" json:"pushed,omitempty"`
// Offset Rows to skip
Offset *Offset `form:"offset,omitempty" json:"offset,omitempty"`
// Limit Rows to return
Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"`
}
SearchParams defines parameters for Search.
type SearchParamsAge ¶
type SearchParamsAge string
SearchParamsAge defines parameters for Search.
const ( SearchParamsAgeGreaterThan1Year SearchParamsAge = "> 1 year" SearchParamsAgeLessThan30Days SearchParamsAge = "< 30 days" SearchParamsAgeN180Days1Year SearchParamsAge = "180 days–1 year" SearchParamsAgeN30180Days SearchParamsAge = "30–180 days" SearchParamsAgeUnknown SearchParamsAge = "unknown" )
Defines values for SearchParamsAge.
func (SearchParamsAge) Valid ¶
func (e SearchParamsAge) Valid() bool
Valid indicates whether the value is a known member of the SearchParamsAge enum.
type SearchParamsPushed ¶ added in v0.2.0
type SearchParamsPushed string
SearchParamsPushed defines parameters for Search.
const ( SearchParamsPushedGreaterThan1Year SearchParamsPushed = "> 1 year" SearchParamsPushedLessThan30Days SearchParamsPushed = "< 30 days" SearchParamsPushedN180Days1Year SearchParamsPushed = "180 days–1 year" SearchParamsPushedN30180Days SearchParamsPushed = "30–180 days" SearchParamsPushedUnknown SearchParamsPushed = "unknown" )
Defines values for SearchParamsPushed.
func (SearchParamsPushed) Valid ¶ added in v0.2.0
func (e SearchParamsPushed) Valid() bool
Valid indicates whether the value is a known member of the SearchParamsPushed enum.
type SearchResponse ¶
type SearchResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *SearchResult
// JSON400 the response for an HTTP 400 `application/json` response
JSON400 *BadRequest
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *Error
}
func ParseSearchResponse ¶
func ParseSearchResponse(rsp *http.Response) (*SearchResponse, error)
ParseSearchResponse parses an HTTP response from a SearchWithResponse call
func (SearchResponse) ContentType ¶
func (r SearchResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (SearchResponse) GetBody ¶
func (r SearchResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (SearchResponse) GetJSON200 ¶
func (r SearchResponse) GetJSON200() *SearchResult
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (SearchResponse) GetJSON400 ¶
func (r SearchResponse) GetJSON400() *BadRequest
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (SearchResponse) GetJSONDefault ¶
func (r SearchResponse) GetJSONDefault() *Error
GetJSONDefault returns the response for an HTTP default `application/json` response
func (SearchResponse) Status ¶
func (r SearchResponse) Status() string
Status returns HTTPResponse.Status
func (SearchResponse) StatusCode ¶
func (r SearchResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type SearchResult ¶
type SearchResult struct {
Facets []Facet `json:"facets"`
// Filter The filter with every facet selection folded in, as strata query takes it
Filter string `json:"filter"`
Hits []SearchHit `json:"hits"`
Offset int `json:"offset"`
Total int64 `json:"total"`
}
SearchResult A page of search hits with facet counts
type StalenessInfo ¶
type StalenessInfo struct {
BaseDriftGenerations int `json:"base_drift_generations"`
BaseTag *string `json:"base_tag,omitempty"`
Inferred bool `json:"inferred"`
Reasons []string `json:"reasons"`
SupersededDays *int `json:"superseded_days,omitempty"`
Untagged bool `json:"untagged"`
// Verdict A staleness verdict; empty when not computed yet
Verdict Verdict `json:"verdict"`
}
StalenessInfo A staleness verdict with the reasons behind it
type Summary ¶
type Summary struct {
GroupBy *string `json:"group_by,omitempty"`
Groups *[]GroupMetrics `json:"groups,omitempty"`
Platforms map[string]int64 `json:"platforms"`
RequiredLabelCoverage *map[string]float32 `json:"required_label_coverage,omitempty"`
// Total Footprint metrics for one group of images
Total GroupMetrics `json:"total"`
}
Summary Footprint summary of the registry, optionally grouped
type Table ¶
type Table struct {
Columns []string `json:"columns"`
Rows [][]*interface{} `json:"rows"`
}
Table Tabular rows with their column names