Documentation
¶
Index ¶
- Constants
- func ConstructPipelineInput(input []byte) (string, *gqlclient.PipelineAttributes, error)
- func DescribeCluster(cluster *consoleclient.ClusterFragment) (string, error)
- func DescribeService(service *consoleclient.ServiceDeploymentExtended) (string, error)
- func InstallAgent(url, token, namespace string) error
- func UninstallAgent(namespace string) error
- type Config
- type ConsoleClient
- type Gate
- type Pipeline
- type PipelineEdge
- type PipelineStage
- type PrefixWriter
- type PromotionCriteria
- type StageService
- type VersionedConfig
Constants ¶
View Source
const ( LEVEL_0 = iota LEVEL_1 LEVEL_2 LEVEL_3 LEVEL_4 )
Each level has 2 spaces for PrefixWriter
View Source
const (
ConfigName = "console.yml"
)
Variables ¶
This section is empty.
Functions ¶
func ConstructPipelineInput ¶
func ConstructPipelineInput(input []byte) (string, *gqlclient.PipelineAttributes, error)
func DescribeCluster ¶
func DescribeCluster(cluster *consoleclient.ClusterFragment) (string, error)
func DescribeService ¶
func DescribeService(service *consoleclient.ServiceDeploymentExtended) (string, error)
func InstallAgent ¶
func UninstallAgent ¶
Types ¶
type Config ¶
func ReadConfig ¶
func ReadConfig() (conf Config)
type ConsoleClient ¶
type ConsoleClient interface {
Url() string
Token() string
ListClusters() (*consoleclient.ListClusters, error)
GetCluster(clusterId, clusterName *string) (*consoleclient.ClusterFragment, error)
UpdateCluster(id string, attr consoleclient.ClusterUpdateAttributes) (*consoleclient.UpdateCluster, error)
DeleteCluster(id string) error
DetachCluster(id string) error
ListClusterServices(clusterId, handle *string) ([]*consoleclient.ServiceDeploymentEdgeFragment, error)
CreateRepository(url string, privateKey, passphrase, username, password *string) (*consoleclient.CreateGitRepository, error)
ListRepositories() (*consoleclient.ListGitRepositories, error)
UpdateRepository(id string, attrs consoleclient.GitAttributes) (*consoleclient.UpdateGitRepository, error)
CreateClusterService(clusterId, clusterName *string, attr consoleclient.ServiceDeploymentAttributes) (*consoleclient.ServiceDeploymentFragment, error)
UpdateClusterService(serviceId, serviceName, clusterName *string, attributes consoleclient.ServiceUpdateAttributes) (*consoleclient.ServiceDeploymentFragment, error)
CloneService(clusterId string, serviceId, serviceName, clusterName *string, attributes consoleclient.ServiceCloneAttributes) (*consoleclient.ServiceDeploymentFragment, error)
GetClusterService(serviceId, serviceName, clusterName *string) (*consoleclient.ServiceDeploymentExtended, error)
DeleteClusterService(serviceId string) (*consoleclient.DeleteServiceDeployment, error)
ListProviders() (*consoleclient.ListProviders, error)
CreateProviderCredentials(name string, attr consoleclient.ProviderCredentialAttributes) (*consoleclient.CreateProviderCredential, error)
DeleteProviderCredentials(id string) (*consoleclient.DeleteProviderCredential, error)
SavePipeline(name string, attrs consoleclient.PipelineAttributes) (*consoleclient.PipelineFragment, error)
CreateCluster(attributes consoleclient.ClusterAttributes) (*consoleclient.CreateCluster, error)
CreateProvider(attr consoleclient.ClusterProviderAttributes) (*consoleclient.CreateClusterProvider, error)
MyCluster() (*consoleclient.MyCluster, error)
}
func NewConsoleClient ¶
func NewConsoleClient(token, url string) (ConsoleClient, error)
type Pipeline ¶
type Pipeline struct {
Name string `json:"name"`
Stages []PipelineStage `json:"stages"`
Edges []PipelineEdge `json:"edges"`
}
type PipelineEdge ¶
type PipelineStage ¶
type PipelineStage struct {
Name string `json:"name"`
Services []StageService `json:"services"`
}
type PrefixWriter ¶
type PrefixWriter interface {
// Write writes text with the specified indentation level.
Write(level int, format string, a ...interface{})
// WriteLine writes an entire line with no indentation level.
WriteLine(a ...interface{})
// Flush forces indentation to be reset.
Flush()
}
PrefixWriter can write text at various indentation levels.
func NewPrefixWriter ¶
func NewPrefixWriter(out io.Writer) PrefixWriter
NewPrefixWriter creates a new PrefixWriter.
type PromotionCriteria ¶
type StageService ¶
type StageService struct {
Name string `json:"name"`
Criteria *PromotionCriteria `json:"criteria"`
}
type VersionedConfig ¶
Click to show internal directories.
Click to hide internal directories.