service

package
v0.0.0-...-e163d20 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PullIntervalDefault = 5 * time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Analyzer

type Analyzer interface {
	AnalyzeTagsForUpdates(envs map[string]gitmanager.Env, tags []string) ([]analyzer.EnvUpdate, bool, error)
}

type ConfigurationConfig

type ConfigurationConfig struct {
	RepoUrl      string
	Envs         []string
	Branch       string
	PullInterval time.Duration
}

type ConfigurationService

type ConfigurationService struct {
	// contains filtered or unexported fields
}

func New

func New(cfg ConfigurationConfig, parser Parser, extractor Extractor, repository repository.Repository, analyzer Analyzer, secrets Secrets, notify Notify) *ConfigurationService

func (*ConfigurationService) CloneConfig

func (s *ConfigurationService) CloneConfig(ctx context.Context, env, newEnv string, updateGlobals map[string]interface{}) error

func (*ConfigurationService) DeleteConfig

func (s *ConfigurationService) DeleteConfig(ctx context.Context, deleteEnv string) error

func (*ConfigurationService) GetEnvOriginal

func (s *ConfigurationService) GetEnvOriginal(ctx context.Context, env string) (string, bool, error)

func (*ConfigurationService) GetEnvs

func (s *ConfigurationService) GetEnvs(ctx context.Context) []string

func (*ConfigurationService) IsEnvOriginal

func (s *ConfigurationService) IsEnvOriginal(ctx context.Context, env string) bool

func (*ConfigurationService) ReadConfig

func (s *ConfigurationService) ReadConfig(ctx context.Context, env string, groups, globals []string) (map[string]interface{}, error)

func (*ConfigurationService) Run

func (s *ConfigurationService) Run(ctx context.Context)

func (*ConfigurationService) Shutdown

func (s *ConfigurationService) Shutdown()

type Extractor

type Extractor interface {
	ExtractConfigList(dir string) (*types.ExtractedConfigList, error)
}

type Notify

type Notify interface {
	NotifyConfigUpdate(ctx context.Context, repo, env, version string)
}

type Parser

type Parser interface {
	ParseConfigList(*types.ExtractedConfigList) (*types.ParsedRepoConfig, error)
}

type Secrets

type Secrets interface {
	InsertSecrets(ctx context.Context, env string, cfg *map[string]interface{}, populate bool) error
	CloneSecrets(ctx context.Context, env, newEnv string) error
}

Jump to

Keyboard shortcuts

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