config

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: May 27, 2023 License: MIT Imports: 8 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 {
	Debug         bool                `json:"debug"`
	StackTrace    bool                `json:"stacktrace"`
	Slack         SlackConfig         `json:"slack" validate:"required"`
	GitHub        GitHubConfig        `json:"github" validate:"required"`
	GitHubWebhook GitHubWebhookConfig `json:"githubWebhook" validate:"required"`
	Release       ReleaseConfig       `json:"release" validate:"required"`
	Emtec         EmtecConfig         `json:"emtec"`
}

func LoadConf

func LoadConf(filename string) (*Config, error)

func ParseFlag

func ParseFlag() (*Config, error)

type EmtecConfig

type EmtecConfig struct {
	EndpointUrl string `json:"endpointUrl"`
}

type GitHubConfig

type GitHubConfig struct {
	Username    string `json:"username" validate:"required"`
	AccessToken string `json:"accessToken" validate:"required"`
}

type GitHubWebhookConfig

type GitHubWebhookConfig struct {
	BindAddr string `json:"bindAddr" validate:"required"`
	Secret   string `json:"secret" validate:"required"`
}

type ReleaseConfig

type ReleaseConfig struct {
	Targets []ReleaseTarget `json:"targets" validate:"required"`
}

type ReleaseTarget

type ReleaseTarget struct {
	Url        string `json:"url" validate:"required"`
	BaseBranch string `json:"baseBranch" default:"main"`
}

type SlackConfig

type SlackConfig struct {
	BotToken string `json:"botToken" validate:"required"`
	AppToken string `json:"appToken" validate:"required"`
}

Jump to

Keyboard shortcuts

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