config

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Filesystem                 ConfigFilesystem
	Git                        ConfigGit
	GrpcNotifications          []ConfigGrpcNotifications `yaml:"grpc_notifications"`
	NotificationCommand        []string                  `yaml:"notification_command"`
	NotificationCommandRetries uint64                    `yaml:"notification_command_retries"`
	LogLevel                   string                    `yaml:"log_level"`
}

func GetConfig

func GetConfig(confFilePath string) (Config, error)

func (*Config) GetLogLevel

func (c *Config) GetLogLevel() int64

type ConfigFilesystem

type ConfigFilesystem struct {
	Path                  string
	FilesPermission       string `yaml:"files_permission"`
	DirectoriesPermission string `yaml:"directories_permission"`
}

type ConfigGit

type ConfigGit struct {
	Repo               string
	Ref                string
	Path               string
	Auth               ConfigGitAuth
	AcceptedSignatures string `yaml:"accepted_signatures"`
}

type ConfigGitAuth

type ConfigGitAuth struct {
	SshKey   string `yaml:"ssh_key"`
	KnownKey string `yaml:"known_key"`
}

type ConfigGrpcAuth

type ConfigGrpcAuth struct {
	CaCert     string `yaml:"ca_cert"`
	ClientCert string `yaml:"client_cert"`
	ClientKey  string `yaml:"client_key"`
}

type ConfigGrpcNotifications

type ConfigGrpcNotifications struct {
	Endpoint     string
	Filter       string
	FilterRegex  *regexp.Regexp `yaml:"-"`
	TrimKeyPath  bool           `yaml:"trim_key_path"`
	MaxChunkSize uint64         `yaml:"max_chunk_size"`
	Auth         ConfigGrpcAuth
}

Jump to

Keyboard shortcuts

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