Documentation ¶
Overview ¶
* GUS (gokrazy update service) * * OpenAPI for GUS (gokrazy update service) * * API version: 1.4.0 * Contact: michael+gokrazy@stapelberg.ch * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* GUS (gokrazy update service) * * OpenAPI for GUS (gokrazy update service) * * API version: 1.4.0 * Contact: michael+gokrazy@stapelberg.ch * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* GUS (gokrazy update service) * * OpenAPI for GUS (gokrazy update service) * * API version: 1.4.0 * Contact: michael+gokrazy@stapelberg.ch * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* GUS (gokrazy update service) * * OpenAPI for GUS (gokrazy update service) * * API version: 1.4.0 * Contact: michael+gokrazy@stapelberg.ch * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* GUS (gokrazy update service) * * OpenAPI for GUS (gokrazy update service) * * API version: 1.4.0 * Contact: michael+gokrazy@stapelberg.ch * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* GUS (gokrazy update service) * * OpenAPI for GUS (gokrazy update service) * * API version: 1.4.0 * Contact: michael+gokrazy@stapelberg.ch * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* GUS (gokrazy update service) * * OpenAPI for GUS (gokrazy update service) * * API version: 1.4.0 * Contact: michael+gokrazy@stapelberg.ch * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* GUS (gokrazy update service) * * OpenAPI for GUS (gokrazy update service) * * API version: 1.4.0 * Contact: michael+gokrazy@stapelberg.ch * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* GUS (gokrazy update service) * * OpenAPI for GUS (gokrazy update service) * * API version: 1.4.0 * Contact: michael+gokrazy@stapelberg.ch * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* GUS (gokrazy update service) * * OpenAPI for GUS (gokrazy update service) * * API version: 1.4.0 * Contact: michael+gokrazy@stapelberg.ch * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* GUS (gokrazy update service) * * OpenAPI for GUS (gokrazy update service) * * API version: 1.4.0 * Contact: michael+gokrazy@stapelberg.ch * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* GUS (gokrazy update service) * * OpenAPI for GUS (gokrazy update service) * * API version: 1.4.0 * Contact: michael+gokrazy@stapelberg.ch * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* GUS (gokrazy update service) * * OpenAPI for GUS (gokrazy update service) * * API version: 1.4.0 * Contact: michael+gokrazy@stapelberg.ch * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* GUS (gokrazy update service) * * OpenAPI for GUS (gokrazy update service) * * API version: 1.4.0 * Contact: michael+gokrazy@stapelberg.ch * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* GUS (gokrazy update service) * * OpenAPI for GUS (gokrazy update service) * * API version: 1.4.0 * Contact: michael+gokrazy@stapelberg.ch * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* GUS (gokrazy update service) * * OpenAPI for GUS (gokrazy update service) * * API version: 1.4.0 * Contact: michael+gokrazy@stapelberg.ch * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* GUS (gokrazy update service) * * OpenAPI for GUS (gokrazy update service) * * API version: 1.4.0 * Contact: michael+gokrazy@stapelberg.ch * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* GUS (gokrazy update service) * * OpenAPI for GUS (gokrazy update service) * * API version: 1.4.0 * Contact: michael+gokrazy@stapelberg.ch * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
Index ¶
- Variables
- func CacheExpires(r *http.Response) time.Time
- type APIClient
- type APIKey
- type APIResponse
- type AttemptRequest
- type AttemptResponse
- type BasicAuth
- type Configuration
- type GenericSwaggerError
- type HeartbeatApiHeartbeatOpts
- type HeartbeatApiService
- type HeartbeatRequest
- type HeartbeatRequestHumanReadable
- type HeartbeatRequestSbom
- type HeartbeatResponse
- type IngestApiIngestOpts
- type IngestApiPushOpts
- type IngestApiService
- type IngestRequest
- type IngestResponse
- type PathHash
- type PushResponse
- type UpdateApiAttemptOpts
- type UpdateApiService
- type UpdateApiUpdateOpts
- type UpdateRequest
- type UpdateResponse
Constants ¶
This section is empty.
Variables ¶
var ( // ContextOAuth2 takes a oauth2.TokenSource as authentication for the request. ContextOAuth2 = contextKey("token") // ContextBasicAuth takes BasicAuth as authentication for the request. ContextBasicAuth = contextKey("basic") // ContextAccessToken takes a string oauth2 access token as authentication for the request. ContextAccessToken = contextKey("accesstoken") // ContextAPIKey takes an APIKey as authentication for the request ContextAPIKey = contextKey("apikey") )
Functions ¶
Types ¶
type APIClient ¶
type APIClient struct { HeartbeatApi *HeartbeatApiService IngestApi *IngestApiService UpdateApi *UpdateApiService // contains filtered or unexported fields }
APIClient manages communication with the GUS (gokrazy update service) API v1.4.0 In most cases there should be only one, shared, APIClient.
func NewAPIClient ¶
func NewAPIClient(cfg *Configuration) *APIClient
NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.
func (*APIClient) ChangeBasePath ¶
Change base path to allow switching to mocks
type APIKey ¶
APIKey provides API key based authentication to a request passed via context using ContextAPIKey
type APIResponse ¶
type APIResponse struct { *http.Response `json:"-"` Message string `json:"message,omitempty"` // Operation is the name of the swagger operation. Operation string `json:"operation,omitempty"` // RequestURL is the request URL. This value is always available, even if the // embedded *http.Response is nil. RequestURL string `json:"url,omitempty"` // Method is the HTTP method used for the request. This value is always // available, even if the embedded *http.Response is nil. Method string `json:"method,omitempty"` // Payload holds the contents of the response body (which may be nil or empty). // This is provided here as the raw response.Body() reader will have already // been drained. Payload []byte `json:"-"` }
func NewAPIResponse ¶
func NewAPIResponse(r *http.Response) *APIResponse
func NewAPIResponseWithError ¶
func NewAPIResponseWithError(errorMessage string) *APIResponse
type AttemptRequest ¶
type AttemptResponse ¶
type AttemptResponse struct { }
type BasicAuth ¶
type BasicAuth struct { UserName string `json:"userName,omitempty"` Password string `json:"password,omitempty"` }
BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth
type Configuration ¶
type Configuration struct { BasePath string `json:"basePath,omitempty"` Host string `json:"host,omitempty"` Scheme string `json:"scheme,omitempty"` DefaultHeader map[string]string `json:"defaultHeader,omitempty"` UserAgent string `json:"userAgent,omitempty"` HTTPClient *http.Client }
func NewConfiguration ¶
func NewConfiguration() *Configuration
func (*Configuration) AddDefaultHeader ¶
func (c *Configuration) AddDefaultHeader(key string, value string)
type GenericSwaggerError ¶
type GenericSwaggerError struct {
// contains filtered or unexported fields
}
GenericSwaggerError Provides access to the body, error and model on returned errors.
func (GenericSwaggerError) Body ¶
func (e GenericSwaggerError) Body() []byte
Body returns the raw bytes of the response
func (GenericSwaggerError) Error ¶
func (e GenericSwaggerError) Error() string
Error returns non-empty string if there was an error.
func (GenericSwaggerError) Model ¶
func (e GenericSwaggerError) Model() interface{}
Model returns the unpacked model of the error
type HeartbeatApiService ¶
type HeartbeatApiService service
func (*HeartbeatApiService) Heartbeat ¶
func (a *HeartbeatApiService) Heartbeat(ctx context.Context, localVarOptionals *HeartbeatApiHeartbeatOpts) (HeartbeatResponse, *http.Response, error)
type HeartbeatRequest ¶
type HeartbeatRequest struct { MachineId string `json:"machine_id,omitempty"` // TODO Hostname string `json:"hostname,omitempty"` SbomHash string `json:"sbom_hash,omitempty"` Sbom *HeartbeatRequestSbom `json:"sbom,omitempty"` HumanReadable *HeartbeatRequestHumanReadable `json:"human_readable,omitempty"` }
type HeartbeatRequestHumanReadable ¶
type HeartbeatRequestHumanReadable struct { // Linux kernel version Kernel string `json:"kernel,omitempty"` // Model Model string `json:"model,omitempty"` }
TODO
type HeartbeatRequestSbom ¶
type HeartbeatRequestSbom struct { ConfigHash *PathHash `json:"config_hash,omitempty"` // TODO GoModHashes []PathHash `json:"go_mod_hashes,omitempty"` }
TODO
type HeartbeatResponse ¶
type HeartbeatResponse struct { }
type IngestApiIngestOpts ¶
type IngestApiPushOpts ¶
type IngestApiService ¶
type IngestApiService service
func (*IngestApiService) Ingest ¶
func (a *IngestApiService) Ingest(ctx context.Context, localVarOptionals *IngestApiIngestOpts) (IngestResponse, *http.Response, error)
func (*IngestApiService) Push ¶
func (a *IngestApiService) Push(ctx context.Context, localVarOptionals *IngestApiPushOpts) (PushResponse, *http.Response, error)
type IngestRequest ¶
type IngestRequest struct { // TODO MachineIdPattern string `json:"machine_id_pattern,omitempty"` SbomHash string `json:"sbom_hash,omitempty"` // the type of registry on which the build is stored. see download_link RegistryType string `json:"registry_type,omitempty"` // relative (localdisk registry) or absolute download link with which gokrazy devices can download the build DownloadLink string `json:"download_link,omitempty"` }
type IngestResponse ¶
type IngestResponse struct { }
type PushResponse ¶
type PushResponse struct { // relative download link for the pushed GAF file DownloadLink string `json:"download_link,omitempty"` }
type UpdateApiAttemptOpts ¶
type UpdateApiService ¶
type UpdateApiService service
func (*UpdateApiService) Attempt ¶
func (a *UpdateApiService) Attempt(ctx context.Context, localVarOptionals *UpdateApiAttemptOpts) (AttemptResponse, *http.Response, error)
func (*UpdateApiService) Update ¶
func (a *UpdateApiService) Update(ctx context.Context, localVarOptionals *UpdateApiUpdateOpts) (UpdateResponse, *http.Response, error)
type UpdateApiUpdateOpts ¶
type UpdateRequest ¶
type UpdateRequest struct {
MachineId string `json:"machine_id,omitempty"`
}
type UpdateResponse ¶
type UpdateResponse struct { SbomHash string `json:"sbom_hash,omitempty"` // the type of registry on which the build is stored. see download_link RegistryType string `json:"registry_type,omitempty"` // relative (localdisk registry) or absolute download link with which gokrazy devices can download the build DownloadLink string `json:"download_link,omitempty"` }
Source Files ¶
- api_heartbeat.go
- api_ingest.go
- api_update.go
- client.go
- configuration.go
- model_attempt_request.go
- model_attempt_response.go
- model_heartbeat_request.go
- model_heartbeat_request_human_readable.go
- model_heartbeat_request_sbom.go
- model_heartbeat_response.go
- model_ingest_request.go
- model_ingest_response.go
- model_path_hash.go
- model_push_response.go
- model_update_request.go
- model_update_response.go
- response.go