vshttp

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2023 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCacheMiss = errors.New("acme/autocert: certificate cache miss")

Functions

func Load

func Load() *module

func Render

func Render(tpl string, r *http.Request) ([]byte, error)

Types

type CertsCache

type CertsCache struct{}

func (CertsCache) Delete

func (d CertsCache) Delete(ctx context.Context, name string) error

Delete removes the specified file name.

func (CertsCache) Get

func (d CertsCache) Get(ctx context.Context, name string) ([]byte, error)

Get reads a certificate data from DB by name

func (CertsCache) Put

func (d CertsCache) Put(ctx context.Context, name string, data []byte) error

Put inserts the certificate data to DB

type HostConfig

type HostConfig struct {
	Hostname  string     `json:"hostname" mapstructure:"hostname"`   // slice of hostnames
	Locations []Location `json:"locations" mapstructure:"locations"` // slice of locations with settings
}

type Location

type Location struct {
	Path   string      `json:"path" mapstructure:"path"`               // location path/URI
	Action string      `json:"action_name" mapstructure:"action_name"` // what to do
	Data   interface{} `json:"action_data" mapstructure:"action_data"` // extra data: template/file id/location/etc
}

type TLSConfig

type TLSConfig struct {
	Enabled  bool `json:"enabled" mapstructure:"enabled"`
	Autocert bool `json:"autocert" mapstructure:"autocert"`
}

Jump to

Keyboard shortcuts

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