config

package
v0.0.0-...-d6be70b Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2024 License: MIT Imports: 6 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    `` /* 146-byte string literal not displayed */
	Events []Event `toml:"events" desc:"Events to listen for"`
}

Config represents a configuration parse

func NewConfig

func NewConfig(ctx context.Context) (*Config, error)

NewConfig creates a new configuration

func (*Config) Verify

func (c *Config) Verify() error

Verify returns an error if configuration appears off

type Event

type Event struct {
	Name           string   `toml:"name" desc:"Event name"`
	DoGitPull      bool     `toml:"do_git_pull" desc:"Do a git pull before running command"`
	WebhookToken   string   `toml:"webhook_token" desc:"Webhook token"`
	DiscordWebhook string   `toml:"discord_webhook" desc:"Discord webhook"`
	Path           string   `toml:"path" desc:"Working directory path for hook trigger"`
	Command        string   `toml:"command" desc:"Command to run when hook is triggered"`
	Args           []string `toml:"args" desc:"Arguments to pass to command when hook is triggered"`
}

Jump to

Keyboard shortcuts

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