config

package
v0.0.0-...-09aa624 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2022 License: Apache-2.0 Imports: 2 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   ConfigServer   `json:"server"`
	Database ConfigDatabase `json:"database"`
	Discord  ConfigDiscord  `json:"discord"`
	Email    ConfigEmail    `json:"email"`
	RabbitMQ ConfigRabbitMQ `json:"rabbitmq"`
	Redis    ConfigRedis    `json:"redis"`
	Session  ConfigSession  `json:"session"`
	OAuth    ConfigOAuth    `json:"oauth"`
	VATUSA   ConfigVATUSA   `json:"vatusa"`
	Storage  ConfigStorage  `json:"storage"`
}
var Cfg *Config

func ParseConfig

func ParseConfig(file string) (*Config, error)

type ConfigDatabase

type ConfigDatabase struct {
	Host        string `json:"host"`
	Port        string `json:"port"`
	User        string `json:"user"`
	Password    string `json:"password"`
	Database    string `json:"database"`
	Automigrate bool   `json:"automigrate"`
}

type ConfigDiscord

type ConfigDiscord struct {
	Webhooks map[string]string `json:"webhooks"`
}

type ConfigEmail

type ConfigEmail struct {
	Host     string `json:"host"`
	Port     string `json:"port"`
	User     string `json:"user"`
	Password string `json:"password"`
	From     string `json:"from"`
}

type ConfigOAuth

type ConfigOAuth struct {
	BaseURL      string `json:"base_URL"`
	ClientID     string `json:"client_id"`
	ClientSecret string `json:"client_secret"`
	MyBaseURL    string `json:"my_base_URL"`

	Endpoints ConfigOAuthEndpoints `json:"endpoints"`
}

type ConfigOAuthEndpoints

type ConfigOAuthEndpoints struct {
	Authorize string `json:"authorize"`
	Token     string `json:"token"`
	UserInfo  string `json:"user"`
}

type ConfigRabbitMQ

type ConfigRabbitMQ struct {
	Host     string `json:"host"`
	Port     int    `json:"port"`
	User     string `json:"user"`
	Password string `json:"password"`
}

type ConfigRedis

type ConfigRedis struct {
	Password      string   `json:"password"`
	Database      int      `json:"database"`
	Address       string   `json:"address"`
	Sentinel      bool     `json:"sentinel"`
	MasterName    string   `json:"master_name"`
	SentinelAddrs []string `json:"sentinel_addrs"`
}

type ConfigServer

type ConfigServer struct {
	Host string `json:"host"`
	Port string `json:"port"`
}

type ConfigSession

type ConfigSession struct {
	Cookie ConfigSessionCookie `json:"cookie"`
}

type ConfigSessionCookie

type ConfigSessionCookie struct {
	Name   string `json:"name"`
	Secret string `json:"secret"`
	Domain string `json:"domain"`
	Path   string `json:"path"`
	MaxAge int    `json:"max_age"`
}

type ConfigStorage

type ConfigStorage struct {
	AccessKey string `json:"access_key"`
	SecretKey string `json:"secret_key"`
	Bucket    string `json:"bucket"`
	Region    string `json:"region"`
	Endpoint  string `json:"endpoint"`
}

type ConfigVATUSA

type ConfigVATUSA struct {
	APIKey string `json:"api_key"`
}

Jump to

Keyboard shortcuts

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