config

package
v1.4.4 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Announcer

type Announcer struct {
	Slack `yaml:"slack"`
	Email `yaml:"email"`
}

type Config

type Config struct {
	Repositories []Repository `yaml:"repositories"`
	Storage      `yaml:"storage"`
	Announcer    `yaml:"announcer"`
	Type         string `yaml:"type"`
	Global       `yaml:"global"`
}

Config struct represents the config file

func ReadConfig

func ReadConfig(cmd *cobra.Command, path string) (conf *Config, err error)

type Email added in v0.0.15

type Email struct {
	Provider string   `yaml:"provider"`
	Enabled  bool     `yaml:"enabled"`
	From     string   `yaml:"from"`
	To       []string `yaml:"to"`
	Type     string   `yaml:"type"`
	Cc       []string `yaml:"cc"`
	Bcc      []string `yaml:"bcc"`
	Ses      `yaml:"ses"`
	Smtp     `yaml:"smtp"`
}

type Global added in v1.1.0

type Global struct {
	OneShot           bool `yaml:"oneShot"`
	Verbose           bool `yaml:"verbose"`
	MaxConcurrentJobs int  `yaml:"maxConcurrentJobs"`
}

Global struct represents the global config

func (*Global) SetDefaults added in v1.4.0

func (g *Global) SetDefaults()

type Repository

type Repository struct {
	Name                 string `yaml:"name"`
	Description          string `yaml:"description"`
	Url                  string `yaml:"url"`
	CheckIntervalMinutes int    `yaml:"checkIntervalMinutes"`
}

Repository struct represents the repository config

type S3

type S3 struct {
	//Provider   string `yaml:"provider"`
	AccessKey  string `yaml:"accessKey"`
	SecretKey  string `yaml:"secretKey"`
	Region     string `yaml:"region"`
	BucketName string `yaml:"bucketName"`
}

type Ses added in v0.0.15

type Ses struct {
	Region    string `yaml:"region"`
	AccessKey string `yaml:"accessKey"`
	SecretKey string `yaml:"secretKey"`
}

func (*Ses) SetAccessCredentialsFromEnv added in v0.0.15

func (s *Ses) SetAccessCredentialsFromEnv(provider string) error

type Slack

type Slack struct {
	Enabled    bool   `yaml:"enabled"`
	WebhookUrl string `yaml:"webhookUrl"`
	Username   string `yaml:"username"`
	IconUrl    string `yaml:"iconUrl"`
}

type Smtp added in v0.0.15

type Smtp struct {
	Host     string `yaml:"host"`
	Port     int    `yaml:"port"`
	Username string `yaml:"username"`
	Password string `yaml:"password"`
}

type Storage

type Storage struct {
	Provider string `yaml:"provider"`
	S3       `yaml:"s3"`
}

func (*Storage) SetAccessCredentialsFromEnv

func (s *Storage) SetAccessCredentialsFromEnv(provider string) error

Jump to

Keyboard shortcuts

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