config

package
v0.0.0-...-80024de Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	BaseURL   string          `json:"base-url"`
	SSL       bool            `json:"ssl,omitempty"`
	SSLDomain string          `json:"ssl-domain,omitempty"`
	Methods   []MethodsConfig `json:"methods"`
}

Configuration type representing the .json config file

var Config Configuration

Config var with the configuration parsed from the .json file

func LoadConfig

func LoadConfig(content string) Configuration

LoadConfig loads the content (as JSON) into an instance of Configuration type

func LoadConfigFile

func LoadConfigFile(filePath string) Configuration

LoadConfigFile loads the config file into an instance of Configuration type

type MethodsConfig

type MethodsConfig struct {
	Name      string   `json:"name"`
	ProxyTo   []string `json:"proxy-to"`
	RateLimit int      `json:"rate-limit"`
}

MethodsConfig type representing the config for each JSON-RPC method

Jump to

Keyboard shortcuts

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