console

package
v0.8.5 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ChartName         = "deployment-operator"
	ReleaseName       = "deploy-operator"
	RepoUrl           = "https://pluralsh.github.io/deployment-operator"
	OperatorNamespace = "plrl-deploy-operator"
)
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 DescribeServiceContext added in v0.8.5

func DescribeServiceContext(sc *consoleclient.ServiceContextFragment) (string, error)

func InstallAgent

func InstallAgent(url, token, namespace string) error

func UninstallAgent

func UninstallAgent(namespace string) error

Types

type Config

type Config struct {
	Url   string `yaml:"url"`
	Token string `yaml:"token"`
}

func ReadConfig

func ReadConfig() (conf Config)

func (*Config) Save

func (conf *Config) Save() error

type ConsoleClient

type ConsoleClient interface {
	Url() string
	Token() string
	ListClusters() (*consoleclient.ListClusters, error)
	GetCluster(clusterId, clusterName *string) (*consoleclient.ClusterFragment, error)
	GetDeployToken(clusterId, clusterName *string) (string, 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.ServiceDeploymentExtended, error)
	UpdateClusterService(serviceId, serviceName, clusterName *string, attributes consoleclient.ServiceUpdateAttributes) (*consoleclient.ServiceDeploymentExtended, 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)
	SaveServiceContext(name string, attributes consoleclient.ServiceContextAttributes) (*consoleclient.ServiceContextFragment, error)
	GetServiceContext(name string) (*consoleclient.ServiceContextFragment, error)
	KickClusterService(serviceId, serviceName, clusterName *string) (*consoleclient.ServiceDeploymentExtended, error)
}

func NewConsoleClient

func NewConsoleClient(token, url string) (ConsoleClient, error)

type Gate

type Gate struct {
	Name    string `json:"name"`
	Type    string `json:"type"`
	Cluster string `json:"cluster"`
}

type Pipeline

type Pipeline struct {
	Name   string          `json:"name"`
	Stages []PipelineStage `json:"stages"`
	Edges  []PipelineEdge  `json:"edges"`
}

type PipelineEdge

type PipelineEdge struct {
	From  string `json:"from"`
	To    string `json:"to"`
	Gates []*Gate
}

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 PromotionCriteria struct {
	Source  string   `json:"source"`
	Secrets []string `json:"secrets"`
}

type StageService

type StageService struct {
	Name     string             `json:"name"`
	Criteria *PromotionCriteria `json:"criteria"`
}

type VersionedConfig

type VersionedConfig struct {
	ApiVersion string  `yaml:"apiVersion"`
	Kind       string  `yaml:"kind"`
	Spec       *Config `yaml:"spec"`
}

Jump to

Keyboard shortcuts

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