config

package
v1.0.0-rc.24 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bots

type Bots struct {
	Limit int
}

type Config

type Config struct {
	Server  Server
	Target  Target
	Log     Log
	Bots    Bots
	Storage Storage
}

Config is a base server configuration structure

func DefaultConfig

func DefaultConfig() Config

DefaultConfig returns configuration by default

func ParseFlags

func ParseFlags(flagSet *flag.FlagSet, args []string, defaults Config) (Config, error)

ParseFlags parses flags and returns a config based on the default configuration

func StdConfig

func StdConfig() (Config, error)

func (Config) Fields

func (c Config) Fields() map[string]interface{}

Fields returns a map of all configurations

type Log

type Log struct {
	EnableJSON bool
	Level      string
}

Log structure defines preferences for logging

type Server

type Server struct {
	Address    string
	JWTSecret  string
	ForbidCORS bool
	Debug      bool
}

Server structure contains configurations for the server

type Storage added in v1.0.0

type Storage struct {
	Path string
}

Storage structure defines preferences for storage

type Target

type Target struct {
	Address string
	WSS     bool
}

Jump to

Keyboard shortcuts

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