config

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: MIT Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ServeConfig   ServeConfig   `json:"serve" yaml:"serve"`
	LoggingConfig LoggingConfig `json:"logging" yaml:"logging"`
	GithubConfig  GithubConfig  `json:"github" yaml:"github"`
}

func New

func New(configFilePath string) (*Config, error)

type GithubConfig added in v0.1.4

type GithubConfig struct {
	PrivateKeyPath string `json:"private_key_path" yaml:"private_key_path"`
	AppID          int64  `json:"app_id" yaml:"app_id"`

	Installations map[string]GithubInstallation `json:"installations" yaml:"installations"`
}

type GithubInstallation added in v0.1.4

type GithubInstallation struct {
	ID int64 `json:"id" yaml:"id"`
}

type LoggingConfig

type LoggingConfig struct {
	Level       int    `json:"level"`
	Encoding    string `json:"encoding"`
	Development bool   `json:"development"`
}

type ServeConfig

type ServeConfig struct {
	BaseUrl string `json:"base_url" yaml:"base_url"`
	Port    int    `json:"port" yaml:"port"`
	Cors    struct {
		Enabled          bool     `json:"enabled" yaml:"enabled"`
		AllowOrigins     []string `json:"allowed_origins" yaml:"allowed_origins"`
		AllowedMethods   []string `json:"allowed_methods" yaml:"allowed_methods"`
		AllowHeaders     []string `json:"allow_headers" yaml:"allow_headers"`
		ExposeHeaders    []string `json:"expose_headers" yaml:"expose_headers"`
		AllowCredentials bool     `json:"allow_credentials" yaml:"allow_credentials"`
	} `json:"cors" yaml:"cors"`
	Timeout time.Duration `json:"timeout" yaml:"timeout"`
}

Jump to

Keyboard shortcuts

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