flg

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package flg defines flags, common for all commands.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EngineGroup

type EngineGroup struct {
	Type   string      `long:"type" env:"TYPE" choice:"github" choice:"gitlab" description:"type of the repository engine" required:"true"`
	Github GithubGroup `group:"github" namespace:"github" env-namespace:"GITHUB"`
	Gitlab GitlabGroup `group:"gitlab" namespace:"gitlab" env-namespace:"GITLAB"`
}

EngineGroup defines parameters for the engine.

func (EngineGroup) Build

func (r EngineGroup) Build() (engine.Interface, error)

Build builds the engine.

type GithubGroup

type GithubGroup struct {
	Repo struct {
		Owner string `long:"owner" env:"OWNER" description:"owner of the repository"`
		Name  string `long:"name" env:"NAME" description:"name of the repository"`
	} `group:"repo" namespace:"repo" env-namespace:"REPO"`
	BasicAuth struct {
		Username string `long:"username" env:"USERNAME" description:"username for basic auth"`
		Password string `long:"password" env:"PASSWORD" description:"password for basic auth"`
	} `group:"basic_auth" namespace:"basic_auth" env-namespace:"BASIC_AUTH"`
}

GithubGroup defines parameters to connect to the github repository.

func (GithubGroup) Empty

func (g GithubGroup) Empty() bool

Empty returns true if the argument group is empty.

type GithubNotifierGroup

type GithubNotifierGroup struct {
	GithubGroup
	ReleaseNameTemplate string `long:"release_name_tmpl" env:"RELEASE_NAME_TMPL" description:"template for release name"`
}

GithubNotifierGroup defines parameters to make release in the github.

func (GithubNotifierGroup) Empty

func (g GithubNotifierGroup) Empty() bool

Empty returns true if the argument group is empty.

type GitlabGroup

type GitlabGroup struct {
	Token     string `long:"token" env:"TOKEN" description:"token to connect to the gitlab repository"`
	BaseURL   string `long:"base_url" env:"BASE_URL" description:"base url of the gitlab instance"`
	ProjectID string `long:"project_id" env:"PROJECT_ID" description:"project id of the repository"`
}

GitlabGroup defines parameters to connect to the gitlab repository.

type MattermostGroup

type MattermostGroup struct {
	BaseURL   string `long:"base_url" env:"BASE_URL" description:"base url of the mattermost server"`
	ChannelID string `long:"channel_id" env:"CHANNEL_ID" description:"id of the channel, where the release notes will be sent"`
	LoginID   string `long:"login_id" env:"LOGIN_ID" description:"login id of the user, who will send the release notes"`
	Password  string `long:"password" env:"PASSWORD" description:"password of the user, who will send the release notes"`
	LDAP      bool   `long:"ldap" env:"LDAP" description:"use ldap auth"`
}

MattermostGroup defines parameters for mattermost notifier.

func (MattermostGroup) Empty

func (g MattermostGroup) Empty() bool

Empty returns true if the config group is not filled.

type NotifyGroup

type NotifyGroup struct {
	Telegram     TelegramGroup       `group:"telegram" namespace:"telegram" env-namespace:"TELEGRAM"`
	Github       GithubNotifierGroup `group:"github" namespace:"github" env-namespace:"GITHUB"`
	Mattermost   MattermostGroup     `group:"mattermost" namespace:"mattermost" env-namespace:"MATTERMOST"`
	Stdout       bool                `long:"stdout" env:"STDOUT" description:"print release notes to stdout"`
	ConfLocation string              `long:"conf_location" env:"CONF_LOCATION" description:"location to the config file"`
}

NotifyGroup defines parameters for the notifier.

func (*NotifyGroup) Build

func (r *NotifyGroup) Build() (destinations notify.Destinations, err error)

Build builds the notifier.

func (*NotifyGroup) ReleaseNotesBuilder

func (r *NotifyGroup) ReleaseNotesBuilder() (*service.ReleaseNotesBuilder, error)

ReleaseNotesBuilder builds the release notes builder.

type TelegramGroup

type TelegramGroup struct {
	ChatID         string `long:"chat_id" env:"CHAT_ID" description:"id of the chat, where the release notes will be sent"`
	Token          string `long:"token" env:"TOKEN" description:"bot token"`
	WebPagePreview bool   `long:"web_page_preview" env:"WEB_PAGE_PREVIEW" description:"request telegram to preview for web links"`
}

TelegramGroup defines parameters for telegram notifier.

func (TelegramGroup) Empty

func (g TelegramGroup) Empty() bool

Empty returns true if the config group is not filled.

Jump to

Keyboard shortcuts

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