config

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 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
}

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
	ForbidCORS bool
	Debug      bool
}

Server structure contains configurations for the server

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