config

package
v0.0.0-...-6c27aa2 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AppName is the name of the app to be used as prefix of environment variables
	AppName = "RANDFLIXAPI"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Port               int      `default:"8080"`
	StorageKind        string   `default:"MemStore"`
	CorsAllowedOrigins []string `default:"*"`
	CorsAllowedHeaders []string `default:"Content-Type"`
	CorsAllowedMethods []string `default:"GET,OPTIONS"`
}

Config describes the api configuration

func GetConfig

func GetConfig() (*Config, error)

GetConfig returns the current config from environment variables

func (*Config) String

func (c *Config) String() string

Jump to

Keyboard shortcuts

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