request

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2025 License: Apache-2.0 Imports: 8 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateBackendRequest

type CreateBackendRequest struct {
	// Name is the name of the backend.
	Name string `json:"name" binding:"required"`
	// Description is a human-readable description of the backend.
	Description string `json:"description"`
	// BackendConfig is the configuration of the backend.
	BackendConfig v1.BackendConfig `json:"backendConfig" binding:"required"`
}

CreateBackendRequest represents the create request structure for backend.

func (*CreateBackendRequest) Decode

func (payload *CreateBackendRequest) Decode(r *http.Request) error

func (*CreateBackendRequest) Validate added in v0.14.0

func (payload *CreateBackendRequest) Validate() error

type CreateModuleRequest added in v0.14.0

type CreateModuleRequest struct {
	// Name is the module name.
	Name string `json:"name" binding:"required"`
	// URL is the module oci artifact registry URL.
	URL string `json:"url" binding:"required"`
	// Description is a human-readable description of the module.
	Description string `json:"description"`
	// Owners is a list of owners for the module.
	Owners []string `json:"owners"`
	// Doc is the documentation URL of the module.
	Doc string `json:"doc"`
}

CreateModuleRequest represents the create request structure for module.

func (*CreateModuleRequest) Decode added in v0.14.0

func (payload *CreateModuleRequest) Decode(r *http.Request) error

func (*CreateModuleRequest) Validate added in v0.14.0

func (payload *CreateModuleRequest) Validate() error

type CreateOrganizationRequest

type CreateOrganizationRequest struct {
	// Name is the name of the organization.
	Name string `json:"name" binding:"required"`
	// Description is a human-readable description of the organization.
	Description string `json:"description"`
	// Labels are custom labels associated with the organization.
	Labels []string `json:"labels"`
	// Owners is a list of owners for the organization.
	Owners []string `json:"owners" binding:"required"`
}

CreateOrganizationRequest represents the create request structure for organization.

func (*CreateOrganizationRequest) Decode

func (payload *CreateOrganizationRequest) Decode(r *http.Request) error

func (*CreateOrganizationRequest) Validate added in v0.13.0

func (payload *CreateOrganizationRequest) Validate() error

type CreateProjectRequest

type CreateProjectRequest struct {
	// Name is the name of the project.
	Name string `json:"name" binding:"required"`
	// SourceID is the configuration source id associated with the project.
	SourceID uint `json:"sourceID"`
	// OrganizationID is the organization id associated with the project.
	OrganizationID uint `json:"organizationID"`
	// Description is a human-readable description of the project.
	Description string `json:"description"`
	// Path is the relative path of the project within the sources.
	Path string `json:"path" binding:"required"`
	// Domain is the domain of the project, typically serving as the parent folder name for the project.
	Domain string `json:"domain"`
	// Labels are custom labels associated with the project.
	Labels []string `json:"labels"`
	// Owners is a list of owners for the project.
	Owners []string `json:"owners"`
}

CreateProjectRequest represents the create request structure for project.

func (*CreateProjectRequest) Decode

func (payload *CreateProjectRequest) Decode(r *http.Request) error

func (*CreateProjectRequest) Validate added in v0.13.0

func (payload *CreateProjectRequest) Validate() error

type CreateRunRequest added in v0.14.0

type CreateRunRequest struct {
	Type              string             `json:"type"`
	StackID           uint               `json:"stackID"`
	Workspace         string             `json:"workspace"`
	ImportedResources StackImportRequest `json:"importedResources"`
}

func (*CreateRunRequest) Decode added in v0.14.0

func (payload *CreateRunRequest) Decode(r *http.Request) error

type CreateSourceRequest

type CreateSourceRequest struct {
	// Name is the name of the source.
	Name string `json:"name" binding:"required"`
	// SourceProvider is the type of the source provider.
	SourceProvider string `json:"sourceProvider" binding:"required"`
	// Remote is the source URL, including scheme.
	Remote string `json:"remote" binding:"required"`
	// Description is a human-readable description of the source.
	Description string `json:"description"`
	// Labels are custom labels associated with the source.
	Labels []string `json:"labels"`
	// Owners is a list of owners for the source.
	Owners []string `json:"owners"`
}

CreateSourceRequest represents the create request structure for source.

func (*CreateSourceRequest) Decode

func (payload *CreateSourceRequest) Decode(r *http.Request) error

func (*CreateSourceRequest) Validate added in v0.14.0

func (payload *CreateSourceRequest) Validate() error

type CreateStackRequest

type CreateStackRequest struct {
	// Name is the name of the stack.
	Name string `json:"name" binding:"required"`
	// ProjectID is the project id of the stack within the source.
	ProjectID uint `json:"projectID"`
	// ProjectName is the project name of the stack within the source.
	ProjectName string `json:"projectName"`
	// Type is the type of the stack.
	Type string `json:"type"`
	// Path is the relative path of the stack within the source.
	Path string `json:"path"`
	// DesiredVersion is the desired revision of stack.
	DesiredVersion string `json:"desiredVersion"`
	// Description is a human-readable description of the stack.
	Description string `json:"description"`
	// Labels are custom labels associated with the stack.
	Labels []string `json:"labels"`
	// Owners is a list of owners for the stack.
	Owners []string `json:"owners"`
}

CreateStackRequest represents the create request structure for stack.

func (*CreateStackRequest) Decode

func (payload *CreateStackRequest) Decode(r *http.Request) error

func (*CreateStackRequest) Validate added in v0.13.0

func (payload *CreateStackRequest) Validate() error

type CreateVariableRequest added in v0.15.0

type CreateVariableRequest struct {
	// Name is the name of the variable.
	Name string `json:"name" binding:"required"`
	// Value is the value of the variable.
	Value string `json:"value"`
	// Type is the type of the variable.
	Type entity.VariableType `json:"type"`
	// VariableSet is the variable set to which the variable belongs.
	VariableSet string `json:"variableSet" binding:"required"`
}

CreateVariableRequest represents the create request structure for a variable.

func (*CreateVariableRequest) Decode added in v0.15.0

func (payload *CreateVariableRequest) Decode(r *http.Request) error

func (*CreateVariableRequest) Validate added in v0.15.0

func (payload *CreateVariableRequest) Validate() error

type CreateVariableSetRequest added in v0.15.0

type CreateVariableSetRequest struct {
	// Name is the name of the variable set.
	Name string `json:"name" binding:"required"`
	// Labels clarifies the scope of the variable set.
	Labels map[string]string `json:"labels" binding:"required"`
}

CreateVariableSetRequest represents the create request structure for a variable set.

func (*CreateVariableSetRequest) Decode added in v0.15.0

func (payload *CreateVariableSetRequest) Decode(r *http.Request) error

func (*CreateVariableSetRequest) Validate added in v0.15.0

func (payload *CreateVariableSetRequest) Validate() error

type CreateWorkspaceRequest

type CreateWorkspaceRequest struct {
	// Name is the name of the workspace.
	Name string `json:"name" binding:"required"`
	// Description is a human-readable description of the workspace.
	Description string `json:"description"`
	// Labels are custom labels associated with the workspace.
	Labels []string `json:"labels"`
	// Owners is a list of owners for the workspace.
	Owners []string `json:"owners" binding:"required"`
	// BackendID is the configuration backend id associated with the workspace.
	BackendID uint `json:"backendID" binding:"required"`
}

CreateWorkspaceRequest represents the create request structure for workspace.

func (*CreateWorkspaceRequest) Decode

func (payload *CreateWorkspaceRequest) Decode(r *http.Request) error

func (*CreateWorkspaceRequest) Validate added in v0.14.0

func (payload *CreateWorkspaceRequest) Validate() error

type StackImportRequest added in v0.13.0

type StackImportRequest struct {
	ImportedResources map[string]string `json:"importedResources"`
}

func (*StackImportRequest) Decode added in v0.13.0

func (payload *StackImportRequest) Decode(r *http.Request) error

type UpdateBackendRequest

type UpdateBackendRequest struct {
	// ID is the id of the backend.
	ID uint `json:"id" binding:"required"`
	// Name is the name of the backend.
	Name string `json:"name"`
	// Description is a human-readable description of the backend.
	Description string `json:"description"`
	// BackendConfig is the configuration of the backend.
	BackendConfig v1.BackendConfig `json:"backendConfig"`
}

UpdateBackendRequest represents the update request structure for backend.

func (*UpdateBackendRequest) Decode

func (payload *UpdateBackendRequest) Decode(r *http.Request) error

func (*UpdateBackendRequest) Validate added in v0.14.0

func (payload *UpdateBackendRequest) Validate() error

type UpdateModuleRequest added in v0.14.0

type UpdateModuleRequest struct {
	// Name is the module name.
	Name string `json:"name" binding:"required"`
	// URL is the module oci artifact registry URL.
	URL string `json:"url"`
	// Description is a human-readable description of the module.
	Description string `json:"description"`
	// Owners is a list of owners for the module.
	Owners []string `json:"owners"`
	// Doc is the documentation URL of the module.
	Doc string `json:"doc"`
}

UpdateModuleRequest represents the update request structure for module.

func (*UpdateModuleRequest) Decode added in v0.14.0

func (payload *UpdateModuleRequest) Decode(r *http.Request) error

func (*UpdateModuleRequest) Validate added in v0.14.0

func (payload *UpdateModuleRequest) Validate() error

type UpdateOrganizationRequest

type UpdateOrganizationRequest struct {
	// ID is the id of the organization.
	ID uint `json:"id" binding:"required"`
	// Name is the name of the organization.
	Name string `json:"name"`
	// Description is a human-readable description of the organization.
	Description string `json:"description"`
	// Labels are custom labels associated with the organization.
	Labels []string `json:"labels"`
	// Owners is a list of owners for the organization.
	Owners []string `json:"owners"`
}

UpdateOrganizationRequest represents the update request structure for organization.

func (*UpdateOrganizationRequest) Decode

func (payload *UpdateOrganizationRequest) Decode(r *http.Request) error

func (*UpdateOrganizationRequest) Validate added in v0.13.0

func (payload *UpdateOrganizationRequest) Validate() error

type UpdateProjectRequest

type UpdateProjectRequest struct {
	// ID is the id of the project.
	ID uint `json:"id" binding:"required"`
	// Name is the name of the project.
	Name string `json:"name"`
	// SourceID is the configuration source id associated with the project.
	SourceID uint `json:"sourceID"`
	// OrganizationID is the organization id associated with the project.
	OrganizationID uint `json:"organizationID"`
	// Description is a human-readable description of the project.
	Description string `json:"description"`
	// Path is the relative path of the project within the sources.
	Path string `json:"path"`
	// Domain is the domain of the project, typically serving as the parent folder name for the project.
	Domain string `json:"domain"`
	// Labels are custom labels associated with the project.
	Labels []string `json:"labels"`
	// Owners is a list of owners for the project.
	Owners []string `json:"owners"`
}

UpdateProjectRequest represents the update request structure for project.

func (*UpdateProjectRequest) Decode

func (payload *UpdateProjectRequest) Decode(r *http.Request) error

func (*UpdateProjectRequest) Validate added in v0.13.0

func (payload *UpdateProjectRequest) Validate() error

type UpdateRunRequest added in v0.14.0

type UpdateRunRequest struct {
	CreateRunRequest `json:",inline" yaml:",inline"`
}

type UpdateRunResultRequest added in v0.14.0

type UpdateRunResultRequest struct {
	Result string `json:"result"`
	Status string `json:"status"`
	Logs   string `json:"logs"`
}

type UpdateSourceRequest

type UpdateSourceRequest struct {
	// ID is the id of the source.
	ID uint `json:"id" binding:"required"`
	// Name is the name of the source.
	Name string `json:"name"`
	// SourceProvider is the type of the source provider.
	SourceProvider string `json:"sourceProvider"`
	// Remote is the source URL, including scheme.
	Remote string `json:"remote"`
	// Description is a human-readable description of the source.
	Description string `json:"description"`
	// Labels are custom labels associated with the source.
	Labels []string `json:"labels"`
	// Owners is a list of owners for the source.
	Owners []string `json:"owners"`
}

UpdateSourceRequest represents the update request structure for source.

func (*UpdateSourceRequest) Decode

func (payload *UpdateSourceRequest) Decode(r *http.Request) error

func (*UpdateSourceRequest) Validate added in v0.14.0

func (payload *UpdateSourceRequest) Validate() error

type UpdateStackRequest

type UpdateStackRequest struct {
	// ID is the id of the stack.
	ID uint `json:"id" binding:"required"`
	// Name is the name of the stack.
	Name string `json:"name"`
	// ProjectID is the project id of the stack within the source.
	ProjectID uint `json:"projectID"`
	// ProjectName is the project name of the stack within the source.
	ProjectName string `json:"projectName"`
	// Type is the type of the stack.
	Type string `json:"type"`
	// Path is the relative path of the stack within the source.
	Path string `json:"path"`
	// DesiredVersion is the desired revision of stack.
	DesiredVersion string `json:"desiredVersion"`
	// Description is a human-readable description of the stack.
	Description string `json:"description"`
	// Labels are custom labels associated with the stack.
	Labels []string `json:"labels"`
	// Owners is a list of owners for the stack.
	Owners []string `json:"owners"`
}

UpdateStackRequest represents the update request structure for stack.

func (*UpdateStackRequest) Decode

func (payload *UpdateStackRequest) Decode(r *http.Request) error

func (*UpdateStackRequest) Validate added in v0.13.0

func (payload *UpdateStackRequest) Validate() error

type UpdateVariableRequest added in v0.13.0

type UpdateVariableRequest struct {
	// Name is the name of the variable.
	Name string `json:"name" binding:"required"`
	// Value is the value of the variable.
	Value string `json:"value"`
	// Type is the type of the variable.
	Type entity.VariableType `json:"type"`
	// VariableSet is the variable set to which the variable belongs.
	VariableSet string `json:"variableSet" binding:"required"`
}

UpdateVariableRequest represents the update request structure for a variable.

func (*UpdateVariableRequest) Decode added in v0.13.0

func (payload *UpdateVariableRequest) Decode(r *http.Request) error

func (*UpdateVariableRequest) Validate added in v0.15.0

func (payload *UpdateVariableRequest) Validate() error

type UpdateVariableSetRequest added in v0.15.0

type UpdateVariableSetRequest struct {
	// Name is the name of the variable set.
	Name string `json:"name" binding:"required"`
	// Labels clarifies the scope of the variable set.
	Labels map[string]string `json:"labels" binding:"required"`
}

UpdateVariableSetRequest represents the update request structure for a variable set.

func (*UpdateVariableSetRequest) Decode added in v0.15.0

func (payload *UpdateVariableSetRequest) Decode(r *http.Request) error

func (*UpdateVariableSetRequest) Validate added in v0.15.0

func (payload *UpdateVariableSetRequest) Validate() error

type UpdateWorkspaceRequest

type UpdateWorkspaceRequest struct {
	// ID is the id of the workspace.
	ID uint `json:"id" binding:"required"`
	// Name is the name of the workspace.
	Name string `json:"name"`
	// Description is a human-readable description of the workspace.
	Description string `json:"description"`
	// Labels are custom labels associated with the workspace.
	Labels map[string]string `json:"labels"`
	// Owners is a list of owners for the workspace.
	Owners []string `json:"owners"`
}

UpdateWorkspaceRequest represents the update request structure for workspace.

func (*UpdateWorkspaceRequest) Decode

func (payload *UpdateWorkspaceRequest) Decode(r *http.Request) error

func (*UpdateWorkspaceRequest) Validate added in v0.14.0

func (payload *UpdateWorkspaceRequest) Validate() error

type WorkspaceConfigs added in v0.14.0

type WorkspaceConfigs struct {
	*v1.Workspace `yaml:",inline" json:",inline"`
}

func (*WorkspaceConfigs) Decode added in v0.14.0

func (payload *WorkspaceConfigs) Decode(r *http.Request) error

type WorkspaceCredentials added in v0.13.0

type WorkspaceCredentials struct {
	KubeConfigContent string `json:"kubeConfigContent,omitempty"`
	KubeConfigPath    string `json:"kubeConfigPath,omitempty"`
	AliCloudAccessKey string `json:"alicloudAccessKey,omitempty"`
	AliCloudSecretKey string `json:"alicloudSecretKey,omitempty"`
	AliCloudRegion    string `json:"alicloudRegion,omitempty"`
	AwsAccessKey      string `json:"awsAccessKey,omitempty"`
	AwsSecretKey      string `json:"awsSecretKey,omitempty"`
	AwsRegion         string `json:"awsRegion,omitempty"`
}

func (*WorkspaceCredentials) Decode added in v0.13.0

func (payload *WorkspaceCredentials) Decode(r *http.Request) error

Jump to

Keyboard shortcuts

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