request

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

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"`
}

CreateBackendRequest represents the create request structure for backend.

func (*CreateBackendRequest) Decode

func (payload *CreateBackendRequest) Decode(r *http.Request) 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

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,string" binding:"required"`
	// OrganizationID is the organization id associated with the project.
	OrganizationID uint `json:"organizationID,string" binding:"required"`
	// Description is a human-readable description of the project.
	Description string `json:"description"`
	// Path is the relative path of the project within the sourcs..
	Path string `json:"path" binding:"required"`
	// 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

type CreateSourceRequest

type CreateSourceRequest struct {
	// 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

type CreateStackRequest

type CreateStackRequest struct {
	// Name is the name of the stack.
	Name string `json:"name" binding:"required"`
	// SourceID is the configuration source id associated with the stack.
	// SourceID uint `json:"sourceID,string" binding:"required"`
	// ProjectID is the project id of the stack within the source.
	ProjectID uint `json:"projectID,string" binding:"required"`
	// OrganizationID is the organization id associated with the stack.
	// OrganizationID uint `json:"organizationID,string" binding:"required"`
	// Path is the relative path of the stack within the source.
	Path string `json:"path" binding:"required"`
	// DesiredVersion is the desired revision of stack.
	DesiredVersion string `json:"desiredVersion" binding:"required"`
	// 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

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,string" binding:"required"`
}

CreateWorkspaceRequest represents the create request structure for workspace.

func (*CreateWorkspaceRequest) Decode

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

type ExecutePreviewStackRequest

type ExecutePreviewStackRequest struct {
	// OutputFormat specify the output format, one of "", "json".
	OutputFormat string `json:"outputFormat,omitempty" binding:"oneof='' 'json'"`
	// DriftMode is a boolean field used to represent the state of the drift mode.
	DriftMode bool `json:"driftMode,omitempty" yaml:"driftMode,omitempty"`
}

type ExecuteStackRequest

type ExecuteStackRequest struct {
	// SourceProviderType is the type of the source provider.
	SourceProviderType string `json:"sourceProviderType"`
	// Remote is the remote url of the stack to be pulled.
	Remote string `json:"remote" binding:"required"`
	// Version is the version of the stack to be pulled.
	Version string `json:"version" binding:"required"`
	// Envs lets you set the env when executes in the form "key=value".
	Envs []string `json:"envs,omitempty" yaml:"envs,omitempty"`
	// AdditionalPaths is the additional paths to be added to the stack.
	AdditionalPaths []string `json:"additionalPaths,omitempty"`
	// DisableState is the flag to disable state management.
	DisableState bool `json:"disableState,omitempty"`
	// Extensions is the extensions for the stack request.
	Extensions service.Extensions `json:"extensions,omitempty"`
}

ExecuteStackRequest is the common request for preview and sync operation.

type InspectStacksRequest

type InspectStacksRequest struct {
	Verbose    bool     `json:"verbose,omitempty" yaml:"verbose,omitempty"`
	Remote     string   `json:"remote" yaml:"remote" binding:"required"`
	StackPaths []string `json:"stackPaths" yaml:"stackPaths" binding:"required"`
}

InspectStacksRequest represents the inspect request structure for stacks.

type PreviewStackRequest

type PreviewStackRequest struct {
	ExecuteStackRequest        `json:",inline"`
	ExecutePreviewStackRequest `json:",inline"`
	StackPath                  string `json:"stackPath" binding:"required"`
}

PreviewStackRequest represents the preview request structure for stack.

type PreviewStacksRequest

type PreviewStacksRequest struct {
	ExecuteStackRequest        `json:",inline"`
	ExecutePreviewStackRequest `json:",inline"`
	StackPaths                 []string `json:"stackPaths" binding:"required"`
}

PreviewStacksRequest represents the preview request structure for stacks.

type SyncStackRequest

type SyncStackRequest struct {
	ExecuteStackRequest `json:",inline"`
	StackPath           string `json:"stackPath" binding:"required"`
}

SyncStackRequest represents the sync request structure for stack.

type SyncStacksRequest

type SyncStacksRequest struct {
	ExecuteStackRequest `json:",inline"`
	StackPaths          []string `json:"stackPaths" binding:"required"`
}

SyncStacksRequest represents the sync request structure for stacks.

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

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 map[string]string `json:"labels"`
	// Owners is a list of owners for the organization.
	Owners []string `json:"owners" binding:"required"`
}

UpdateOrganizationRequest represents the update request structure for organization.

func (*UpdateOrganizationRequest) Decode

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

type UpdateProjectRequest

type UpdateProjectRequest struct {
	// ID is the id of the project.
	ID uint `json:"id" binding:"required"`
	// SourceID is the configuration source id associated with the project.
	SourceID uint `json:"sourceID,string"`
	// OrganizationID is the organization id associated with the project.
	OrganizationID uint `json:"organizationID,string"`
	// Name is the name of the project.
	Name string `json:"name"`
	// Description is a human-readable description of the project.
	Description string `json:"description"`
	// Path is the relative path of the project within the sourcs..
	Path string `json:"path"`
	// Labels are custom labels associated with the project.
	Labels map[string]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

type UpdateSourceRequest

type UpdateSourceRequest struct {
	// ID is the id of the source.
	ID uint `json:"id" binding:"required"`
	// 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

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"`
	// SourceID is the configuration source id associated with the stack.
	// SourceID uint `json:"sourceID,string"`
	// ProjectID is the project id of the stack within the stack.
	ProjectID uint `json:"projectID,string"`
	// OrganizationID is the organization id associated with the stack.
	// OrganizationID uint `json:"organizationID,string"`
	// Path is the relative path of the stack within the stack.
	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 map[string]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

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" binding:"required"`
	// BackendID is the configuration backend id associated with the workspace.
	BackendID uint `json:"backendID,string" binding:"required"`
}

UpdateWorkspaceRequest represents the update request structure for workspace.

func (*UpdateWorkspaceRequest) Decode

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

Jump to

Keyboard shortcuts

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