server

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 30, 2022 License: Apache-2.0 Imports: 5 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 {
	Server HTTPServerConfig
	GitHub *GitHubConfig
	Slack  *SlackConfig
}

func LoadConfig

func LoadConfig(logger log.Logger) (*Config, error)

Uses Moov's config library to load and merge configuration files from ./config/config.default.yml and the locations specified by environment variables APP_CONFIG and APP_CONFIG_SECRET.

type Environment

type Environment struct {
	Logger log.Logger
	Config *Config

	GitHubService    github.GitHubService
	GitHubController github.GitHubController

	Router *mux.Router
}

func NewEnvironment

func NewEnvironment(env *Environment) (*Environment, error)

type GitHubConfig

type GitHubConfig struct {
	SigningSecret string `json:"signingSecret"`
}

type HTTPServerConfig

type HTTPServerConfig struct {
	BindAddress string `json:"bindAddress"`
}

type SlackConfig

type SlackConfig struct {
	BotToken      string `json:"botToken"`
	SigningSecret string `json:"signingSecret"`
}

Jump to

Keyboard shortcuts

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