Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Proxy ¶
Proxy will proxy the given request to the registries in sequence and return the response as io.ReadCloser when finding a registry returning a HTTP 200OK response.
func ProxyMaintenance ¶
func ProxyMaintenance(registries []*url.URL) ([]json.RawMessage, error)
ProxyMaintenance will proxy the given request to the registries to fetch all the apps in maintenance.
Types ¶
type Application ¶
type Application struct { Slug string `json:"slug"` Type string `json:"type"` MaintenanceActivated bool `json:"maintenance_activated,omitempty"` MaintenanceOptions MaintenanceOptions `json:"maintenance_options"` }
An Application describe an application on the registry
func GetApplication ¶
func GetApplication(slug string, registries []*url.URL) (*Application, error)
GetApplication returns an application from his slug
type AppsPaginated ¶
type AppsPaginated struct { Apps []map[string]interface{} `json:"data"` PageInfo PageInfo `json:"meta"` }
AppsPaginated is a struct for listing apps manifest from the registry, with pagination.
type CacheControl ¶
type CacheControl int
CacheControl defines whether or not to use caching for the request made to the registries.
const ( // WithCache specify caching WithCache CacheControl = iota // NoCache disables any caching NoCache )
type MaintenanceOptions ¶
type MaintenanceOptions struct { FlagInfraMaintenance bool `json:"flag_infra_maintenance"` FlagShortMaintenance bool `json:"flag_short_maintenance"` FlagDisallowManualExec bool `json:"flag_disallow_manual_exec"` }
A MaintenanceOptions defines options about a maintenance
type Version ¶
type Version struct { Slug string `json:"slug"` Version string `json:"version"` URL string `json:"url"` Sha256 string `json:"sha256"` CreatedAt time.Time `json:"created_at"` Size string `json:"size"` Manifest json.RawMessage `json:"manifest"` TarPrefix string `json:"tar_prefix"` }
A Version describes a specific release of an application.
func GetLatestVersion ¶
GetLatestVersion returns the latest version available from the list of registries by resolving them in sequence using the specified application slug and channel name.