easiest

package module
v0.0.22 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2023 License: MIT Imports: 22 Imported by: 0

README

easiest

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config added in v0.0.4

type Config struct {
	DebugAddress string  `yaml:"debugAddress,omitempty"`
	TlsDir       string  `yaml:"tlsDir,omitempty"`
	Routes       []Route `yaml:"routes,omitempty"`
}

type HttpConfig added in v0.0.4

type HttpConfig struct {
	ForceTLS           bool `yaml:"forceTLS,omitempty"`
	HeaderForwardedFor bool `yaml:"headerForwardedFor,omitempty"`
}

type Logger

type Logger interface {
	Println(v ...interface{})
}

type Replace added in v0.0.4

type Replace struct {
	Old string `yaml:"old,omitempty"`
	New string `yaml:"new,omitempty"`
}

type Route added in v0.0.4

type Route struct {
	Domain   string     `yaml:"domain,omitempty"`
	Target   string     `yaml:"target,omitempty"`
	HTTP     HttpConfig `yaml:"http,omitempty"`
	Replaces []Replace  `yaml:"replaces,omitempty"`
	Stream   bool       `yaml:"stream,omitempty"`
}

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer(conf Config, logger Logger) *Server

func (*Server) Run

func (s *Server) Run(ctx context.Context) error

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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