config

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGitHubClient

func NewGitHubClient(appId, installationId int64, githubAppKeyFile string) (*github.Client, error)

NewGitHubClient returns a new GitHub client, implying use from a GitHub App.

Types

type Config

type Config struct {
	Client           *github.Client
	SlackWebhook     string
	GitHubAppKeyFile string
	GitHubAppId      int64
	Host             string
	Port             int64
	Logger           *zerolog.Logger
}

func New

func New() *Config

New will create a blank configuration.

func (*Config) PopulateFromEnv

func (c *Config) PopulateFromEnv() error

PopulateFromEnv will fill in the configuration using the pre-defined environment variables. This is a simple wrapper for the NewFromSource function.

Jump to

Keyboard shortcuts

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