Documentation ¶
Index ¶
Constants ¶
const SubleaseHeader = "X-Keppel-Sublease-Token"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
API contains state variables used by the Keppel V1 API implementation.
func NewAPI ¶
func NewAPI(cfg keppel.Configuration, ad keppel.AuthDriver, fd keppel.FederationDriver, sd keppel.StorageDriver, icd keppel.InboundCacheDriver, db *keppel.DB, auditor keppel.Auditor, rle *keppel.RateLimitEngine) *API
NewAPI constructs a new API instance.
type AuditQuotas ¶
AuditQuotas is an audittools.TargetRenderer.
func (AuditQuotas) Render ¶
func (a AuditQuotas) Render() cadf.Resource
Render implements the audittools.TargetRenderer interface.
type AuditSecurityScanPolicy ¶
type AuditSecurityScanPolicy struct { Account models.Account Policy keppel.SecurityScanPolicy }
AuditSecurityScanPolicy is an audittools.TargetRenderer.
func (AuditSecurityScanPolicy) Render ¶
func (a AuditSecurityScanPolicy) Render() cadf.Resource
Render implements the audittools.TargetRenderer interface.
type Manifest ¶
type Manifest struct { Digest digest.Digest `json:"digest"` MediaType string `json:"media_type"` SizeBytes uint64 `json:"size_bytes"` PushedAt int64 `json:"pushed_at"` LastPulledAt *int64 `json:"last_pulled_at"` Tags []Tag `json:"tags,omitempty"` LabelsJSON json.RawMessage `json:"labels,omitempty"` GCStatusJSON json.RawMessage `json:"gc_status,omitempty"` VulnerabilityStatus models.VulnerabilityStatus `json:"vulnerability_status"` VulnerabilityScanErrorMessage string `json:"vulnerability_scan_error,omitempty"` MinLayerCreatedAt *int64 `json:"min_layer_created_at"` MaxLayerCreatedAt *int64 `json:"max_layer_created_at"` }
Manifest represents a manifest in the API.
type Peer ¶
type Peer struct {
HostName string `json:"hostname"`
}
Peer represents a peer in the API.
type Repository ¶
type Repository struct { Name string `json:"name"` ManifestCount uint64 `json:"manifest_count"` TagCount uint64 `json:"tag_count"` SizeBytes uint64 `json:"size_bytes,omitempty"` PushedAt int64 `json:"pushed_at,omitempty"` }
Repository represents a repository in the API.
type SubleaseToken ¶
type SubleaseToken struct { AccountName string `json:"account"` PrimaryHostname string `json:"primary"` Secret string `json:"secret"` }
SubleaseToken is the internal structure of a sublease token. Only the secret is passed on to the federation driver. The other attributes are only informational. GUIs/CLIs can display these data to the user for confirmation when the token is entered.
func SubleaseTokenFromRequest ¶
func SubleaseTokenFromRequest(r *http.Request) (SubleaseToken, error)
SubleaseTokenFromRequest parses the request's X-Keppel-Sublease-Token header.
func (SubleaseToken) Serialize ¶
func (t SubleaseToken) Serialize() string
Serialize returns the Base64-encoded JSON of this token. This is the format that gets passed to the user.