transformer

package
v0.0.0-...-cb886e6 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2023 License: GPL-3.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGitCompose

func NewGitCompose(
	clusterClient cluster.Client,
	gitClient git.RemoteGitClient,
	db *database.DB,
	envVarsProvider envvars.EnvVarsProvider,
	privRegistryProvider privregistry.PrivRegistryProvider,
	owner string,
	branchOwner string,
	repo string,
	branch string,
	sha string,
	prNumber *int,
	author string,
	isPublic bool,
	dockerhubPullSecretName string,
) *gitCompose

Types

type BuildImagesResult

type BuildImagesResult struct {
	FailedJobs []*batchv1.Job
}

func (*BuildImagesResult) Failed

func (bir *BuildImagesResult) Failed() bool

type Environment

type Environment struct {
	Services   map[string]EnvironmentService `json:"services"`
	RawContent string                        `json:"-"`
}

func EnvironmentFromDB

func EnvironmentFromDB(env *database.Environment) *Environment

func NewEnvironment

func NewEnvironment(services map[string]EnvironmentService, rawCompose string) *Environment

func (*Environment) FirstService

func (c *Environment) FirstService() EnvironmentService

func (*Environment) ToMap

func (c *Environment) ToMap() map[string]interface{}

type EnvironmentService

type EnvironmentService struct {
	ID            string            `json:"-"`
	Url           string            `json:"url"`
	Image         string            `json:"image"`
	Build         string            `json:"build"`
	Index         int               `json:"index"`
	PublicPort    string            `json:"-"`
	InternalPorts []string          `json:"-"`
	Env           map[string]string `json:"-"`
}

type LoadErgopackResult

type LoadErgopackResult struct {
	Skip            bool
	ValidationError *ProjectValidationError
}

type PrepareResult

type PrepareResult struct {
	Environment     *database.Environment
	Skip            bool
	ValidationError *ProjectValidationError
}

type ProjectValidationError

type ProjectValidationError struct {
	T       string `json:"type"`
	Message string `json:"message"`
}

type ProjectValidationErrorInvalidCompose

type ProjectValidationErrorInvalidCompose struct {
	T       string `json:"type"`
	Message string `json:"message"`
}

func (*ProjectValidationErrorInvalidCompose) GetErrorMessage

func (v *ProjectValidationErrorInvalidCompose) GetErrorMessage() string

func (*ProjectValidationErrorInvalidCompose) Serialize

type TransformResult

type TransformResult struct {
	ClusterEnv  *cluster.ClusterEnv
	Environment *Environment
	FailedJobs  []*batchv1.Job
	IsCompose   bool
}

func (*TransformResult) Failed

func (tr *TransformResult) Failed() bool

type Transformer

type Transformer interface {
	Transform(ctx context.Context, namespace string) (*cluster.ClusterEnv, *Environment, error)
}

Jump to

Keyboard shortcuts

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