gcliservices

package
v0.0.0-...-d6705c8 Latest Latest
Warning

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

Go to latest
Published: May 15, 2021 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// StremDataSeparator separates data in streams
	StremDataSeparator = ":"
)

Variables

View Source
var (
	// BuildCommitevent is an event trigger after build to commit changes
	BuildCommitevent = "GCLIBuildCommit"
)

Functions

This section is empty.

Types

type ApplicationData

type ApplicationData struct {
	ElasticData common.ElasticData
	AM          interface{}
}

ApplicationData provide data api

type Arguments

type Arguments interface {
	ContainerImageDir() string
	TmpContainerImageDir() string
}

Arguments return arguments

type BuilderService

type BuilderService interface {
	ReadDefFromFS(fs filesystem.Filespace) ([]*config.Build, error)
	Build(ctx app.IOContext, fs filesystem.Filespace, appData ApplicationData, properties, secrets common.ElasticData) (err error)
}

BuilderService build project structure

type ClonerService

type ClonerService interface {
	Clone(repoURL string, verion repositories.Version, destfs filesystem.Filespace, si common.StringInjector) (err error)
	CloneModules(sourcefs, destfs filesystem.Filespace, si common.StringInjector) (err error)
}

ClonerService clone an repository

type Core

type Core interface {
	Arguments() Arguments
}

Core provide all nw services and arguments

type DataService

type DataService interface {
	HasDataFromFS(fs filesystem.Filespace, prefix string) bool
	ReadDefFromFS(fs filesystem.Filespace) ([]*config.DataSet, error)
	ReadDataFromFS(fs filesystem.Filespace) (map[string]string, error)
	WriteDataToFS(fs filesystem.Filespace, prefix string, data map[string]string) error
	ConsoleReadData(ctx app.IOContext, def *config.DataSet) (map[string]string, error)
}

DataService provide data api

type DependenciesService

type DependenciesService interface {
	ReadDefFromFS(fs filesystem.Filespace) ([]*config.Dependency, error)
	WriteDefToFS(fs filesystem.Filespace, dependencies []*config.Dependency) error
	CloneDependencies(fs filesystem.Filespace, deps []*config.Dependency) error
}

DependenciesService process and return modules

type GCLIEnvironment

type GCLIEnvironment interface {
	LoadEnvs(ctxScope app.Scope, propertiesData, secretsData map[string]string) (err error)
}

GCLIEnvironment manage environments

type GCLIInputs

type GCLIInputs interface {
	Inputs(ctx app.IOContext) (propertiesData, secretsData map[string]string, appData ApplicationData, err error)
}

GCLIInputs return goat cli application inputs

type GeneratedFile

type GeneratedFile struct {
	Path    string
	ModTime time.Time
}

GeneratedFile contains single generated file data

type ModulesService

type ModulesService interface {
	ReadDefFromFS(fs filesystem.Filespace) ([]*config.Module, error)
}

ModulesService process and return modules

type PropertiesService

type PropertiesService interface {
	ReadDefFromFS(fs filesystem.Filespace) ([]*config.Property, error)
	ReadDataFromFS(fs filesystem.Filespace) (map[string]string, error)
	FillData(ctx app.IOContext, def []*config.Property, data map[string]string, defaultData map[string]string, interactive bool) (bool, error)
	WriteDataToFS(fs filesystem.Filespace, data map[string]string) error
}

PropertiesService provide project properties data

type RepositoriesService

type RepositoriesService interface {
	Filespace(repoURL string, version repositories.Version) (filesystem.Filespace, error)
}

RepositoriesService provide git repository access

type ScriptsContext

type ScriptsContext struct {
	Scope      app.Scope
	CWD        filesystem.Filespace
	Namespaces pipservices.Namespaces
}

ScriptsContext contains script context

type ScriptsRunner

type ScriptsRunner interface {
	Run(ctx ScriptsContext, fs filesystem.Filespace, scriptName string, properties, secrets common.ElasticData, data ApplicationData) (taskManager pipservices.TasksManager, err error)
}

ScriptsRunner run project scripts

type SecretsService

type SecretsService interface {
	ReadDefFromFS(fs filesystem.Filespace, properties common.ElasticData, data ApplicationData) ([]*config.Property, error)
	ReadDataFromFS(fs filesystem.Filespace) (map[string]string, error)
	FillData(ctx app.IOContext, def []*config.Property, data map[string]string, defaultData map[string]string, interactive bool) (bool, error)
	WriteDataToFS(fs filesystem.Filespace, data map[string]string) error
}

SecretsService provide project secret properties data (like passwords, credentials etc)

type TemplateAssetsProvider

type TemplateAssetsProvider interface {
	Layout(name string) (tmpl *template.Template, err error)
	Base() (*template.Template, error)
}

TemplateAssetsProvider return assets templates

type TemplateConfig

type TemplateConfig interface {
	AddFunc(name string, f interface{}) (err error)
	Func() template.FuncMap
	IsCached() bool
	FS() filesystem.Filespace
}

TemplateConfig return templates configuration

type TemplateExecutor

type TemplateExecutor interface {
	IsEmpty() (is bool, err error)
	Templates() (list []string, err error)
	Execute(wr io.Writer, data interface{}) (err error)
	ExecuteTemplate(templateName string, wr io.Writer, data interface{}) (err error)
}

TemplateExecutor render data for single template

type TemplateService

type TemplateService interface {
	TemplatesExecutor() (TemplatesExecutor, error)
	TemplateExecutor(path string) (TemplateExecutor, error)
}

TemplateService provide template api

type TemplatesExecutor

type TemplatesExecutor interface {
	IsEmpty(layoutName, templatePath string) (is bool, err error)
	Templates(layoutName, templatePath string) (list []string, err error)
	Execute(layoutName, templatePath string, wr io.Writer, data interface{}) (err error)
	ExecuteTemplate(layoutName, templatePath, templateName string, wr io.Writer, data interface{}) (err error)
}

TemplatesExecutor render data for view tree

type VCSData

type VCSData interface {
	VCSGeneratedFiles() VCSGeneratedFiles
	VCSPersistedFiles() VCSPersistedFiles
}

VCSData contains vcs data like generated and persisted files list

type VCSGeneratedFiles

type VCSGeneratedFiles interface {
	All() []*GeneratedFile
	New() map[string]*GeneratedFile
	Get(path string) *GeneratedFile
	ContainsPath(path string) bool
	Add(row *GeneratedFile)
	WriteAll(writer io.Writer) (err error)
	Modified() bool
}

VCSGeneratedFiles contains generated files

type VCSPersistedFiles

type VCSPersistedFiles interface {
	All() []string
	ContainsPath(path string) bool
	AddPath(path string)
	RemovePath(path string)
	WriteAll(writer io.Writer) (err error)
	Modified() bool
}

VCSPersistedFiles contains persisted files

type VCSService

type VCSService interface {
	ReadDataFromFS(fs filesystem.Filespace) (data VCSData, err error)
	WriteDataToFS(fs filesystem.Filespace, data VCSData) (err error)
}

VCSService contains changes controll

Jump to

Keyboard shortcuts

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