Documentation ¶
Index ¶
- type BufferedWriter
- type Docker
- func (docker *Docker) Build(ctx context.Context, options *DockerBuildOptions) error
- func (docker *Docker) Login(ctx context.Context, username, password, registryURL string) error
- func (docker *Docker) NetworkGateway(ctx context.Context, name string) (string, error)
- func (docker *Docker) NetworkInspect(ctx context.Context, name string) (*DockerNetwork, error)
- func (docker *Docker) Pull(ctx context.Context, image string) error
- func (docker *Docker) Push(ctx context.Context, image string) error
- func (docker *Docker) Tag(ctx context.Context, oldImage, newImage string) error
- type DockerBuildOptions
- type DockerNetwork
- type ExecuteLogger
- type Git
- func (git *Git) Add(file string) error
- func (git *Git) CheckoutClean() error
- func (git *Git) Clone() error
- func (git *Git) CloneWithoutCheckout() error
- func (git *Git) Commit(message string) error
- func (git *Git) Config(ctx context.Context, key, value string) error
- func (git *Git) CreateAndSwitchToBranch(ctx context.Context, name string) error
- func (git *Git) DeleteLocalBranch(ctx context.Context, name string) error
- func (git *Git) DeleteRemoteBranch(ctx context.Context, name string) error
- func (git *Git) DisableSparseCheckout() error
- func (git *Git) EnableSparseCheckout() error
- func (git *Git) Fetch() error
- func (git *Git) GetCurrentHash() (string, error)
- func (git *Git) GetCurrentHashForPath(path string) (string, error)
- func (git *Git) GetURL() string
- func (git *Git) HasDiff() (bool, error)
- func (git *Git) ListBranches() ([]string, error)
- func (git *Git) ListTags() ([]string, error)
- func (git *Git) Pull() error
- func (git *Git) Push(destination string, isForce bool) error
- func (git *Git) SetSparseCheckoutPaths(paths []string) error
- func (git *Git) SwitchAndReset(branch string) error
- func (git *Git) SwitchToBranch(ctx context.Context, name string) error
- type Helm
- type Kubectl
- func (k *Kubectl) Apply(manifest string, namespace string) error
- func (k *Kubectl) ApplyConfigmap(name, namespace string, data map[string]string) error
- func (k *Kubectl) ApplyService(service *KubernetesService) error
- func (k *Kubectl) ClusterInfo() error
- func (k *Kubectl) Create(manifest string) error
- func (k *Kubectl) Delete(manifest string) error
- func (k *Kubectl) DeleteAllResources(namespace, resourceType string) error
- func (k *Kubectl) DeleteAllResourcesByLabel(namespace string, labels map[string]string) error
- func (k *Kubectl) DeleteResource(namespace, resourceType, resourceName string) error
- func (k *Kubectl) GetIngressHost(namespace, name string) (string, error)
- func (k *Kubectl) GetIngresses(namespace string) ([]*KubernetesIngress, error)
- func (k *Kubectl) GetService(name, namespace string) (*KubernetesService, error)
- func (k *Kubectl) GetServiceAccountSecret(namespace, name, dataKeyName string) (string, error)
- func (k *Kubectl) GetServiceFQDN(namespace, serviceName string) (string, error)
- func (k *Kubectl) GetServiceMeta(namespace, serviceName, key string) (string, error)
- func (k *Kubectl) GetServicePort(namespace, serviceName, portName string) (string, error)
- func (k *Kubectl) GetServices(namespace string) ([]*KubernetesService, error)
- func (k *Kubectl) GetToken() ([]byte, error)
- func (k *Kubectl) JobStatus(name, namespace string) (KubernetesJobStatus, error)
- func (k *Kubectl) ResetExecutor(commandExecutor pkgOs.CommandExecutor) pkgOs.CommandExecutor
- func (k *Kubectl) RolloutStatus(timeout time.Duration, resource, namespace string) error
- type KubectlIngressInfo
- type KubectlInterface
- type KubectlSecretInfo
- type KubectlServiceAccountInfo
- type KubernetesIngress
- type KubernetesIngressFirstAddress
- type KubernetesIngressMetadata
- type KubernetesIngressRule
- type KubernetesIngressSpec
- type KubernetesIngressesResponse
- type KubernetesJobStatus
- type KubernetesService
- type KubernetesServiceMetadata
- type KubernetesServiceSpec
- type KubernetesServiceSpecPort
- type KubernetesServicesResponse
- type RealtimeStdoutExecutor
- type RealtimeWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BufferedWriter ¶
type BufferedWriter struct {
// contains filtered or unexported fields
}
BufferedWriter is a writer that decorates an writer, by buffering a copy of all written bytes.
func NewBufferedWriter ¶
func NewBufferedWriter(writer io.Writer) *BufferedWriter
NewBufferedWriter creates BufferedWriter instance.
func (*BufferedWriter) Bytes ¶
func (w *BufferedWriter) Bytes() []byte
Bytes returns the buffered data.
type Docker ¶
type Docker struct {
// contains filtered or unexported fields
}
func NewDocker ¶
func NewDocker(executor os.CommandExecutor) *Docker
func (*Docker) Build ¶
func (docker *Docker) Build(ctx context.Context, options *DockerBuildOptions) error
func (*Docker) NetworkGateway ¶
func (*Docker) NetworkInspect ¶
type DockerBuildOptions ¶
type DockerNetwork ¶
type ExecuteLogger ¶
type ExecuteLogger struct { os.OsExecutor // contains filtered or unexported fields }
ExecuteLogger is os.OsExecutor decorator, that decorates the Execute method for real time debug logging.
func NewExecuteLogger ¶
func NewExecuteLogger(osExecutor os.OsExecutor, log logger.Logger) *ExecuteLogger
func NewExecuteLoggerWithLogLevel ¶
func NewExecuteLoggerWithLogLevel(osExecutor os.OsExecutor, log logger.Logger, logLevel logger.Level) *ExecuteLogger
type Git ¶
type Git struct {
// contains filtered or unexported fields
}
func (*Git) CheckoutClean ¶
func (*Git) CloneWithoutCheckout ¶
func (*Git) CreateAndSwitchToBranch ¶
func (*Git) DeleteLocalBranch ¶
func (*Git) DeleteRemoteBranch ¶
func (*Git) DisableSparseCheckout ¶
func (*Git) EnableSparseCheckout ¶
func (*Git) GetCurrentHash ¶
func (*Git) GetCurrentHashForPath ¶
GetCurrentHashForPath hash of last git commit made. `path` can be an absolute or relative path. This is needed for mono-repositories, to make sure they only change when their content changes. However merge commits will not be the latest commit, since they include no content. The commit before the merge commit for the path will be the last.
func (*Git) ListBranches ¶
func (*Git) SetSparseCheckoutPaths ¶
func (*Git) SwitchAndReset ¶
type Helm ¶
type Helm struct {
// contains filtered or unexported fields
}
func NewHelm ¶
func NewHelm(executor os.CommandExecutor) *Helm
func (*Helm) GetManifest ¶
func (h *Helm) GetManifest( location string, name string, namespace string, values, stringValues *orderedmap.OrderedMap, ) (string, error)
GetManifest returns content of a "helm template" substituted manifest. Values and string values are maps of string keys to string values.
func (*Helm) ResetExecutor ¶
func (h *Helm) ResetExecutor(commandExecutor os.CommandExecutor) os.CommandExecutor
type Kubectl ¶
func NewKubectl ¶
func NewKubectl( commandExecutor pkgOs.CommandExecutor, kubectlContext, kubernetesInternalDomain string, ) *Kubectl
func (*Kubectl) ApplyConfigmap ¶
func (*Kubectl) ApplyService ¶
func (k *Kubectl) ApplyService(service *KubernetesService) error
func (*Kubectl) ClusterInfo ¶
func (*Kubectl) DeleteAllResources ¶
func (*Kubectl) DeleteAllResourcesByLabel ¶
func (*Kubectl) DeleteResource ¶
func (*Kubectl) GetIngressHost ¶
func (*Kubectl) GetIngresses ¶
func (k *Kubectl) GetIngresses(namespace string) ([]*KubernetesIngress, error)
func (*Kubectl) GetService ¶
func (k *Kubectl) GetService(name, namespace string) (*KubernetesService, error)
func (*Kubectl) GetServiceAccountSecret ¶
func (*Kubectl) GetServiceFQDN ¶
func (*Kubectl) GetServiceMeta ¶
func (*Kubectl) GetServicePort ¶
func (*Kubectl) GetServices ¶
func (k *Kubectl) GetServices(namespace string) ([]*KubernetesService, error)
func (*Kubectl) JobStatus ¶
func (k *Kubectl) JobStatus(name, namespace string) (KubernetesJobStatus, error)
func (*Kubectl) ResetExecutor ¶
func (k *Kubectl) ResetExecutor(commandExecutor pkgOs.CommandExecutor) pkgOs.CommandExecutor
type KubectlIngressInfo ¶
type KubectlIngressInfo struct { Spec struct { Rules []struct { Host string `json:"host"` } `json:"rules"` } `json:"spec"` }
type KubectlInterface ¶
type KubectlInterface interface { Apply(manifest string, namespace string) error Delete(manifest string) error Create(manifest string) error ClusterInfo() error GetToken() ([]byte, error) GetServiceAccountSecret(namespace, name, dataKeyName string) (string, error) GetIngressHost(namespace, name string) (string, error) GetServices(namespace string) ([]*KubernetesService, error) GetService(name, namespace string) (*KubernetesService, error) ApplyConfigmap(name, namespace string, data map[string]string) error ApplyService(service *KubernetesService) error GetServiceFQDN(namespace, serviceName string) (string, error) GetServiceMeta(namespace, serviceName, key string) (string, error) GetServicePort(namespace, serviceName, portName string) (string, error) GetIngresses(namespace string) ([]*KubernetesIngress, error) RolloutStatus(timeout time.Duration, resource, namespace string) error JobStatus(name, namespace string) (KubernetesJobStatus, error) DeleteResource(namespace, resourceType, resourceName string) error DeleteAllResources(namespace, resourceType string) error DeleteAllResourcesByLabel(namespace string, labels map[string]string) error ResetExecutor(commandExecutor pkgOs.CommandExecutor) pkgOs.CommandExecutor }
type KubectlSecretInfo ¶
type KubectlServiceAccountInfo ¶
type KubectlServiceAccountInfo struct { Secrets []struct { Name string `json:"name"` } `json:"secrets"` }
type KubernetesIngress ¶
type KubernetesIngress struct { Metadata *KubernetesIngressMetadata `json:"metadata"` Spec *KubernetesIngressSpec `json:"spec"` }
type KubernetesIngressFirstAddress ¶
type KubernetesIngressFirstAddress struct {
Host string `json:"host"`
}
type KubernetesIngressRule ¶
type KubernetesIngressRule struct {
Host string `json:"host"`
}
type KubernetesIngressSpec ¶
type KubernetesIngressSpec struct {
Rules []*KubernetesIngressRule `json:"rules"`
}
type KubernetesIngressesResponse ¶
type KubernetesIngressesResponse struct {
Items []*KubernetesIngress `json:"items"`
}
type KubernetesJobStatus ¶
type KubernetesJobStatus int
const ( KubernetesJobStatusUnknown KubernetesJobStatus = iota KubernetesJobStatusActive KubernetesJobStatusComplete KubernetesJobStatusFailed )
type KubernetesService ¶
type KubernetesService struct { APIVersion string `json:"apiVersion"` Kind string `json:"kind"` Metadata *KubernetesServiceMetadata `json:"metadata"` Spec *KubernetesServiceSpec `json:"spec"` }
type KubernetesServiceSpec ¶
type KubernetesServiceSpec struct { ClusterIP string `json:"clusterIP"` ExternalTrafficPolicy string `json:"externalTrafficPolicy"` Ports []*KubernetesServiceSpecPort `json:"ports"` Selector map[string]string `json:"selector"` SessionAffinity string `json:"sessionAffinity"` Type string `json:"type"` }
type KubernetesServicesResponse ¶
type KubernetesServicesResponse struct {
Items []*KubernetesService `json:"items"`
}
type RealtimeStdoutExecutor ¶
type RealtimeStdoutExecutor struct {
os.OsExecutor
}
RealtimeStdoutExecutor is os.OsExecutor decorator, that decorates the Execute method by writing executed commands stdout and stderr to executor's Stdout and Stderr.
func NewRealtimeStdoutExecutor ¶
func NewRealtimeStdoutExecutor(osExecutor os.OsExecutor) *RealtimeStdoutExecutor
NewRealtimeStdoutExecutor creates RealtimeStdoutExecutor instance.
type RealtimeWriter ¶
type RealtimeWriter struct {
// contains filtered or unexported fields
}
func NewRealtimeWriter ¶
func NewRealtimeWriter(log logger.Logger, logLevel logger.Level) *RealtimeWriter
func (*RealtimeWriter) GetOutput ¶
func (writer *RealtimeWriter) GetOutput() string