Documentation
¶
Index ¶
- Constants
- Variables
- func AddContainerEnvironmentVariable(container Id, key string, value string) error
- func AddContainerSecret(container Id, key string, value string) error
- func AddEnvironmentVariable(application Id, key string, value string) error
- func AddSecret(application Id, key string, value string) error
- func Bool(v bool) *bool
- func CancelEnvironmentDeployment(client *qovery.APIClient, envId string, watchFlag bool) error
- func CancelServiceDeployment(client *qovery.APIClient, envId string, serviceId string, ...) (string, error)
- func Capture(command *cobra.Command)
- func CaptureError(command *cobra.Command, stout string, stderr string)
- func CaptureWithEvent(command *cobra.Command, event string)
- func CaptureWithEventAndProperties(command *cobra.Command, event string, properties posthog.Properties)
- func CheckError(err error)
- func CreateEnvironmentAlias(client *qovery.APIClient, projectId string, environmentId string, key string, ...) error
- func CreateEnvironmentOverride(client *qovery.APIClient, projectId string, environmentId string, key string, ...) error
- func CreateEnvironmentVariable(client *qovery.APIClient, projectId string, environmentId string, key string, ...) error
- func CreateEnvironmentVariableAlias(client *qovery.APIClient, aliasParentId string, ...) error
- func CreateEnvironmentVariableOverride(client *qovery.APIClient, overrideParentId string, ...) error
- func CreateProjectAlias(client *qovery.APIClient, projectId string, key string, alias string) error
- func CreateProjectVariable(client *qovery.APIClient, projectId string, key string, value string, ...) error
- func CreateServiceAlias(client *qovery.APIClient, projectId string, environmentId string, ...) error
- func CreateServiceOverride(client *qovery.APIClient, projectId string, environmentId string, ...) error
- func CreateServiceVariable(client *qovery.APIClient, projectId string, environmentId string, ...) error
- func CurrentEnvironment(promptContext bool) (Id, Name, error)
- func CurrentOrganization(promptContext bool) (Id, Name, error)
- func CurrentProject(promptContext bool) (Id, Name, error)
- func DeleteContainerEnvironmentVariable(container Id, key string) error
- func DeleteContainerSecret(container Id, key string) error
- func DeleteEnvironmentVar(client *qovery.APIClient, environmentId string, key string) error
- func DeleteEnvironmentVariable(application Id, key string) error
- func DeleteFile(path string)
- func DeleteFolder(path string)
- func DeleteProjectVar(client *qovery.APIClient, projectId string, key string) error
- func DeleteSecret(application Id, key string) error
- func DeleteServiceVariable(client *qovery.APIClient, serviceId string, serviceType ServiceType, ...) error
- func DeleteTerraforms(client *qovery.APIClient, envId string, ...) error
- func DeployApplications(client *qovery.APIClient, envId string, applicationList []*qovery.Application, ...) error
- func DeployContainers(client *qovery.APIClient, envId string, ...) error
- func DeployDatabases(client *qovery.APIClient, envId string, databaseList []*qovery.Database) error
- func DeployHelms(client *qovery.APIClient, envId string, helmList []*qovery.HelmResponse, ...) error
- func DeployJobs(client *qovery.APIClient, envId string, jobList []*qovery.JobResponse, ...) error
- func DeployTerraforms(client *qovery.APIClient, envId string, ...) error
- func DryRunPrint(dryRunDisabled bool)
- func FindByApplicationName(applications []qovery.Application, name string) *qovery.Application
- func FindByClusterName(clusters []qovery.Cluster, name string) *qovery.Cluster
- func FindByContainerName(containers []qovery.ContainerResponse, name string) *qovery.ContainerResponse
- func FindByCustomDomainName(customDomains []qovery.CustomDomain, name string) *qovery.CustomDomain
- func FindByDatabaseName(databases []qovery.Database, name string) *qovery.Database
- func FindByEnvironmentName(environments []qovery.Environment, name string) *qovery.Environment
- func FindByHelmName(helms []qovery.HelmResponse, name string) *qovery.HelmResponse
- func FindByJobName(jobs []qovery.JobResponse, name string) *qovery.JobResponse
- func FindByOrganizationName(organizations []qovery.Organization, name string) *qovery.Organization
- func FindByProjectName(projects []qovery.Project, name string) *qovery.Project
- func FindByTerraformName(terraforms []qovery.TerraformResponse, name string) *qovery.TerraformResponse
- func FindEnvironmentVariableByKey(key string, envVars []qovery.VariableResponse) *qovery.VariableResponse
- func FindStatus(statuses []qovery.Status, serviceId string) string
- func FindStatusTextWithColor(statuses []qovery.Status, serviceId string) string
- func GetAccessToken() (AccessTokenType, AccessToken, error)
- func GetAdminUrl() string
- func GetAuthorizationHeaderValue(tokenType AccessTokenType, token AccessToken) string
- func GetClusterStatusTextWithColor(s qovery.ClusterStateEnum) string
- func GetDeploymentStageId(client *qovery.APIClient, serviceId string) string
- func GetDuration(startTime time.Time, endTime time.Time) string
- func GetEnvVarJsonOutput(variables []EnvVarLineOutput, sortKeys bool) string
- func GetEnvironmentStatus(statuses []qovery.EnvironmentStatus, serviceId string) string
- func GetEnvironmentStatusWithColor(statuses []qovery.EnvironmentStatus, serviceId string) string
- func GetFullPath(clusterId string) string
- func GetGitSource(helm *qovery.HelmResponse) *qovery.HelmSourceGitResponse
- func GetHelmRepository(helm *qovery.HelmResponse) *qovery.HelmSourceRepositoryResponse
- func GetJobDocker(job *qovery.JobResponse) *qovery.JobSourceDockerResponse
- func GetJobId(job *qovery.JobResponse) string
- func GetJobImage(job *qovery.JobResponse) *qovery.ContainerSource
- func GetJobName(job *qovery.JobResponse) string
- func GetQoveryClient(tokenType AccessTokenType, token AccessToken) *qovery.APIClient
- func GetQoveryClientPanicInCaseOfError() *qovery.APIClient
- func GetServiceNameByIdAndType(client *qovery.APIClient, serviceId string, serviceType string) string
- func GetStatusTextWithColor(s qovery.StateEnum) string
- func InitializeQoveryContext() error
- func Int32(v int32) *int32
- func IsEmptyOrBlank(str string) bool
- func IsTerminalClusterState(state qovery.ClusterStateEnum) bool
- func IsTerminalState(state qovery.StateEnum) bool
- func ListEnvironmentVariables(client *qovery.APIClient, environmentId string) ([]qovery.VariableResponse, error)
- func ListProjectVariables(client *qovery.APIClient, projectId string) ([]qovery.VariableResponse, error)
- func ListServiceVariables(client *qovery.APIClient, serviceId string, serviceType ServiceType) ([]qovery.VariableResponse, error)
- func Map[T, U any](slice []T, transformer func(T) U) []U
- func PrintContext() error
- func PrintTable(headers []string, data [][]string) error
- func Println(text string)
- func PrintlnError(err error)
- func PrintlnInfo(info string)
- func QoveryContextExists() bool
- func QoveryContextPath() (string, error)
- func QoveryDirExists() bool
- func QoveryDirPath() (string, error)
- func RandStringBytes(n int) string
- func ResetApplicationContext() error
- func ServiceTypeToScope(serviceType ServiceType) (qovery.APIVariableScopeEnum, error)
- func SetAccessToken(token AccessToken, expiration time.Time, refreshToken RefreshToken) error
- func SetContext(setProject bool, setEnvironment bool, setService bool, printFinalContext bool) error
- func SetEnvironment(env *Environment) error
- func SetOrganization(org *Organization) error
- func SetProject(project *Project) error
- func SetService(service *Service) error
- func StoreContext(context QoveryContext) error
- func ToIso8601(v *time.Time) *string
- func ToJobRequest(job qovery.JobResponse) qovery.JobRequest
- func UpdateEnvironmentVariable(client *qovery.APIClient, environmentId string, key string, value string) error
- func UpdateProjectVariable(client *qovery.APIClient, projectId string, key string, value string) error
- func UpdateServiceVariable(client *qovery.APIClient, key string, value string, serviceId string, ...) error
- func Validate(actionType string) bool
- func WatchApplication(applicationId string, envId string, client *qovery.APIClient)
- func WatchContainer(containerId string, envId string, client *qovery.APIClient)
- func WatchDatabase(databaseId string, envId string, client *qovery.APIClient)
- func WatchEnvironment(envId string, finalServiceState qovery.StateEnum, client *qovery.APIClient)
- func WatchEnvironmentWithOptions(envId string, finalServiceState qovery.StateEnum, client *qovery.APIClient, ...)
- func WatchHelm(helmId string, envId string, client *qovery.APIClient)
- func WatchJob(jobId string, envId string, client *qovery.APIClient)
- func WebsocketUrl() string
- func WriteInFile(clusterId string, fileName string, content []byte) string
- type AccessToken
- type AccessTokenType
- type Application
- type Container
- type EnvVarLineOutput
- type EnvVarLines
- type Environment
- type EnvironmentService
- type HttpResponseError
- type Id
- type Job
- type Name
- type Organization
- type Project
- type QoveryContext
- type RefreshToken
- type Role
- type Service
- type ServiceType
- type Status
- type TokenInformation
- type TokensResponse
- type Var
Constants ¶
View Source
const ContextFileName = "context"
View Source
const ContextFilePermissions = 0600
View Source
const DefaultEventName = "cli-command-execution"
View Source
const EndOfExecutionErrorEventName = "cli-command-execution-error"
View Source
const EndOfExecutionEventName = "cli-command-execution-end"
Variables ¶
View Source
var Alias string
View Source
var ApplicationScope string
View Source
var ContainerScope string
View Source
var EnvironmentScope string
View Source
var HelmScope string
View Source
var IsSecret bool
View Source
var JobScope string
View Source
var Key string
View Source
var PrettyPrint bool
View Source
var ShowValues bool
View Source
var SortKeys bool
View Source
var Value string
View Source
var Version = "unknown"
wil be replaced by CI by the latest git tag
Functions ¶
func AddContainerEnvironmentVariable ¶ added in v1.48.0
func AddContainerSecret ¶ added in v1.48.0
func AddEnvironmentVariable ¶ added in v0.40.0
func CancelEnvironmentDeployment ¶ added in v0.52.22
func CancelServiceDeployment ¶ added in v0.52.22
func CaptureError ¶ added in v0.93.4
func CaptureWithEvent ¶ added in v0.93.4
func CaptureWithEventAndProperties ¶ added in v0.93.4
func CaptureWithEventAndProperties(command *cobra.Command, event string, properties posthog.Properties)
func CheckError ¶ added in v1.25.0
func CheckError(err error)
func CreateEnvironmentAlias ¶ added in v1.20.0
func CreateEnvironmentOverride ¶ added in v1.20.0
func CreateEnvironmentVariable ¶ added in v0.51.0
func CreateEnvironmentVariableAlias ¶ added in v0.51.0
func CreateEnvironmentVariableOverride ¶ added in v0.51.0
func CreateProjectAlias ¶ added in v1.20.0
func CreateProjectVariable ¶ added in v1.20.0
func CreateServiceAlias ¶ added in v1.20.0
func CreateServiceOverride ¶ added in v1.20.0
func CreateServiceVariable ¶ added in v1.20.0
func DeleteContainerEnvironmentVariable ¶ added in v1.48.0
func DeleteContainerSecret ¶ added in v1.48.0
func DeleteEnvironmentVar ¶ added in v1.20.0
func DeleteEnvironmentVariable ¶ added in v0.40.0
func DeleteFile ¶
func DeleteFile(path string)
func DeleteFolder ¶
func DeleteFolder(path string)
func DeleteProjectVar ¶ added in v1.20.0
func DeleteSecret ¶ added in v0.40.0
func DeleteServiceVariable ¶ added in v1.20.0
func DeleteTerraforms ¶ added in v1.55.1
func DeployApplications ¶ added in v0.52.0
func DeployContainers ¶ added in v0.52.0
func DeployDatabases ¶ added in v0.73.8
func DeployHelms ¶ added in v0.75.4
func DeployJobs ¶ added in v0.52.0
func DeployTerraforms ¶ added in v1.55.0
func DryRunPrint ¶ added in v0.40.0
func DryRunPrint(dryRunDisabled bool)
func FindByApplicationName ¶ added in v0.47.0
func FindByApplicationName(applications []qovery.Application, name string) *qovery.Application
func FindByClusterName ¶ added in v0.65.0
func FindByContainerName ¶ added in v0.47.0
func FindByContainerName(containers []qovery.ContainerResponse, name string) *qovery.ContainerResponse
func FindByCustomDomainName ¶ added in v0.52.22
func FindByCustomDomainName(customDomains []qovery.CustomDomain, name string) *qovery.CustomDomain
func FindByDatabaseName ¶ added in v0.47.0
func FindByEnvironmentName ¶ added in v0.47.0
func FindByEnvironmentName(environments []qovery.Environment, name string) *qovery.Environment
func FindByHelmName ¶ added in v0.75.0
func FindByHelmName(helms []qovery.HelmResponse, name string) *qovery.HelmResponse
func FindByJobName ¶ added in v0.47.0
func FindByJobName(jobs []qovery.JobResponse, name string) *qovery.JobResponse
func FindByOrganizationName ¶ added in v0.47.0
func FindByOrganizationName(organizations []qovery.Organization, name string) *qovery.Organization
func FindByProjectName ¶ added in v0.47.0
func FindByTerraformName ¶ added in v1.55.0
func FindByTerraformName(terraforms []qovery.TerraformResponse, name string) *qovery.TerraformResponse
func FindEnvironmentVariableByKey ¶ added in v0.51.0
func FindEnvironmentVariableByKey(key string, envVars []qovery.VariableResponse) *qovery.VariableResponse
func FindStatus ¶ added in v0.69.0
func FindStatusTextWithColor ¶ added in v0.69.0
func GetAccessToken ¶
func GetAccessToken() (AccessTokenType, AccessToken, error)
func GetAdminUrl ¶ added in v1.7.11
func GetAdminUrl() string
func GetAuthorizationHeaderValue ¶ added in v0.47.0
func GetAuthorizationHeaderValue(tokenType AccessTokenType, token AccessToken) string
func GetClusterStatusTextWithColor ¶ added in v0.73.0
func GetClusterStatusTextWithColor(s qovery.ClusterStateEnum) string
func GetDeploymentStageId ¶ added in v0.50.2
func GetEnvVarJsonOutput ¶ added in v0.69.0
func GetEnvVarJsonOutput(variables []EnvVarLineOutput, sortKeys bool) string
func GetEnvironmentStatus ¶ added in v0.52.22
func GetEnvironmentStatus(statuses []qovery.EnvironmentStatus, serviceId string) string
func GetEnvironmentStatusWithColor ¶ added in v0.69.0
func GetEnvironmentStatusWithColor(statuses []qovery.EnvironmentStatus, serviceId string) string
func GetFullPath ¶
func GetGitSource ¶ added in v0.75.4
func GetGitSource(helm *qovery.HelmResponse) *qovery.HelmSourceGitResponse
func GetHelmRepository ¶ added in v0.75.4
func GetHelmRepository(helm *qovery.HelmResponse) *qovery.HelmSourceRepositoryResponse
func GetJobDocker ¶ added in v0.75.0
func GetJobDocker(job *qovery.JobResponse) *qovery.JobSourceDockerResponse
func GetJobId ¶ added in v0.75.0
func GetJobId(job *qovery.JobResponse) string
func GetJobImage ¶ added in v0.75.0
func GetJobImage(job *qovery.JobResponse) *qovery.ContainerSource
func GetJobName ¶ added in v0.75.0
func GetJobName(job *qovery.JobResponse) string
func GetQoveryClient ¶ added in v0.47.0
func GetQoveryClient(tokenType AccessTokenType, token AccessToken) *qovery.APIClient
func GetQoveryClientPanicInCaseOfError ¶ added in v1.25.0
func GetServiceNameByIdAndType ¶ added in v0.49.0
func GetStatusTextWithColor ¶ added in v0.47.0
func InitializeQoveryContext ¶
func InitializeQoveryContext() error
func IsEmptyOrBlank ¶ added in v1.4.0
func IsTerminalClusterState ¶ added in v0.73.0
func IsTerminalClusterState(state qovery.ClusterStateEnum) bool
func IsTerminalState ¶ added in v0.65.0
func ListEnvironmentVariables ¶ added in v0.51.0
func ListProjectVariables ¶ added in v1.20.0
func ListServiceVariables ¶ added in v1.20.0
func ListServiceVariables( client *qovery.APIClient, serviceId string, serviceType ServiceType, ) ([]qovery.VariableResponse, error)
func Map ¶ added in v1.24.0
func Map[T, U any](slice []T, transformer func(T) U) []U
Map applies a transformer function to each element in the slice
func PrintContext ¶ added in v0.92.5
func PrintContext() error
func PrintTable ¶ added in v0.47.0
func PrintlnError ¶
func PrintlnError(err error)
func PrintlnInfo ¶
func PrintlnInfo(info string)
func QoveryContextExists ¶
func QoveryContextExists() bool
func QoveryContextPath ¶
func QoveryDirExists ¶
func QoveryDirExists() bool
func QoveryDirPath ¶
func RandStringBytes ¶ added in v0.92.0
func ResetApplicationContext ¶
func ResetApplicationContext() error
func ServiceTypeToScope ¶ added in v0.77.0
func ServiceTypeToScope(serviceType ServiceType) (qovery.APIVariableScopeEnum, error)
func SetAccessToken ¶
func SetAccessToken(token AccessToken, expiration time.Time, refreshToken RefreshToken) error
func SetContext ¶ added in v0.92.5
func SetEnvironment ¶
func SetEnvironment(env *Environment) error
func SetOrganization ¶
func SetOrganization(org *Organization) error
func SetProject ¶
func SetService ¶ added in v0.45.0
func StoreContext ¶
func StoreContext(context QoveryContext) error
func ToJobRequest ¶ added in v0.67.0
func ToJobRequest(job qovery.JobResponse) qovery.JobRequest
func UpdateEnvironmentVariable ¶ added in v0.84.0
func UpdateProjectVariable ¶ added in v1.20.0
func UpdateServiceVariable ¶ added in v1.20.0
func WatchApplication ¶ added in v0.47.0
func WatchContainer ¶ added in v0.47.0
func WatchDatabase ¶ added in v0.47.0
func WatchEnvironment ¶ added in v0.47.0
func WatchEnvironmentWithOptions ¶ added in v0.47.1
func WebsocketUrl ¶ added in v1.2.4
func WebsocketUrl() string
Types ¶
type AccessToken ¶
type AccessToken string
func RefreshAccessToken ¶
func RefreshAccessToken(token RefreshToken) (AccessToken, error)
type AccessTokenType ¶ added in v0.47.0
type AccessTokenType string
type Application ¶ added in v0.40.0
func GetApplicationById ¶ added in v0.41.6
func GetApplicationById(id string) (*Application, error)
type Container ¶ added in v0.45.0
func GetContainerById ¶ added in v0.45.0
type EnvVarLineOutput ¶ added in v0.51.0
type EnvVarLineOutput struct {
Id string
Key string
Value *string
CreatedAt time.Time
UpdatedAt *time.Time
Service *string
Scope string
IsSecret bool
AliasParentKey *string
OverrideParentKey *string
}
func FromEnvironmentVariableToEnvVarLineOutput ¶ added in v0.51.0
func FromEnvironmentVariableToEnvVarLineOutput(envVar qovery.VariableResponse) EnvVarLineOutput
func (EnvVarLineOutput) Data ¶ added in v0.51.0
func (e EnvVarLineOutput) Data(showValues bool) []string
type EnvVarLines ¶ added in v0.51.0
type EnvVarLines struct {
// contains filtered or unexported fields
}
func NewEnvVarLines ¶ added in v0.51.0
func NewEnvVarLines() EnvVarLines
func (EnvVarLines) Add ¶ added in v0.51.0
func (e EnvVarLines) Add(env EnvVarLineOutput)
func (EnvVarLines) Header ¶ added in v0.51.0
func (e EnvVarLines) Header(prettyPrint bool) []string
type Environment ¶ added in v0.40.0
func GetEnvironmentById ¶ added in v0.41.6
func GetEnvironmentById(id string) (*Environment, error)
func SelectAndSetEnvironment ¶ added in v0.40.0
func SelectAndSetEnvironment(projectID Id) (*Environment, error)
func SelectEnvironment ¶
func SelectEnvironment(projectID Id) (*Environment, error)
type EnvironmentService ¶ added in v0.48.5
type EnvironmentService struct {
ID string
Type ServiceType
}
func GetEnvironmentServicesById ¶ added in v0.48.5
func GetEnvironmentServicesById(id string) ([]EnvironmentService, error)
type HttpResponseError ¶ added in v0.74.3
func (*HttpResponseError) Error ¶ added in v0.74.3
func (m *HttpResponseError) Error() string
type Job ¶ added in v0.48.5
func GetJobById ¶ added in v0.48.5
type Organization ¶ added in v0.40.0
func GetOrganizationById ¶ added in v0.41.6
func GetOrganizationById(id string) (*Organization, error)
func SelectAndSetOrganization ¶ added in v0.40.0
func SelectAndSetOrganization() (*Organization, error)
func SelectOrganization ¶
func SelectOrganization() (*Organization, error)
type Project ¶ added in v0.40.0
func GetProjectById ¶ added in v0.41.6
func SelectAndSetProject ¶ added in v0.40.0
func SelectProject ¶
type QoveryContext ¶
type QoveryContext struct {
AccessToken AccessToken `json:"access_token"`
AccessTokenExpiration time.Time `json:"access_token_expiration"`
RefreshToken RefreshToken `json:"refresh_token"`
OrganizationId Id `json:"organization_id"`
OrganizationName Name `json:"organization_name"`
ProjectId Id `json:"project_id"`
ProjectName Name `json:"project_name"`
EnvironmentId Id `json:"environment_id"`
EnvironmentName Name `json:"environment_name"`
ServiceId Id `json:"service_id"`
ServiceName Name `json:"service_name"`
ServiceType ServiceType `json:"service_type"`
User Name `json:"user"`
}
func GetCurrentContext ¶ added in v0.92.5
func GetCurrentContext() (QoveryContext, error)
func GetOrSetCurrentContext ¶ added in v0.92.5
func GetOrSetCurrentContext(setProject bool, setEnvironment bool, setService bool) (QoveryContext, error)
type RefreshToken ¶
type RefreshToken string
type Role ¶ added in v0.73.0
func SelectRole ¶ added in v0.73.0
func SelectRole(organization *Organization) (*Role, error)
type Service ¶ added in v0.45.0
type Service struct {
ID Id
Name Name
Type ServiceType
}
func CurrentService ¶ added in v0.45.0
func GetDatabaseById ¶ added in v0.77.0
func GetHelmById ¶ added in v0.77.0
func SelectAndSetService ¶ added in v0.45.0
func SelectService ¶ added in v0.45.0
type ServiceType ¶ added in v0.45.0
type ServiceType string
const ( ApplicationType ServiceType = "application" ContainerType ServiceType = "container" DatabaseType ServiceType = "database" JobType ServiceType = "job" HelmType ServiceType = "helm" TerraformType ServiceType = "terraform" )
type TokenInformation ¶ added in v0.41.1
type TokenInformation struct {
Organization *Organization
Role *Role
Name string
Description string
}
func SelectTokenInformation ¶ added in v0.41.1
func SelectTokenInformation() (*TokenInformation, error)
type TokensResponse ¶
Click to show internal directories.
Click to hide internal directories.