Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Destination ¶
type Destination interface {
fmt.Stringer
Send(ctx context.Context, changelog store.Changelog) error
}
Destination defines interface for a given destination service, like telegram, email or stdout.
type Github ¶
type Github struct {
GithubParams
// contains filtered or unexported fields
}
Github makes a new release on Github on the given version.
func NewGithub ¶
func NewGithub(params GithubParams) (*Github, error)
NewGithub makes new instance of Github.
type GithubParams ¶
type GithubParams struct {
Owner string
Name string
BasicAuthUsername string
BasicAuthPassword string
HTTPClient http.Client
ReleaseNotesBuilder *service.ReleaseNotesBuilder
ReleaseNameTmplText string
}
GithubParams describes parameters to initialize github releaser.
type Params ¶
type Params struct {
Log *log.Logger
Destinations []Destination
}
Params describes parameters to initialize notifier service.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service delivers changelog to multiple destinations.
type Telegram ¶
type Telegram struct {
TelegramParams
}
Telegram implements Destination to send changelogs to specified telegram chats.
func NewTelegram ¶
func NewTelegram(params TelegramParams) *Telegram
NewTelegram makes telegram bot for notifications
type TelegramParams ¶
type TelegramParams struct {
ReleaseNotesBuilder *service.ReleaseNotesBuilder
Log *log.Logger
ChatID string
Client http.Client
Token string
DisableWebPagePreview bool
}
TelegramParams defines parameters needed to initialize Telegram notifier.
type WriterNotifier ¶
type WriterNotifier struct {
ReleaseNotesBuilder *service.ReleaseNotesBuilder
Writer io.Writer
Name string // used for debugging purposes
}
WriterNotifier prints the changelog to the specified writer. Writer might be os.Stdout, in order to use in pipelines and CI/CD.
func (*WriterNotifier) String ¶
func (w *WriterNotifier) String() string
String returns the string representation to identify this notifier.