config

package
v0.0.0-...-1a64ad2 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2022 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthConfig

type AuthConfig struct {
	JWT JWTConfig `mapstructure:"jwt"`
}

Auth config variables.

type Config

type Config struct {
	HTTP    HTTPConfig    `mapstructure:"http"`
	Service ServiceConfig `mapstructure:"service"`
	GraphQL GraphQLConfig `mapstructure:"graphql"`
	Auth    AuthConfig
}

Config variables.

func NewConfig

func NewConfig() (*Config, error)

Creating a new config.

type CorsConfig

type CorsConfig struct {
	Enable       bool   `mapstructure:"enable"`
	AllowOrigins string `mapstructure:"allow-origins"`
	AllowMethods string `mapstructure:"allow-methods"`
	AllowHeaders string `mapstructure:"allow-headers"`
}

CORS config variables.

type GraphQLConfig

type GraphQLConfig struct {
	ComplexityLimit int `mapstructure:"complexity-limit"`
}

GraphQL config variables.

type HTTPConfig

type HTTPConfig struct {
	Host string     `mapstructure:"host"`
	Port string     `mapstructure:"port"`
	Name string     `mapstructure:"name"`
	Cors CorsConfig `mapstructure:"cors"`
}

HTTP server config variables.

type JWTConfig

type JWTConfig struct{ SigningKey string }

JWT config variables.

type Service

type Service struct {
	Addr string    `mapstructure:"addr"`
	TLS  TLSConfig `mapstructure:"tls"`
}

Service base config.

type ServiceConfig

type ServiceConfig struct {
	User Service `mapstructure:"user"`
	Post Service `mapstructure:"post"`
}

Services config variables.

type TLSConfig

type TLSConfig struct {
	Enable bool   `mapstructure:"enable"`
	CACert string `mapstructure:"ca-cert"`
	Cert   string `mapstructure:"cert"`
	Key    string `mapstructure:"key"`
}

TLS config variables.

Jump to

Keyboard shortcuts

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