90 lines
2.6 KiB
Go
90 lines
2.6 KiB
Go
package config
|
|
|
|
type Config struct {
|
|
Secrets Secrets `yaml:"secrets"`
|
|
Pipelines []Pipeline `yaml:"pipelines"`
|
|
}
|
|
|
|
type Secrets struct {
|
|
Directory string `yaml:"directory"`
|
|
}
|
|
|
|
type Pipeline struct {
|
|
ID string `yaml:"id"`
|
|
Source Backend `yaml:"source"`
|
|
Validation ValidationPolicy `yaml:"validation"`
|
|
Destinations []Destination `yaml:"destinations"`
|
|
}
|
|
|
|
type Destination struct {
|
|
ID string `yaml:"id"`
|
|
Backend string `yaml:"backend"`
|
|
Host string `yaml:"host"`
|
|
User string `yaml:"user"`
|
|
Port int `yaml:"port"`
|
|
Path string `yaml:"path"`
|
|
URI string `yaml:"uri"`
|
|
Endpoint string `yaml:"endpoint"`
|
|
Bucket string `yaml:"bucket"`
|
|
Prefix string `yaml:"prefix"`
|
|
Region string `yaml:"region"`
|
|
ForcePath *bool `yaml:"force_path_style"`
|
|
Creds Credentials `yaml:"credentials"`
|
|
SSH SSH `yaml:",inline"`
|
|
Publish *PublishPolicy `yaml:"publish"`
|
|
Transform Transform `yaml:"transform"`
|
|
Transfer TransferPolicy `yaml:"transfer"`
|
|
}
|
|
|
|
type Backend struct {
|
|
Backend string `yaml:"backend"`
|
|
Host string `yaml:"host"`
|
|
User string `yaml:"user"`
|
|
Port int `yaml:"port"`
|
|
Path string `yaml:"path"`
|
|
URI string `yaml:"uri"`
|
|
Endpoint string `yaml:"endpoint"`
|
|
Bucket string `yaml:"bucket"`
|
|
Prefix string `yaml:"prefix"`
|
|
Region string `yaml:"region"`
|
|
ForcePath *bool `yaml:"force_path_style"`
|
|
Creds Credentials `yaml:"credentials"`
|
|
SSH SSH `yaml:",inline"`
|
|
}
|
|
|
|
type SSH struct {
|
|
KeyFile string `yaml:"ssh_key_file"`
|
|
KnownHosts string `yaml:"known_hosts"`
|
|
HostKeyPolicy HostKeyPolicy `yaml:"host_key_policy"`
|
|
}
|
|
|
|
type Credentials struct {
|
|
AccessKeyIDEnv string `yaml:"access_key_id_env"`
|
|
SecretAccessKeyEnv string `yaml:"secret_access_key_env"`
|
|
}
|
|
|
|
type ValidationPolicy struct {
|
|
OnDigestMismatch string `yaml:"on_digest_mismatch"`
|
|
}
|
|
|
|
type PublishPolicy struct {
|
|
Source bool `yaml:"source"`
|
|
HTML bool `yaml:"html"`
|
|
}
|
|
|
|
type Transform struct {
|
|
MarkdownToHTML *MarkdownToHTML `yaml:"markdown_to_html"`
|
|
}
|
|
|
|
type MarkdownToHTML struct {
|
|
Enabled bool `yaml:"enabled"`
|
|
Mode string `yaml:"mode"`
|
|
}
|
|
|
|
type TransferPolicy struct {
|
|
OnDestinationSame string `yaml:"on_destination_same"`
|
|
OnDestinationOlder string `yaml:"on_destination_older"`
|
|
OnDestinationNewer string `yaml:"on_destination_newer"`
|
|
OnConflict string `yaml:"on_conflict"`
|
|
}
|