cnf

package
v0.0.0-...-c5bcced Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Setup

func Setup()

Types

type Options

type Options struct {
	Kind string `yaml:"kind"`

	Port int `yaml:"port"`

	Host string `yaml:"host"`

	Conn string `yaml:"-"`

	Cert struct {
		Crt string `yaml:"crt"`
		Key string `yaml:"key"`
	}

	Cache map[string]string `yaml:"cache"`

	Chrome struct {
		Endpoint   string // URL endpoint of chromedriver
		Executable string // Path to Google Chrome executable
	}

	Logging struct {
		Level  string // Stores the configured logging level
		Output string // Stores the configured logging output
		Format string // Stores the configured logging format
	}
}

Options defines global configuration options

var Settings *Options

type Request

type Request interface {
	IP() net.IP
	Head() map[string]string
	Body() io.Reader
	Meth() string
	User() string
	Pass() string
	Host() string
	Path() string
	Query() string
}

Request represents an event request

type Response

type Response interface {
	Head(string, string)
	Code(int)
	Body() io.Writer
	Xml(int, interface{})
	Text(int, interface{})
	Html(int, interface{})
	Json(int, interface{})
	Cbor(int, interface{})
	Pack(int, interface{})
}

Response represents an event response

Jump to

Keyboard shortcuts

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