Documentation
¶
Index ¶
- Constants
- type App
- type Cli
- type Db
- type Image
- type ImagePlatform
- type ImageStatus
- type Job
- type Notif
- type NotifAmqp
- type NotifEntry
- type NotifGotify
- type NotifMail
- type NotifRocketChat
- type NotifScript
- type NotifSlack
- type NotifTeams
- type NotifTelegram
- type NotifWebhook
- type PrdDocker
- type PrdFile
- type PrdSwarm
- type Providers
- type RegOpts
- type Watch
Constants ¶
const ( ImageStatusNew = ImageStatus("new") ImageStatusUpdate = ImageStatus("update") ImageStatusUnchange = ImageStatus("unchange") )
Image status constants
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cli ¶
type Cli struct {
Version kong.VersionFlag
Cfgfile string `kong:"required,name='config',env='CONFIG',help='Diun configuration file.'"`
Timezone string `kong:"name='timezone',env='TZ',default='UTC',help='Timezone assigned to Diun.'"`
LogLevel string `kong:"name='log-level',env='LOG_LEVEL',default='info',help='Set log level.'"`
LogJSON bool `kong:"name='log-json',env='LOG_JSON',default='false',help='Enable JSON logging output.'"`
LogCaller bool `kong:"name='log-caller',env='LOG_CALLER',default='false',help='Add file:line of the caller to log output.'"`
TestNotif bool `kong:"name='test-notif',default='false',help='Test notification settings.'"`
}
Cli holds command line args, flags and cmds
type Db ¶
type Db struct {
Path string `yaml:"path,omitempty"`
}
Db holds data necessary for database configuration
type Image ¶
type Image struct {
Name string `yaml:"name,omitempty" json:",omitempty"`
Platform ImagePlatform `yaml:"platform,omitempty" json:",omitempty"`
RegOptsID string `yaml:"regopts_id,omitempty" json:",omitempty"`
WatchRepo bool `yaml:"watch_repo,omitempty" json:",omitempty"`
MaxTags int `yaml:"max_tags,omitempty" json:",omitempty"`
IncludeTags []string `yaml:"include_tags,omitempty" json:",omitempty"`
ExcludeTags []string `yaml:"exclude_tags,omitempty" json:",omitempty"`
}
Image holds image configuration
type ImagePlatform ¶
type ImagePlatform struct {
Os string `yaml:"os,omitempty" json:",omitempty"`
Arch string `yaml:"arch,omitempty" json:",omitempty"`
Variant string `yaml:"variant,omitempty" json:",omitempty"`
}
ImagePlatform holds image platform configuration
type Job ¶
type Job struct {
Provider string
Image Image
RegImage registry.Image
Registry *registry.Client
FirstCheck bool
}
Job holds job configuration
type Notif ¶
type Notif struct {
Amqp *NotifAmqp `yaml:"amqp,omitempty"`
Gotify *NotifGotify `yaml:"gotify,omitempty"`
Mail *NotifMail `yaml:"mail,omitempty"`
RocketChat *NotifRocketChat `yaml:"rocketchat,omitempty"`
Script *NotifScript `yaml:"script,omitempty"`
Slack *NotifSlack `yaml:"slack,omitempty"`
Teams *NotifTeams `yaml:"teams,omitempty"`
Telegram *NotifTelegram `yaml:"telegram,omitempty"`
Webhook *NotifWebhook `yaml:"webhook,omitempty"`
}
Notif holds data necessary for notification configuration
type NotifAmqp ¶
type NotifAmqp struct {
Username string `yaml:"username,omitempty"`
UsernameFile string `yaml:"username_file,omitempty"`
Password string `yaml:"password,omitempty"`
PasswordFile string `yaml:"password_file,omitempty"`
Host string `yaml:"host,omitempty"`
Port int `yaml:"port,omitempty"`
Queue string `yaml:"queue,omitempty"`
Exchange string `yaml:"exchange,omitempty"`
}
NotifAmqp holds amqp notification configuration details
type NotifEntry ¶
type NotifEntry struct {
Status ImageStatus `json:"status,omitempty"`
Provider string `json:"provider,omitempty"`
Image registry.Image `json:"image,omitempty"`
Manifest registry.Manifest `json:"manifest,omitempty"`
}
NotifEntry represents a notification entry
type NotifGotify ¶
type NotifGotify struct {
Endpoint string `yaml:"endpoint,omitempty"`
Token string `yaml:"token,omitempty"`
Priority int `yaml:"priority,omitempty"`
Timeout int `yaml:"timeout,omitempty"`
}
NotifGotify holds gotify notification configuration details
type NotifMail ¶
type NotifMail struct {
Host string `yaml:"host,omitempty"`
Port int `yaml:"port,omitempty"`
SSL *bool `yaml:"ssl,omitempty"`
InsecureSkipVerify *bool `yaml:"insecure_skip_verify,omitempty"`
Username string `yaml:"username,omitempty"`
UsernameFile string `yaml:"username_file,omitempty"`
Password string `yaml:"password,omitempty"`
PasswordFile string `yaml:"password_file,omitempty"`
From string `yaml:"from,omitempty"`
To string `yaml:"to,omitempty"`
}
NotifMail holds mail notification configuration details
type NotifRocketChat ¶
type NotifRocketChat struct {
Endpoint string `yaml:"endpoint,omitempty"`
Channel string `yaml:"channel,omitempty"`
UserID string `yaml:"user_id,omitempty"`
Token string `yaml:"token,omitempty"`
Timeout int `yaml:"timeout,omitempty"`
}
NotifRocketChat holds Rocket.Chat notification configuration details
type NotifScript ¶
type NotifScript struct {
Cmd string `yaml:"cmd,omitempty"`
Args []string `yaml:"args,omitempty"`
Dir string `yaml:"dir,omitempty"`
}
NotifScript holds script notification configuration details
type NotifSlack ¶
type NotifSlack struct {
WebhookURL string `yaml:"webhook_url,omitempty"`
}
NotifSlack holds slack notification configuration details
type NotifTeams ¶
type NotifTeams struct {
WebhookURL string `yaml:"webhook_url,omitempty"`
}
NotifTeams holds Teams notification configuration details
type NotifTelegram ¶
type NotifTelegram struct {
BotToken string `yaml:"token,omitempty"`
ChatIDs []int64 `yaml:"chat_ids,omitempty"`
}
NotifTelegram holds Telegram notification configuration details
type NotifWebhook ¶
type NotifWebhook struct {
Endpoint string `yaml:"endpoint,omitempty"`
Method string `yaml:"method,omitempty"`
Headers map[string]string `yaml:"headers,omitempty"`
Timeout int `yaml:"timeout,omitempty"`
}
NotifWebhook holds webhook notification configuration details
type PrdDocker ¶
type PrdDocker struct {
Endpoint string `yaml:"endpoint,omitempty" json:",omitempty"`
APIVersion string `yaml:"api_version,omitempty" json:",omitempty"`
TLSCertsPath string `yaml:"tls_certs_path,omitempty" json:",omitempty"`
TLSVerify *bool `yaml:"tls_verify,omitempty" json:",omitempty"`
WatchByDefault *bool `yaml:"watch_by_default,omitempty" json:",omitempty"`
WatchStopped *bool `yaml:"watch_stopped,omitempty" json:",omitempty"`
}
PrdDocker holds docker provider configuration
type PrdFile ¶
type PrdFile struct {
Filename string `yaml:"filename,omitempty" json:",omitempty"`
Directory string `yaml:"directory,omitempty" json:",omitempty"`
}
PrdFile holds file provider configuration
type PrdSwarm ¶
type PrdSwarm struct {
Endpoint string `yaml:"endpoint,omitempty" json:",omitempty"`
APIVersion string `yaml:"api_version,omitempty" json:",omitempty"`
TLSCertsPath string `yaml:"tls_certs_path,omitempty" json:",omitempty"`
TLSVerify *bool `yaml:"tls_verify,omitempty" json:",omitempty"`
WatchByDefault *bool `yaml:"watch_by_default,omitempty" json:",omitempty"`
}
PrdSwarm holds swarm provider configuration
type Providers ¶
type Providers struct {
Docker *PrdDocker `yaml:"docker,omitempty" json:",omitempty"`
Swarm *PrdSwarm `yaml:"swarm,omitempty" json:",omitempty"`
File *PrdFile `yaml:"file,omitempty" json:",omitempty"`
}
Providers represents a provider configuration
type RegOpts ¶
type RegOpts struct {
Username string `yaml:"username,omitempty" json:",omitempty"`
UsernameFile string `yaml:"username_file,omitempty" json:",omitempty"`
Password string `yaml:"password,omitempty" json:",omitempty"`
PasswordFile string `yaml:"password_file,omitempty" json:",omitempty"`
InsecureTLS bool `yaml:"insecure_tls,omitempty" json:",omitempty"`
Timeout int `yaml:"timeout,omitempty" json:",omitempty"`
}
RegOpts holds registry options configuration