config

package
v0.0.0-...-e331df4 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2022 License: MIT Imports: 5 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 {
	SigningKey string
	TTL        time.Duration `mapstructure:"ttl"`
}

Auth config variables.

type Config

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

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.

Jump to

Keyboard shortcuts

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