Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 24 additions & 15 deletions params/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,8 @@ type Instance struct {

// ProviderFault holds any error messages captured from the IaaS provider that is
// responsible for managing the lifecycle of the runner.
//
// swagger:strfmt byte
ProviderFault []byte `json:"provider_fault,omitempty"`

// StatusMessages is a list of status messages sent back by the runner as it sets itself
Expand Down Expand Up @@ -426,6 +428,8 @@ type BootstrapInstance struct {
// CACertBundle is a CA certificate bundle which will be sent to instances and which
// will tipically be installed as a system wide trusted root CA. by either cloud-init
// or whatever mechanism the provider will use to set up the runner.
//
// swagger:strfmt byte
CACertBundle []byte `json:"ca-cert-bundle,omitempty"`

// OSArch is the target OS CPU architecture of the runner.
Expand Down Expand Up @@ -1041,6 +1045,8 @@ type ControllerInfo struct {
// CACertBundle holds a certificate bundle meant to validate the certificate
// used by GARM itself. This can be just the root certificate that can validate
// the GARM TLS certificate, a chain or multiple root CAs.
//
// swagger:strfmt byte
CACertBundle []byte `json:"ca_cert_bundle,omitempty"`
// CachedGARMAgentReleaseFetchedAt is the timestamp when the release data was last fetched from GARMAgentReleasesURL
CachedGARMAgentReleaseFetchedAt *time.Time `json:"cached_garm_agent_release_fetched_at,omitempty"`
Expand Down Expand Up @@ -1107,14 +1113,15 @@ func (g GithubRateLimit) ResetAt() time.Time {

// swagger:model ForgeCredentials
type ForgeCredentials struct {
ID uint `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
APIBaseURL string `json:"api_base_url,omitempty"`
UploadBaseURL string `json:"upload_base_url,omitempty"`
BaseURL string `json:"base_url,omitempty"`
CABundle []byte `json:"ca_bundle,omitempty"`
AuthType ForgeAuthType `json:"auth-type,omitempty"`
ID uint `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
APIBaseURL string `json:"api_base_url,omitempty"`
UploadBaseURL string `json:"upload_base_url,omitempty"`
BaseURL string `json:"base_url,omitempty"`
// swagger:strfmt byte
CABundle []byte `json:"ca_bundle,omitempty"`
AuthType ForgeAuthType `json:"auth-type,omitempty"`

ForgeType EndpointType `json:"forge_type,omitempty"`

Expand Down Expand Up @@ -1449,11 +1456,12 @@ type ForgeEndpoints []ForgeEndpoint

// swagger:model ForgeEndpoint
type ForgeEndpoint struct {
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
APIBaseURL string `json:"api_base_url,omitempty"`
UploadBaseURL string `json:"upload_base_url,omitempty"`
BaseURL string `json:"base_url,omitempty"`
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
APIBaseURL string `json:"api_base_url,omitempty"`
UploadBaseURL string `json:"upload_base_url,omitempty"`
BaseURL string `json:"base_url,omitempty"`
// swagger:strfmt byte
CACertBundle []byte `json:"ca_cert_bundle,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
Expand Down Expand Up @@ -1489,8 +1497,9 @@ type Template struct {
Description string `json:"description"`
OSType commonParams.OSType `json:"os_type"`
ForgeType EndpointType `json:"forge_type,omitempty"`
Data []byte `json:"data"`
Owner string `json:"owner_id,omitempty"`
// swagger:strfmt byte
Data []byte `json:"data"`
Owner string `json:"owner_id,omitempty"`
}

// used by swagger client generated code
Expand Down
73 changes: 41 additions & 32 deletions params/requests.go
Original file line number Diff line number Diff line change
Expand Up @@ -262,15 +262,16 @@ type UpdateInstanceParams struct {
// for this instance.
Addresses []commonParams.Address `json:"addresses,omitempty"`
// Status is the status of the instance inside the provider (eg: running, stopped, etc)
Status commonParams.InstanceStatus `json:"status,omitempty"`
RunnerStatus RunnerStatus `json:"runner_status,omitempty"`
ProviderFault []byte `json:"provider_fault,omitempty"`
Heartbeat *time.Time `json:"heartbeat,omitempty"`
AgentID int64 `json:"-"`
CreateAttempt int `json:"-"`
TokenFetched *bool `json:"-"`
JitConfiguration map[string]string `json:"-"`
Capabilities *AgentCapabilities `json:"-"`
Status commonParams.InstanceStatus `json:"status,omitempty"`
RunnerStatus RunnerStatus `json:"runner_status,omitempty"`
// swagger:strfmt byte
ProviderFault []byte `json:"provider_fault,omitempty"`
Heartbeat *time.Time `json:"heartbeat,omitempty"`
AgentID int64 `json:"-"`
CreateAttempt int `json:"-"`
TokenFetched *bool `json:"-"`
JitConfiguration map[string]string `json:"-"`
Capabilities *AgentCapabilities `json:"-"`
}

type UpdateUserParams struct {
Expand Down Expand Up @@ -318,7 +319,8 @@ type CreateGithubEndpointParams struct {
APIBaseURL string `json:"api_base_url,omitempty"`
UploadBaseURL string `json:"upload_base_url,omitempty"`
BaseURL string `json:"base_url,omitempty"`
CACertBundle []byte `json:"ca_cert_bundle,omitempty"`
// swagger:strfmt byte
CACertBundle []byte `json:"ca_cert_bundle,omitempty"`
}

func (c CreateGithubEndpointParams) Validate() error {
Expand Down Expand Up @@ -385,7 +387,8 @@ type UpdateGithubEndpointParams struct {
APIBaseURL *string `json:"api_base_url,omitempty"`
UploadBaseURL *string `json:"upload_base_url,omitempty"`
BaseURL *string `json:"base_url,omitempty"`
CACertBundle []byte `json:"ca_cert_bundle,omitempty"`
// swagger:strfmt byte
CACertBundle []byte `json:"ca_cert_bundle,omitempty"`
}

func (u UpdateGithubEndpointParams) Validate() error {
Expand Down Expand Up @@ -445,8 +448,9 @@ type GithubPAT struct {

// swagger:model GithubApp
type GithubApp struct {
AppID int64 `json:"app_id,omitempty"`
InstallationID int64 `json:"installation_id,omitempty"`
AppID int64 `json:"app_id,omitempty"`
InstallationID int64 `json:"installation_id,omitempty"`
// swagger:strfmt byte
PrivateKeyBytes []byte `json:"private_key_bytes,omitempty"`
}

Expand Down Expand Up @@ -553,8 +557,9 @@ type UpdateControllerParams struct {
GARMAgentReleasesURL *string `json:"garm_agent_releases_url,omitempty"`
SyncGARMAgentTools *bool `json:"enable_agent_tools_sync,omitempty"`
MinimumJobAgeBackoff *uint `json:"minimum_job_age_backoff,omitempty"`
CACertBundle []byte `json:"ca_cert_bundle,omitempty"`
ClearCACertBundle *bool `json:"clear_ca_cert_bundle,omitempty"`
// swagger:strfmt byte
CACertBundle []byte `json:"ca_cert_bundle,omitempty"`
ClearCACertBundle *bool `json:"clear_ca_cert_bundle,omitempty"`
}

func (u UpdateControllerParams) Validate() error {
Expand Down Expand Up @@ -698,10 +703,11 @@ type UpdateScaleSetParams struct {

// swagger:model CreateGiteaEndpointParams
type CreateGiteaEndpointParams struct {
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
APIBaseURL string `json:"api_base_url,omitempty"`
BaseURL string `json:"base_url,omitempty"`
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
APIBaseURL string `json:"api_base_url,omitempty"`
BaseURL string `json:"base_url,omitempty"`
// swagger:strfmt byte
CACertBundle []byte `json:"ca_cert_bundle,omitempty"`
ToolsMetadataURL string `json:"tools_metadata_url,omitempty"`
UseInternalToolsMetadata *bool `json:"use_internal_tools_metadata,omitempty"`
Expand Down Expand Up @@ -764,12 +770,13 @@ func (c CreateGiteaEndpointParams) Validate() error {

// swagger:model UpdateGiteaEndpointParams
type UpdateGiteaEndpointParams struct {
Description *string `json:"description,omitempty"`
APIBaseURL *string `json:"api_base_url,omitempty"`
BaseURL *string `json:"base_url,omitempty"`
CACertBundle []byte `json:"ca_cert_bundle,omitempty"`
ToolsMetadataURL string `json:"tools_metadata_url,omitempty"`
UseInternalToolsMetadata *bool `json:"use_internal_tools_metadata,omitempty"`
Description *string `json:"description,omitempty"`
APIBaseURL *string `json:"api_base_url,omitempty"`
BaseURL *string `json:"base_url,omitempty"`
// swagger:strfmt byte
CACertBundle []byte `json:"ca_cert_bundle,omitempty"`
ToolsMetadataURL string `json:"tools_metadata_url,omitempty"`
UseInternalToolsMetadata *bool `json:"use_internal_tools_metadata,omitempty"`
}

func (u UpdateGiteaEndpointParams) Validate() error {
Expand Down Expand Up @@ -875,12 +882,13 @@ func (u UpdateGiteaCredentialsParams) Validate() error {

// swagger:model CreateTemplateParams
type CreateTemplateParams struct {
Name string `json:"name"`
Description string `json:"description"`
Data []byte `json:"data"`
OSType commonParams.OSType `json:"os_type"`
ForgeType EndpointType `json:"forge_type,omitempty"`
IsSystem bool `json:"-"`
Name string `json:"name"`
Description string `json:"description"`
// swagger:strfmt byte
Data []byte `json:"data"`
OSType commonParams.OSType `json:"os_type"`
ForgeType EndpointType `json:"forge_type,omitempty"`
IsSystem bool `json:"-"`
}

func (c *CreateTemplateParams) Validate() error {
Expand Down Expand Up @@ -910,7 +918,8 @@ func (c *CreateTemplateParams) Validate() error {
type UpdateTemplateParams struct {
Name *string `json:"name"`
Description *string `json:"description"`
Data []byte `json:"data"`
// swagger:strfmt byte
Data []byte `json:"data"`
}

func (u *UpdateTemplateParams) Validate() error {
Expand Down
52 changes: 26 additions & 26 deletions webapp/src/lib/api/generated/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@ export interface ControllerInfo {
'agent_url'?: string;
/**
* CACertBundle holds a certificate bundle meant to validate the certificate used by GARM itself. This can be just the root certificate that can validate the GARM TLS certificate, a chain or multiple root CAs.
* @type {Array<number>}
* @type {string}
* @memberof ControllerInfo
*/
'ca_cert_bundle'?: Array<number>;
'ca_cert_bundle'?: string;
/**
* CachedGARMAgentReleaseFetchedAt is the timestamp when the release data was last fetched from GARMAgentReleasesURL
* @type {string}
Expand Down Expand Up @@ -339,10 +339,10 @@ export interface CreateGiteaEndpointParams {
'base_url'?: string;
/**
*
* @type {Array<number>}
* @type {string}
* @memberof CreateGiteaEndpointParams
*/
'ca_cert_bundle'?: Array<number>;
'ca_cert_bundle'?: string;
/**
*
* @type {string}
Expand Down Expand Up @@ -431,10 +431,10 @@ export interface CreateGithubEndpointParams {
'base_url'?: string;
/**
*
* @type {Array<number>}
* @type {string}
* @memberof CreateGithubEndpointParams
*/
'ca_cert_bundle'?: Array<number>;
'ca_cert_bundle'?: string;
/**
*
* @type {string}
Expand Down Expand Up @@ -772,10 +772,10 @@ export interface CreateScaleSetParams {
export interface CreateTemplateParams {
/**
*
* @type {Array<number>}
* @type {string}
* @memberof CreateTemplateParams
*/
'data'?: Array<number>;
'data'?: string;
/**
*
* @type {string}
Expand Down Expand Up @@ -1114,10 +1114,10 @@ export interface ForgeCredentials {
'base_url'?: string;
/**
*
* @type {Array<number>}
* @type {string}
* @memberof ForgeCredentials
*/
'ca_bundle'?: Array<number>;
'ca_bundle'?: string;
/**
*
* @type {string}
Expand Down Expand Up @@ -1211,10 +1211,10 @@ export interface ForgeEndpoint {
'base_url'?: string;
/**
*
* @type {Array<number>}
* @type {string}
* @memberof ForgeEndpoint
*/
'ca_cert_bundle'?: Array<number>;
'ca_cert_bundle'?: string;
/**
*
* @type {string}
Expand Down Expand Up @@ -1576,10 +1576,10 @@ export interface GithubApp {
'installation_id'?: number;
/**
*
* @type {Array<number>}
* @type {string}
* @memberof GithubApp
*/
'private_key_bytes'?: Array<number>;
'private_key_bytes'?: string;
}
/**
*
Expand Down Expand Up @@ -1779,10 +1779,10 @@ export interface Instance {
'pool_id'?: string;
/**
* ProviderFault holds any error messages captured from the IaaS provider that is responsible for managing the lifecycle of the runner.
* @type {Array<number>}
* @type {string}
* @memberof Instance
*/
'provider_fault'?: Array<number>;
'provider_fault'?: string;
/**
* PeoviderID is the unique ID the provider associated with the compute instance. We use this to identify the instance in the provider.
* @type {string}
Expand Down Expand Up @@ -2913,10 +2913,10 @@ export interface Template {
'created_at'?: string;
/**
*
* @type {Array<number>}
* @type {string}
* @memberof Template
*/
'data'?: Array<number>;
'data'?: string;
/**
*
* @type {string}
Expand Down Expand Up @@ -2974,10 +2974,10 @@ export interface UpdateControllerParams {
'agent_url'?: string;
/**
*
* @type {Array<number>}
* @type {string}
* @memberof UpdateControllerParams
*/
'ca_cert_bundle'?: Array<number>;
'ca_cert_bundle'?: string;
/**
*
* @type {string}
Expand Down Expand Up @@ -3122,10 +3122,10 @@ export interface UpdateGiteaEndpointParams {
'base_url'?: string;
/**
*
* @type {Array<number>}
* @type {string}
* @memberof UpdateGiteaEndpointParams
*/
'ca_cert_bundle'?: Array<number>;
'ca_cert_bundle'?: string;
/**
*
* @type {string}
Expand Down Expand Up @@ -3196,10 +3196,10 @@ export interface UpdateGithubEndpointParams {
'base_url'?: string;
/**
*
* @type {Array<number>}
* @type {string}
* @memberof UpdateGithubEndpointParams
*/
'ca_cert_bundle'?: Array<number>;
'ca_cert_bundle'?: string;
/**
*
* @type {string}
Expand Down Expand Up @@ -3421,10 +3421,10 @@ export interface UpdateScaleSetParams {
export interface UpdateTemplateParams {
/**
*
* @type {Array<number>}
* @type {string}
* @memberof UpdateTemplateParams
*/
'data'?: Array<number>;
'data'?: string;
/**
*
* @type {string}
Expand Down
Loading