Documentation ¶
Index ¶
- Constants
- func AddEnvironmentVariable(application Id, key string, value string) error
- func AddSecret(application Id, key string, value string) error
- func Capture(command *cobra.Command)
- func CheckAdminUrl()
- func CurrentEnvironment() (Id, Name, error)
- func CurrentOrganization() (Id, Name, error)
- func CurrentProject() (Id, Name, error)
- func DeleteEnvironmentVariable(application Id, key string) error
- func DeleteFile(path string)
- func DeleteFolder(path string)
- func DeleteSecret(application Id, key string) error
- func DryRunPrint(dryRunDisbled bool)
- func GenerateExportEnvVarsScript(vars []Var, clusterId string)
- func GetAccessTokenExpiration() (time.Time, error)
- func GetFullPath(clusterId string) string
- func InitializeKubeworkzContext() error
- func KubeworkzContextExists() bool
- func KubeworkzContextPath() (string, error)
- func KubeworkzDirExists() bool
- func KubeworkzDirPath() (string, error)
- func Println(text string)
- func PrintlnContext() error
- func PrintlnError(err error)
- func PrintlnInfo(info string)
- func RefreshAccessToken() error
- func RefreshExpiredTokenSilently()
- func ResetApplicationContext() error
- func SetAccessToken(token AccessToken, expiration time.Time) error
- func SetEnvironment(env *Environment) error
- func SetOrganization(orga *Organization) error
- func SetProject(project *Project) error
- func SetRefreshToken(token RefreshToken) error
- func SetService(service *Service) error
- func StoreContext(context KubeworkzContext) error
- func Validate(actionType string) bool
- func WriteInFile(clusterId string, fileName string, content []byte) string
- type AccessToken
- type Application
- type Container
- type Environment
- type Id
- type KubeworkzContext
- type Name
- type Organization
- type Project
- type RefreshToken
- type Service
- type ServiceType
- type TokenInformation
- type TokensResponse
- type Var
Constants ¶
View Source
const AdminUrl = "https://api-admin.kubeworkz.io"
View Source
const ContextFileName = "context"
Variables ¶
This section is empty.
Functions ¶
func AddEnvironmentVariable ¶
func CheckAdminUrl ¶
func CheckAdminUrl()
func CurrentEnvironment ¶
func CurrentOrganization ¶
func CurrentProject ¶
func DeleteFile ¶
func DeleteFile(path string)
func DeleteFolder ¶
func DeleteFolder(path string)
func DeleteSecret ¶
func DryRunPrint ¶
func DryRunPrint(dryRunDisbled bool)
func GetFullPath ¶
func InitializeKubeworkzContext ¶
func InitializeKubeworkzContext() error
func KubeworkzContextExists ¶
func KubeworkzContextExists() bool
func KubeworkzContextPath ¶
func KubeworkzDirExists ¶
func KubeworkzDirExists() bool
func KubeworkzDirPath ¶
func PrintlnContext ¶
func PrintlnContext() error
func PrintlnError ¶
func PrintlnError(err error)
func PrintlnInfo ¶
func PrintlnInfo(info string)
func RefreshAccessToken ¶
func RefreshAccessToken() error
func RefreshExpiredTokenSilently ¶
func RefreshExpiredTokenSilently()
func ResetApplicationContext ¶
func ResetApplicationContext() error
func SetAccessToken ¶
func SetAccessToken(token AccessToken, expiration time.Time) error
func SetEnvironment ¶
func SetEnvironment(env *Environment) error
func SetOrganization ¶
func SetOrganization(orga *Organization) error
func SetProject ¶
func SetRefreshToken ¶
func SetRefreshToken(token RefreshToken) error
func SetService ¶
func StoreContext ¶
func StoreContext(context KubeworkzContext) error
Types ¶
type AccessToken ¶
type AccessToken string
func GetAccessToken ¶
func GetAccessToken() (AccessToken, error)
type Application ¶
func GetApplicationById ¶
func GetApplicationById(id string) (*Application, error)
type Container ¶
func GetContainerById ¶
type Environment ¶
func GetEnvironmentById ¶
func GetEnvironmentById(id string) (*Environment, error)
func SelectAndSetEnvironment ¶
func SelectAndSetEnvironment(projectID Id) (*Environment, error)
func SelectEnvironment ¶
func SelectEnvironment(projectID Id) (*Environment, error)
type KubeworkzContext ¶
type KubeworkzContext 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 CurrentContext ¶
func CurrentContext() (KubeworkzContext, error)
func (KubeworkzContext) ToPosthogProperties ¶
func (c KubeworkzContext) ToPosthogProperties() map[string]interface{}
type Organization ¶
func GetOrganizationById ¶
func GetOrganizationById(id string) (*Organization, error)
func SelectAndSetOrganization ¶
func SelectAndSetOrganization() (*Organization, error)
func SelectOrganization ¶
func SelectOrganization() (*Organization, error)
type RefreshToken ¶
type RefreshToken string
func GetRefreshToken ¶
func GetRefreshToken() (RefreshToken, error)
type Service ¶
type Service struct { ID Id Name Name Type ServiceType }
func CurrentService ¶
func SelectAndSetService ¶
func SelectService ¶
type ServiceType ¶
type ServiceType string
const ( ApplicationType ServiceType = "application" ContainerType ServiceType = "container" )
type TokenInformation ¶
type TokenInformation struct { Organization *Organization Name string Description string }
func SelectTokenInformation ¶
func SelectTokenInformation() (*TokenInformation, error)
type TokensResponse ¶
Click to show internal directories.
Click to hide internal directories.