interfaces

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2023 License: Apache-2.0 Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	RUNTIME_TYPE_DEPLOYMENT = 1
	RUNTIME_TYPE_PIPELINE   = 2
)
View Source
const (
	CODE_REPO_NAME_PREFIX = "repo"
	PRODUCT_NAME_PREFIX   = "product"
)
View Source
const (
	SECRET_TYPE_GIT      = 1
	SECRET_TYPE_ARTIFACT = 2
	SECRET_TYPE_CLUSTER  = 3
	SECRET_TYPE_TENANT   = 4
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessInfo

type AccessInfo struct {
	Name string
	Type AccessType
	// TODO ssh type should replace to  go package structure in the future
	SSH        []*string
	Kubernetes *rest.Config
}

type AccessType

type AccessType string
const (
	ACCESS_TYPE_K8S AccessType = "kubernetes"
)

type AdditionalResource

type AdditionalResource struct {
	Type  string
	Name  string
	Error error
}

type ArifactRepo

type ArifactRepo struct {
	ProviderName string
	RepoType     string
	ID           string
	User         string
	Permission   string
}

type Auth

type Auth interface {
	GetRole(ctx context.Context, authName string, role Role) (*Role, error)
	CreateRole(ctx context.Context, authName string, role Role) error
	DeleteRole(ctx context.Context, authName string, role Role) error
}

type Cluster

type Cluster interface {
	GetAccessInfo(ctx context.Context, clusterName string) (string, error)
}

type CodeRepo

type CodeRepo struct {
	ProviderType string
	ID           string
	User         string
	Permission   string
}

type DeployInfo

type DeployInfo struct {
	Source string
}

type DeployTask

type DeployTask struct {
	AccessInfo  AccessInfo
	Product     nautescrd.Product
	NautesCfg   nautescfg.Config
	Runtime     Runtime
	RuntimeType RuntimeType
}

func (*DeployTask) GetLabel

func (t *DeployTask) GetLabel() map[string]string

type Deployment

type Deployment interface {
	Deploy(ctx context.Context, task DeployTask) (*DeployInfo, error)
	UnDeploy(ctx context.Context, task DeployTask) error
}

type DeploymentRuntimeSyncer

type DeploymentRuntimeSyncer interface {
	Sync(ctx context.Context, runtime nautescrd.DeploymentRuntime) (*DeployInfo, error)
	Delete(ctx context.Context, runtime nautescrd.DeploymentRuntime) error
}

type EnvManager

type EnvManager interface {
	GetAccessInfo(ctx context.Context, cluster nautescrd.Cluster) (*AccessInfo, error)
	Sync(ctx context.Context, task DeployTask) (*EnvSyncResult, error)
	Remove(ctx context.Context, task DeployTask) error
}

type EnvSyncResult

type EnvSyncResult struct {
	AdditionalResources []AdditionalResource
	Error               error
}

type Git

type Git interface {
	GrantPermission(ctx context.Context, providerType, repoName, destUser, destEnv string) error
	RevokePermission(ctx context.Context, providerType, repoName, destUser, destEnv string) error
}

type Role

type Role struct {
	Name   string
	Users  []string
	Groups []string
}

type Runtime

type Runtime interface {
	GetProduct() string
	GetName() string
}

type RuntimeType

type RuntimeType int

type Secret

type Secret interface {
	GetSecretDatabaseName(ctx context.Context, repo SecretInfo) (string, error)
	GetSecretKey(ctx context.Context, repo SecretInfo) (string, error)
}

type SecretClient

type SecretClient interface {
	Cluster
	Git
	Secret
	Auth
	Logout() error
}

type SecretInfo

type SecretInfo struct {
	Type          SecretType
	CodeRepo      *CodeRepo
	AritifaceRepo *ArifactRepo
}

type SecretType

type SecretType int32

Jump to

Keyboard shortcuts

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