composer

package
v0.0.0-...-87359d1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 23, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package composer provides primitives to interact with the openapi HTTP API.

Code generated by github.com/deepmap/oapi-codegen version v1.11.0 DO NOT EDIT.

Package composer is a generated GoMock package.

Index

Constants

View Source
const (
	BearerScopes = "Bearer.Scopes"
)

Variables

This section is empty.

Functions

func NewGetComposeLogsRequest

func NewGetComposeLogsRequest(server string, id openapi_types.UUID) (*http.Request, error)

NewGetComposeLogsRequest generates requests for GetComposeLogs

func NewGetComposeManifestsRequest

func NewGetComposeManifestsRequest(server string, id openapi_types.UUID) (*http.Request, error)

NewGetComposeManifestsRequest generates requests for GetComposeManifests

func NewGetComposeMetadataRequest

func NewGetComposeMetadataRequest(server string, id openapi_types.UUID) (*http.Request, error)

NewGetComposeMetadataRequest generates requests for GetComposeMetadata

func NewGetComposeStatusRequest

func NewGetComposeStatusRequest(server string, id string) (*http.Request, error)

NewGetComposeStatusRequest generates requests for GetComposeStatus

func NewGetErrorListRequest

func NewGetErrorListRequest(server string, params *GetErrorListParams) (*http.Request, error)

NewGetErrorListRequest generates requests for GetErrorList

func NewGetErrorRequest

func NewGetErrorRequest(server string, id string) (*http.Request, error)

NewGetErrorRequest generates requests for GetError

func NewGetOpenapiRequest

func NewGetOpenapiRequest(server string) (*http.Request, error)

NewGetOpenapiRequest generates requests for GetOpenapi

func NewPostComposeRequest

func NewPostComposeRequest(server string, body PostComposeJSONRequestBody) (*http.Request, error)

NewPostComposeRequest calls the generic PostCompose builder with application/json body

func NewPostComposeRequestWithBody

func NewPostComposeRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewPostComposeRequestWithBody generates requests for PostCompose with any type of body

Types

type AWSEC2UploadOptions

type AWSEC2UploadOptions struct {
	Region            string   `json:"region"`
	ShareWithAccounts []string `json:"share_with_accounts"`
	SnapshotName      *string  `json:"snapshot_name,omitempty"`
}

AWSEC2UploadOptions defines model for AWSEC2UploadOptions.

type AWSEC2UploadStatus

type AWSEC2UploadStatus struct {
	Ami    string `json:"ami"`
	Region string `json:"region"`
}

AWSEC2UploadStatus defines model for AWSEC2UploadStatus.

type AWSS3UploadOptions

type AWSS3UploadOptions struct {
	Region string `json:"region"`
}

AWSS3UploadOptions defines model for AWSS3UploadOptions.

type AWSS3UploadStatus

type AWSS3UploadStatus struct {
	Url string `json:"url"`
}

AWSS3UploadStatus defines model for AWSS3UploadStatus.

type AzureUploadOptions

type AzureUploadOptions struct {
	// Name of the uploaded image. It must be unique in the given resource group.
	// If name is omitted from the request, a random one based on a UUID is
	// generated.
	ImageName *string `json:"image_name,omitempty"`

	// Location where the image should be uploaded and registered.
	// How to list all locations:
	// https://docs.microsoft.com/en-us/cli/azure/account?view=azure-cli-latest#az_account_list_locations'
	Location string `json:"location"`

	// Name of the resource group where the image should be uploaded.
	ResourceGroup string `json:"resource_group"`

	// ID of subscription where the image should be uploaded.
	SubscriptionId string `json:"subscription_id"`

	// ID of the tenant where the image should be uploaded.
	// How to find it in the Azure Portal:
	// https://docs.microsoft.com/en-us/azure/active-directory/fundamentals/active-directory-how-to-find-tenant
	TenantId string `json:"tenant_id"`
}

AzureUploadOptions defines model for AzureUploadOptions.

type AzureUploadStatus

type AzureUploadStatus struct {
	ImageName string `json:"image_name"`
}

AzureUploadStatus defines model for AzureUploadStatus.

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) GetComposeLogs

func (c *Client) GetComposeLogs(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetComposeManifests

func (c *Client) GetComposeManifests(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetComposeMetadata

func (c *Client) GetComposeMetadata(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetComposeStatus

func (c *Client) GetComposeStatus(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetError

func (c *Client) GetError(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetErrorList

func (c *Client) GetErrorList(ctx context.Context, params *GetErrorListParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetOpenapi

func (c *Client) GetOpenapi(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostCompose

func (c *Client) PostCompose(ctx context.Context, body PostComposeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostComposeWithBody

func (c *Client) PostComposeWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

type ClientInterface

type ClientInterface interface {
	// PostCompose request with any body
	PostComposeWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PostCompose(ctx context.Context, body PostComposeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetComposeStatus request
	GetComposeStatus(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetComposeLogs request
	GetComposeLogs(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetComposeManifests request
	GetComposeManifests(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetComposeMetadata request
	GetComposeMetadata(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetErrorList request
	GetErrorList(ctx context.Context, params *GetErrorListParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetError request
	GetError(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetOpenapi request
	GetOpenapi(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
}

The interface specification for the client above.

type ClientOption

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

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) GetComposeLogsWithResponse

func (c *ClientWithResponses) GetComposeLogsWithResponse(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*GetComposeLogsResponse, error)

GetComposeLogsWithResponse request returning *GetComposeLogsResponse

func (*ClientWithResponses) GetComposeManifestsWithResponse

func (c *ClientWithResponses) GetComposeManifestsWithResponse(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*GetComposeManifestsResponse, error)

GetComposeManifestsWithResponse request returning *GetComposeManifestsResponse

func (*ClientWithResponses) GetComposeMetadataWithResponse

func (c *ClientWithResponses) GetComposeMetadataWithResponse(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*GetComposeMetadataResponse, error)

GetComposeMetadataWithResponse request returning *GetComposeMetadataResponse

func (*ClientWithResponses) GetComposeStatusWithResponse

func (c *ClientWithResponses) GetComposeStatusWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetComposeStatusResponse, error)

GetComposeStatusWithResponse request returning *GetComposeStatusResponse

func (*ClientWithResponses) GetErrorListWithResponse

func (c *ClientWithResponses) GetErrorListWithResponse(ctx context.Context, params *GetErrorListParams, reqEditors ...RequestEditorFn) (*GetErrorListResponse, error)

GetErrorListWithResponse request returning *GetErrorListResponse

func (*ClientWithResponses) GetErrorWithResponse

func (c *ClientWithResponses) GetErrorWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetErrorResponse, error)

GetErrorWithResponse request returning *GetErrorResponse

func (*ClientWithResponses) GetOpenapiWithResponse

func (c *ClientWithResponses) GetOpenapiWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetOpenapiResponse, error)

GetOpenapiWithResponse request returning *GetOpenapiResponse

func (*ClientWithResponses) PostComposeWithBodyWithResponse

func (c *ClientWithResponses) PostComposeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostComposeResponse, error)

PostComposeWithBodyWithResponse request with arbitrary body returning *PostComposeResponse

func (*ClientWithResponses) PostComposeWithResponse

func (c *ClientWithResponses) PostComposeWithResponse(ctx context.Context, body PostComposeJSONRequestBody, reqEditors ...RequestEditorFn) (*PostComposeResponse, error)

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// PostCompose request with any body
	PostComposeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostComposeResponse, error)

	PostComposeWithResponse(ctx context.Context, body PostComposeJSONRequestBody, reqEditors ...RequestEditorFn) (*PostComposeResponse, error)

	// GetComposeStatus request
	GetComposeStatusWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetComposeStatusResponse, error)

	// GetComposeLogs request
	GetComposeLogsWithResponse(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*GetComposeLogsResponse, error)

	// GetComposeManifests request
	GetComposeManifestsWithResponse(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*GetComposeManifestsResponse, error)

	// GetComposeMetadata request
	GetComposeMetadataWithResponse(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*GetComposeMetadataResponse, error)

	// GetErrorList request
	GetErrorListWithResponse(ctx context.Context, params *GetErrorListParams, reqEditors ...RequestEditorFn) (*GetErrorListResponse, error)

	// GetError request
	GetErrorWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetErrorResponse, error)

	// GetOpenapi request
	GetOpenapiWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetOpenapiResponse, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

type ComposeId

type ComposeId struct {
	Href string             `json:"href"`
	Id   openapi_types.UUID `json:"id"`
	Kind string             `json:"kind"`
}

ComposeId defines model for ComposeId.

type ComposeLogs

type ComposeLogs struct {
	Href        string        `json:"href"`
	Id          string        `json:"id"`
	ImageBuilds []interface{} `json:"image_builds"`
	Kind        string        `json:"kind"`
	Koji        *KojiLogs     `json:"koji,omitempty"`
}

ComposeLogs defines model for ComposeLogs.

type ComposeManifests

type ComposeManifests struct {
	Href      string        `json:"href"`
	Id        string        `json:"id"`
	Kind      string        `json:"kind"`
	Manifests []interface{} `json:"manifests"`
}

ComposeManifests defines model for ComposeManifests.

type ComposeMetadata

type ComposeMetadata struct {
	Href string `json:"href"`
	Id   string `json:"id"`
	Kind string `json:"kind"`

	// ID (hash) of the built commit
	OstreeCommit *string `json:"ostree_commit,omitempty"`

	// Package list including NEVRA
	Packages *[]PackageMetadata `json:"packages,omitempty"`
}

ComposeMetadata defines model for ComposeMetadata.

type ComposeRequest

type ComposeRequest struct {
	Customizations *Customizations `json:"customizations,omitempty"`
	Distribution   string          `json:"distribution"`
	ImageRequest   *ImageRequest   `json:"image_request,omitempty"`
	ImageRequests  *[]ImageRequest `json:"image_requests,omitempty"`
	Koji           *Koji           `json:"koji,omitempty"`
}

ComposeRequest defines model for ComposeRequest.

type ComposeStatus

type ComposeStatus struct {
	Href          string             `json:"href"`
	Id            string             `json:"id"`
	ImageStatus   ImageStatus        `json:"image_status"`
	ImageStatuses *[]ImageStatus     `json:"image_statuses,omitempty"`
	Kind          string             `json:"kind"`
	KojiStatus    *KojiStatus        `json:"koji_status,omitempty"`
	Status        ComposeStatusValue `json:"status"`
}

ComposeStatus defines model for ComposeStatus.

type ComposeStatusError

type ComposeStatusError struct {
	Details *interface{} `json:"details,omitempty"`
	Id      int          `json:"id"`
	Reason  string       `json:"reason"`
}

ComposeStatusError defines model for ComposeStatusError.

type ComposeStatusValue

type ComposeStatusValue string

ComposeStatusValue defines model for ComposeStatusValue.

const (
	ComposeStatusValueFailure ComposeStatusValue = "failure"
	ComposeStatusValuePending ComposeStatusValue = "pending"
	ComposeStatusValueSuccess ComposeStatusValue = "success"
)

Defines values for ComposeStatusValue.

type Container

type Container struct {
	// Name to use for the container from the image
	Name   *string `json:"name,omitempty"`
	Source string  `json:"source"`

	// Control TLS verifification
	TlsVerify *bool `json:"tls_verify,omitempty"`
}

Container defines model for Container.

type ContainerUploadOptions

type ContainerUploadOptions struct {
	// Name for the created container image
	Name *string `json:"name,omitempty"`

	// Tag for the created container image
	Tag *string `json:"tag,omitempty"`
}

ContainerUploadOptions defines model for ContainerUploadOptions.

type ContainerUploadStatus

type ContainerUploadStatus struct {
	// Digest of the manifest of the uploaded container on the registry
	Digest string `json:"digest"`

	// FQDN of the uploaded image
	Url string `json:"url"`
}

ContainerUploadStatus defines model for ContainerUploadStatus.

type Customizations

type Customizations struct {
	Containers *[]Container  `json:"containers,omitempty"`
	Filesystem *[]Filesystem `json:"filesystem,omitempty"`
	Packages   *[]string     `json:"packages,omitempty"`

	// Extra repositories for packages specified in customizations. These
	// repositories will only be used to depsolve and retrieve packages
	// for the OS itself (they will not be available for the build root or
	// any other part of the build process). The package_sets field for these
	// repositories is ignored.
	PayloadRepositories *[]Repository `json:"payload_repositories,omitempty"`
	Services            *struct {
		// List of services to disable by default
		Disabled *[]string `json:"disabled,omitempty"`

		// List of services to enable by default
		Enabled *[]string `json:"enabled,omitempty"`
	} `json:"services,omitempty"`
	Subscription *Subscription `json:"subscription,omitempty"`
	Users        *[]User       `json:"users,omitempty"`
}

Customizations defines model for Customizations.

type Error

type Error struct {
	Code        string       `json:"code"`
	Details     *interface{} `json:"details,omitempty"`
	Href        string       `json:"href"`
	Id          string       `json:"id"`
	Kind        string       `json:"kind"`
	OperationId string       `json:"operation_id"`
	Reason      string       `json:"reason"`
}

Error defines model for Error.

type ErrorList

type ErrorList struct {
	Items []Error `json:"items"`
	Kind  string  `json:"kind"`
	Page  int     `json:"page"`
	Size  int     `json:"size"`
	Total int     `json:"total"`
}

ErrorList defines model for ErrorList.

type Filesystem

type Filesystem struct {
	MinSize    uint64 `json:"min_size"`
	Mountpoint string `json:"mountpoint"`
}

Filesystem defines model for Filesystem.

type GCPUploadOptions

type GCPUploadOptions struct {
	// Name of an existing STANDARD Storage class Bucket.
	Bucket string `json:"bucket"`

	// The name to use for the imported and shared Compute Engine image.
	// The image name must be unique within the GCP project, which is used
	// for the OS image upload and import. If not specified a random
	// 'composer-api-<uuid>' string is used as the image name.
	ImageName *string `json:"image_name,omitempty"`

	// The GCP region where the OS image will be imported to and shared from.
	// The value must be a valid GCP location. See https://cloud.google.com/storage/docs/locations.
	// If not specified, the multi-region location closest to the source
	// (source Storage Bucket location) is chosen automatically.
	Region string `json:"region"`

	// List of valid Google accounts to share the imported Compute Engine image with.
	// Each string must contain a specifier of the account type. Valid formats are:
	//   - 'user:{emailid}': An email address that represents a specific
	//     Google account. For example, 'alice@example.com'.
	//   - 'serviceAccount:{emailid}': An email address that represents a
	//     service account. For example, 'my-other-app@appspot.gserviceaccount.com'.
	//   - 'group:{emailid}': An email address that represents a Google group.
	//     For example, 'admins@example.com'.
	//   - 'domain:{domain}': The G Suite domain (primary) that represents all
	//     the users of that domain. For example, 'google.com' or 'example.com'.
	// If not specified, the imported Compute Engine image is not shared with any
	// account.
	ShareWithAccounts *[]string `json:"share_with_accounts,omitempty"`
}

GCPUploadOptions defines model for GCPUploadOptions.

type GCPUploadStatus

type GCPUploadStatus struct {
	ImageName string `json:"image_name"`
	ProjectId string `json:"project_id"`
}

GCPUploadStatus defines model for GCPUploadStatus.

type GetComposeLogsResponse

type GetComposeLogsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ComposeLogs
}

func ParseGetComposeLogsResponse

func ParseGetComposeLogsResponse(rsp *http.Response) (*GetComposeLogsResponse, error)

ParseGetComposeLogsResponse parses an HTTP response from a GetComposeLogsWithResponse call

func (GetComposeLogsResponse) Status

func (r GetComposeLogsResponse) Status() string

Status returns HTTPResponse.Status

func (GetComposeLogsResponse) StatusCode

func (r GetComposeLogsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetComposeManifestsResponse

type GetComposeManifestsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ComposeManifests
}

func ParseGetComposeManifestsResponse

func ParseGetComposeManifestsResponse(rsp *http.Response) (*GetComposeManifestsResponse, error)

ParseGetComposeManifestsResponse parses an HTTP response from a GetComposeManifestsWithResponse call

func (GetComposeManifestsResponse) Status

Status returns HTTPResponse.Status

func (GetComposeManifestsResponse) StatusCode

func (r GetComposeManifestsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetComposeMetadataResponse

type GetComposeMetadataResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ComposeMetadata
	JSON400      *Error
	JSON401      *Error
	JSON403      *Error
	JSON404      *Error
	JSON500      *Error
}

func ParseGetComposeMetadataResponse

func ParseGetComposeMetadataResponse(rsp *http.Response) (*GetComposeMetadataResponse, error)

ParseGetComposeMetadataResponse parses an HTTP response from a GetComposeMetadataWithResponse call

func (GetComposeMetadataResponse) Status

Status returns HTTPResponse.Status

func (GetComposeMetadataResponse) StatusCode

func (r GetComposeMetadataResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetComposeStatusResponse

type GetComposeStatusResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ComposeStatus
	JSON400      *Error
	JSON401      *Error
	JSON403      *Error
	JSON404      *Error
	JSON500      *Error
}

func ParseGetComposeStatusResponse

func ParseGetComposeStatusResponse(rsp *http.Response) (*GetComposeStatusResponse, error)

ParseGetComposeStatusResponse parses an HTTP response from a GetComposeStatusWithResponse call

func (GetComposeStatusResponse) Status

func (r GetComposeStatusResponse) Status() string

Status returns HTTPResponse.Status

func (GetComposeStatusResponse) StatusCode

func (r GetComposeStatusResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetErrorListParams

type GetErrorListParams struct {
	// Page index
	Page *Page `form:"page,omitempty" json:"page,omitempty"`

	// Number of items in each page
	Size *Size `form:"size,omitempty" json:"size,omitempty"`
}

GetErrorListParams defines parameters for GetErrorList.

type GetErrorListResponse

type GetErrorListResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ErrorList
	JSON401      *Error
	JSON403      *Error
	JSON404      *Error
	JSON500      *Error
}

func ParseGetErrorListResponse

func ParseGetErrorListResponse(rsp *http.Response) (*GetErrorListResponse, error)

ParseGetErrorListResponse parses an HTTP response from a GetErrorListWithResponse call

func (GetErrorListResponse) Status

func (r GetErrorListResponse) Status() string

Status returns HTTPResponse.Status

func (GetErrorListResponse) StatusCode

func (r GetErrorListResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetErrorResponse

type GetErrorResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Error
	JSON401      *Error
	JSON403      *Error
	JSON404      *Error
	JSON500      *Error
}

func ParseGetErrorResponse

func ParseGetErrorResponse(rsp *http.Response) (*GetErrorResponse, error)

ParseGetErrorResponse parses an HTTP response from a GetErrorWithResponse call

func (GetErrorResponse) Status

func (r GetErrorResponse) Status() string

Status returns HTTPResponse.Status

func (GetErrorResponse) StatusCode

func (r GetErrorResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetOpenapiResponse

type GetOpenapiResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON500      *Error
}

func ParseGetOpenapiResponse

func ParseGetOpenapiResponse(rsp *http.Response) (*GetOpenapiResponse, error)

ParseGetOpenapiResponse parses an HTTP response from a GetOpenapiWithResponse call

func (GetOpenapiResponse) Status

func (r GetOpenapiResponse) Status() string

Status returns HTTPResponse.Status

func (GetOpenapiResponse) StatusCode

func (r GetOpenapiResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type HttpRequestDoer

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

Doer performs HTTP requests.

The standard http.Client implements this interface.

type ImageRequest

type ImageRequest struct {
	Architecture string       `json:"architecture"`
	ImageType    ImageTypes   `json:"image_type"`
	Ostree       *OSTree      `json:"ostree,omitempty"`
	Repositories []Repository `json:"repositories"`

	// This should really be oneOf but AWSS3UploadOptions is a subset of
	// AWSEC2UploadOptions. This means that all AWSEC2UploadOptions objects
	// are also valid AWSS3UploadOptionas objects which violates the oneOf
	// rules. Therefore, we have to use anyOf here but be aware that it isn't
	// possible to mix and match more schemas together.
	UploadOptions *UploadOptions `json:"upload_options,omitempty"`
}

ImageRequest defines model for ImageRequest.

type ImageStatus

type ImageStatus struct {
	Error        *ComposeStatusError `json:"error,omitempty"`
	Status       ImageStatusValue    `json:"status"`
	UploadStatus *UploadStatus       `json:"upload_status,omitempty"`
}

ImageStatus defines model for ImageStatus.

type ImageStatusValue

type ImageStatusValue string

ImageStatusValue defines model for ImageStatusValue.

const (
	ImageStatusValueBuilding    ImageStatusValue = "building"
	ImageStatusValueFailure     ImageStatusValue = "failure"
	ImageStatusValuePending     ImageStatusValue = "pending"
	ImageStatusValueRegistering ImageStatusValue = "registering"
	ImageStatusValueSuccess     ImageStatusValue = "success"
	ImageStatusValueUploading   ImageStatusValue = "uploading"
)

Defines values for ImageStatusValue.

type ImageTypes

type ImageTypes string

ImageTypes defines model for ImageTypes.

const (
	ImageTypesAws            ImageTypes = "aws"
	ImageTypesAwsHaRhui      ImageTypes = "aws-ha-rhui"
	ImageTypesAwsRhui        ImageTypes = "aws-rhui"
	ImageTypesAwsSapRhui     ImageTypes = "aws-sap-rhui"
	ImageTypesAzure          ImageTypes = "azure"
	ImageTypesAzureRhui      ImageTypes = "azure-rhui"
	ImageTypesEdgeCommit     ImageTypes = "edge-commit"
	ImageTypesEdgeContainer  ImageTypes = "edge-container"
	ImageTypesEdgeInstaller  ImageTypes = "edge-installer"
	ImageTypesGcp            ImageTypes = "gcp"
	ImageTypesGcpRhui        ImageTypes = "gcp-rhui"
	ImageTypesGuestImage     ImageTypes = "guest-image"
	ImageTypesImageInstaller ImageTypes = "image-installer"
	ImageTypesVsphere        ImageTypes = "vsphere"
)

Defines values for ImageTypes.

type Koji

type Koji struct {
	Name    string `json:"name"`
	Release string `json:"release"`
	Server  string `json:"server"`
	TaskId  int    `json:"task_id"`
	Version string `json:"version"`
}

Koji defines model for Koji.

type KojiLogs

type KojiLogs struct {
	Import interface{} `json:"import"`
	Init   interface{} `json:"init"`
}

KojiLogs defines model for KojiLogs.

type KojiStatus

type KojiStatus struct {
	BuildId *int `json:"build_id,omitempty"`
}

KojiStatus defines model for KojiStatus.

type List

type List struct {
	Kind  string `json:"kind"`
	Page  int    `json:"page"`
	Size  int    `json:"size"`
	Total int    `json:"total"`
}

List defines model for List.

type MockClientInterface

type MockClientInterface struct {
	// contains filtered or unexported fields
}

MockClientInterface is a mock of ClientInterface interface.

func NewMockClientInterface

func NewMockClientInterface(ctrl *gomock.Controller) *MockClientInterface

NewMockClientInterface creates a new mock instance.

func (*MockClientInterface) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockClientInterface) GetComposeLogs

func (m *MockClientInterface) GetComposeLogs(ctx context.Context, id types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error)

GetComposeLogs mocks base method.

func (*MockClientInterface) GetComposeManifests

func (m *MockClientInterface) GetComposeManifests(ctx context.Context, id types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error)

GetComposeManifests mocks base method.

func (*MockClientInterface) GetComposeMetadata

func (m *MockClientInterface) GetComposeMetadata(ctx context.Context, id types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error)

GetComposeMetadata mocks base method.

func (*MockClientInterface) GetComposeStatus

func (m *MockClientInterface) GetComposeStatus(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)

GetComposeStatus mocks base method.

func (*MockClientInterface) GetError

func (m *MockClientInterface) GetError(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)

GetError mocks base method.

func (*MockClientInterface) GetErrorList

func (m *MockClientInterface) GetErrorList(ctx context.Context, params *GetErrorListParams, reqEditors ...RequestEditorFn) (*http.Response, error)

GetErrorList mocks base method.

func (*MockClientInterface) GetOpenapi

func (m *MockClientInterface) GetOpenapi(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

GetOpenapi mocks base method.

func (*MockClientInterface) PostCompose

func (m *MockClientInterface) PostCompose(ctx context.Context, body PostComposeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

PostCompose mocks base method.

func (*MockClientInterface) PostComposeWithBody

func (m *MockClientInterface) PostComposeWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

PostComposeWithBody mocks base method.

type MockClientInterfaceMockRecorder

type MockClientInterfaceMockRecorder struct {
	// contains filtered or unexported fields
}

MockClientInterfaceMockRecorder is the mock recorder for MockClientInterface.

func (*MockClientInterfaceMockRecorder) GetComposeLogs

func (mr *MockClientInterfaceMockRecorder) GetComposeLogs(ctx, id interface{}, reqEditors ...interface{}) *gomock.Call

GetComposeLogs indicates an expected call of GetComposeLogs.

func (*MockClientInterfaceMockRecorder) GetComposeManifests

func (mr *MockClientInterfaceMockRecorder) GetComposeManifests(ctx, id interface{}, reqEditors ...interface{}) *gomock.Call

GetComposeManifests indicates an expected call of GetComposeManifests.

func (*MockClientInterfaceMockRecorder) GetComposeMetadata

func (mr *MockClientInterfaceMockRecorder) GetComposeMetadata(ctx, id interface{}, reqEditors ...interface{}) *gomock.Call

GetComposeMetadata indicates an expected call of GetComposeMetadata.

func (*MockClientInterfaceMockRecorder) GetComposeStatus

func (mr *MockClientInterfaceMockRecorder) GetComposeStatus(ctx, id interface{}, reqEditors ...interface{}) *gomock.Call

GetComposeStatus indicates an expected call of GetComposeStatus.

func (*MockClientInterfaceMockRecorder) GetError

func (mr *MockClientInterfaceMockRecorder) GetError(ctx, id interface{}, reqEditors ...interface{}) *gomock.Call

GetError indicates an expected call of GetError.

func (*MockClientInterfaceMockRecorder) GetErrorList

func (mr *MockClientInterfaceMockRecorder) GetErrorList(ctx, params interface{}, reqEditors ...interface{}) *gomock.Call

GetErrorList indicates an expected call of GetErrorList.

func (*MockClientInterfaceMockRecorder) GetOpenapi

func (mr *MockClientInterfaceMockRecorder) GetOpenapi(ctx interface{}, reqEditors ...interface{}) *gomock.Call

GetOpenapi indicates an expected call of GetOpenapi.

func (*MockClientInterfaceMockRecorder) PostCompose

func (mr *MockClientInterfaceMockRecorder) PostCompose(ctx, body interface{}, reqEditors ...interface{}) *gomock.Call

PostCompose indicates an expected call of PostCompose.

func (*MockClientInterfaceMockRecorder) PostComposeWithBody

func (mr *MockClientInterfaceMockRecorder) PostComposeWithBody(ctx, contentType, body interface{}, reqEditors ...interface{}) *gomock.Call

PostComposeWithBody indicates an expected call of PostComposeWithBody.

type MockClientWithResponsesInterface

type MockClientWithResponsesInterface struct {
	// contains filtered or unexported fields
}

MockClientWithResponsesInterface is a mock of ClientWithResponsesInterface interface.

func NewMockClientWithResponsesInterface

func NewMockClientWithResponsesInterface(ctrl *gomock.Controller) *MockClientWithResponsesInterface

NewMockClientWithResponsesInterface creates a new mock instance.

func (*MockClientWithResponsesInterface) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockClientWithResponsesInterface) GetComposeLogsWithResponse

func (m *MockClientWithResponsesInterface) GetComposeLogsWithResponse(ctx context.Context, id types.UUID, reqEditors ...RequestEditorFn) (*GetComposeLogsResponse, error)

GetComposeLogsWithResponse mocks base method.

func (*MockClientWithResponsesInterface) GetComposeManifestsWithResponse

func (m *MockClientWithResponsesInterface) GetComposeManifestsWithResponse(ctx context.Context, id types.UUID, reqEditors ...RequestEditorFn) (*GetComposeManifestsResponse, error)

GetComposeManifestsWithResponse mocks base method.

func (*MockClientWithResponsesInterface) GetComposeMetadataWithResponse

func (m *MockClientWithResponsesInterface) GetComposeMetadataWithResponse(ctx context.Context, id types.UUID, reqEditors ...RequestEditorFn) (*GetComposeMetadataResponse, error)

GetComposeMetadataWithResponse mocks base method.

func (*MockClientWithResponsesInterface) GetComposeStatusWithResponse

func (m *MockClientWithResponsesInterface) GetComposeStatusWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetComposeStatusResponse, error)

GetComposeStatusWithResponse mocks base method.

func (*MockClientWithResponsesInterface) GetErrorListWithResponse

func (m *MockClientWithResponsesInterface) GetErrorListWithResponse(ctx context.Context, params *GetErrorListParams, reqEditors ...RequestEditorFn) (*GetErrorListResponse, error)

GetErrorListWithResponse mocks base method.

func (*MockClientWithResponsesInterface) GetErrorWithResponse

func (m *MockClientWithResponsesInterface) GetErrorWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetErrorResponse, error)

GetErrorWithResponse mocks base method.

func (*MockClientWithResponsesInterface) GetOpenapiWithResponse

func (m *MockClientWithResponsesInterface) GetOpenapiWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetOpenapiResponse, error)

GetOpenapiWithResponse mocks base method.

func (*MockClientWithResponsesInterface) PostComposeWithBodyWithResponse

func (m *MockClientWithResponsesInterface) PostComposeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostComposeResponse, error)

PostComposeWithBodyWithResponse mocks base method.

func (*MockClientWithResponsesInterface) PostComposeWithResponse

PostComposeWithResponse mocks base method.

type MockClientWithResponsesInterfaceMockRecorder

type MockClientWithResponsesInterfaceMockRecorder struct {
	// contains filtered or unexported fields
}

MockClientWithResponsesInterfaceMockRecorder is the mock recorder for MockClientWithResponsesInterface.

func (*MockClientWithResponsesInterfaceMockRecorder) GetComposeLogsWithResponse

func (mr *MockClientWithResponsesInterfaceMockRecorder) GetComposeLogsWithResponse(ctx, id interface{}, reqEditors ...interface{}) *gomock.Call

GetComposeLogsWithResponse indicates an expected call of GetComposeLogsWithResponse.

func (*MockClientWithResponsesInterfaceMockRecorder) GetComposeManifestsWithResponse

func (mr *MockClientWithResponsesInterfaceMockRecorder) GetComposeManifestsWithResponse(ctx, id interface{}, reqEditors ...interface{}) *gomock.Call

GetComposeManifestsWithResponse indicates an expected call of GetComposeManifestsWithResponse.

func (*MockClientWithResponsesInterfaceMockRecorder) GetComposeMetadataWithResponse

func (mr *MockClientWithResponsesInterfaceMockRecorder) GetComposeMetadataWithResponse(ctx, id interface{}, reqEditors ...interface{}) *gomock.Call

GetComposeMetadataWithResponse indicates an expected call of GetComposeMetadataWithResponse.

func (*MockClientWithResponsesInterfaceMockRecorder) GetComposeStatusWithResponse

func (mr *MockClientWithResponsesInterfaceMockRecorder) GetComposeStatusWithResponse(ctx, id interface{}, reqEditors ...interface{}) *gomock.Call

GetComposeStatusWithResponse indicates an expected call of GetComposeStatusWithResponse.

func (*MockClientWithResponsesInterfaceMockRecorder) GetErrorListWithResponse

func (mr *MockClientWithResponsesInterfaceMockRecorder) GetErrorListWithResponse(ctx, params interface{}, reqEditors ...interface{}) *gomock.Call

GetErrorListWithResponse indicates an expected call of GetErrorListWithResponse.

func (*MockClientWithResponsesInterfaceMockRecorder) GetErrorWithResponse

func (mr *MockClientWithResponsesInterfaceMockRecorder) GetErrorWithResponse(ctx, id interface{}, reqEditors ...interface{}) *gomock.Call

GetErrorWithResponse indicates an expected call of GetErrorWithResponse.

func (*MockClientWithResponsesInterfaceMockRecorder) GetOpenapiWithResponse

func (mr *MockClientWithResponsesInterfaceMockRecorder) GetOpenapiWithResponse(ctx interface{}, reqEditors ...interface{}) *gomock.Call

GetOpenapiWithResponse indicates an expected call of GetOpenapiWithResponse.

func (*MockClientWithResponsesInterfaceMockRecorder) PostComposeWithBodyWithResponse

func (mr *MockClientWithResponsesInterfaceMockRecorder) PostComposeWithBodyWithResponse(ctx, contentType, body interface{}, reqEditors ...interface{}) *gomock.Call

PostComposeWithBodyWithResponse indicates an expected call of PostComposeWithBodyWithResponse.

func (*MockClientWithResponsesInterfaceMockRecorder) PostComposeWithResponse

func (mr *MockClientWithResponsesInterfaceMockRecorder) PostComposeWithResponse(ctx, body interface{}, reqEditors ...interface{}) *gomock.Call

PostComposeWithResponse indicates an expected call of PostComposeWithResponse.

type MockHttpRequestDoer

type MockHttpRequestDoer struct {
	// contains filtered or unexported fields
}

MockHttpRequestDoer is a mock of HttpRequestDoer interface.

func NewMockHttpRequestDoer

func NewMockHttpRequestDoer(ctrl *gomock.Controller) *MockHttpRequestDoer

NewMockHttpRequestDoer creates a new mock instance.

func (*MockHttpRequestDoer) Do

Do mocks base method.

func (*MockHttpRequestDoer) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

type MockHttpRequestDoerMockRecorder

type MockHttpRequestDoerMockRecorder struct {
	// contains filtered or unexported fields
}

MockHttpRequestDoerMockRecorder is the mock recorder for MockHttpRequestDoer.

func (*MockHttpRequestDoerMockRecorder) Do

func (mr *MockHttpRequestDoerMockRecorder) Do(req interface{}) *gomock.Call

Do indicates an expected call of Do.

type MockUploadOptions

type MockUploadOptions struct {
	// contains filtered or unexported fields
}

MockUploadOptions is a mock of UploadOptions interface.

func NewMockUploadOptions

func NewMockUploadOptions(ctrl *gomock.Controller) *MockUploadOptions

NewMockUploadOptions creates a new mock instance.

func (*MockUploadOptions) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

type MockUploadOptionsMockRecorder

type MockUploadOptionsMockRecorder struct {
	// contains filtered or unexported fields
}

MockUploadOptionsMockRecorder is the mock recorder for MockUploadOptions.

type OSTree

type OSTree struct {
	// Can be either a commit (example: 02604b2da6e954bd34b8b82a835e5a77d2b60ffa), or a branch-like reference (example: rhel/8/x86_64/edge)
	Parent *string `json:"parent,omitempty"`
	Ref    *string `json:"ref,omitempty"`
	Url    *string `json:"url,omitempty"`
}

OSTree defines model for OSTree.

type ObjectReference

type ObjectReference struct {
	Href string `json:"href"`
	Id   string `json:"id"`
	Kind string `json:"kind"`
}

ObjectReference defines model for ObjectReference.

type PackageMetadata

type PackageMetadata struct {
	Arch      string  `json:"arch"`
	Epoch     *string `json:"epoch,omitempty"`
	Name      string  `json:"name"`
	Release   string  `json:"release"`
	Sigmd5    string  `json:"sigmd5"`
	Signature *string `json:"signature,omitempty"`
	Type      string  `json:"type"`
	Version   string  `json:"version"`
}

PackageMetadata defines model for PackageMetadata.

type Page

type Page = string

Page defines model for page.

type PostComposeJSONBody

type PostComposeJSONBody = ComposeRequest

PostComposeJSONBody defines parameters for PostCompose.

type PostComposeJSONRequestBody

type PostComposeJSONRequestBody = PostComposeJSONBody

PostComposeJSONRequestBody defines body for PostCompose for application/json ContentType.

type PostComposeResponse

type PostComposeResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON201      *ComposeId
	JSON400      *Error
	JSON401      *Error
	JSON403      *Error
	JSON404      *Error
	JSON500      *Error
}

func ParsePostComposeResponse

func ParsePostComposeResponse(rsp *http.Response) (*PostComposeResponse, error)

ParsePostComposeResponse parses an HTTP response from a PostComposeWithResponse call

func (PostComposeResponse) Status

func (r PostComposeResponse) Status() string

Status returns HTTPResponse.Status

func (PostComposeResponse) StatusCode

func (r PostComposeResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Repository

type Repository struct {
	Baseurl  *string `json:"baseurl,omitempty"`
	CheckGpg *bool   `json:"check_gpg,omitempty"`

	// GPG key used to sign packages in this repository.
	Gpgkey     *string `json:"gpgkey,omitempty"`
	IgnoreSsl  *bool   `json:"ignore_ssl,omitempty"`
	Metalink   *string `json:"metalink,omitempty"`
	Mirrorlist *string `json:"mirrorlist,omitempty"`

	// Naming package sets for a repository assigns it to a specific part
	// (pipeline) of the build process.
	PackageSets *[]string `json:"package_sets,omitempty"`

	// Determines whether a valid subscription is required to access this repository.
	Rhsm *bool `json:"rhsm,omitempty"`
}

Repository defines model for Repository.

type RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

type Size

type Size = string

Size defines model for size.

type Subscription

type Subscription struct {
	ActivationKey string `json:"activation_key"`
	BaseUrl       string `json:"base_url"`
	Insights      bool   `json:"insights"`
	Organization  string `json:"organization"`
	ServerUrl     string `json:"server_url"`
}

Subscription defines model for Subscription.

type UploadOptions

type UploadOptions interface{}

This should really be oneOf but AWSS3UploadOptions is a subset of AWSEC2UploadOptions. This means that all AWSEC2UploadOptions objects are also valid AWSS3UploadOptionas objects which violates the oneOf rules. Therefore, we have to use anyOf here but be aware that it isn't possible to mix and match more schemas together.

type UploadStatus

type UploadStatus struct {
	Options interface{}       `json:"options"`
	Status  UploadStatusValue `json:"status"`
	Type    UploadTypes       `json:"type"`
}

UploadStatus defines model for UploadStatus.

type UploadStatusValue

type UploadStatusValue string

UploadStatusValue defines model for UploadStatusValue.

const (
	Failure UploadStatusValue = "failure"
	Pending UploadStatusValue = "pending"
	Running UploadStatusValue = "running"
	Success UploadStatusValue = "success"
)

Defines values for UploadStatusValue.

type UploadTypes

type UploadTypes string

UploadTypes defines model for UploadTypes.

const (
	UploadTypesAws       UploadTypes = "aws"
	UploadTypesAwsS3     UploadTypes = "aws.s3"
	UploadTypesAzure     UploadTypes = "azure"
	UploadTypesContainer UploadTypes = "container"
	UploadTypesGcp       UploadTypes = "gcp"
)

Defines values for UploadTypes.

type User

type User struct {
	Groups *[]string `json:"groups,omitempty"`
	Key    *string   `json:"key,omitempty"`
	Name   string    `json:"name"`
}

User defines model for User.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL