options

package
v0.10.5 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2023 License: MIT Imports: 1 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(c Configurable, opts []Option) error

Types

type Configurable

type Configurable interface {
	SetOption(interface{}) error
}

type Option

type Option func(s Configurable) error

func AllowedMethods

func AllowedMethods(methods []string) Option

func AllowedOrigins

func AllowedOrigins(regex bool, origins []string) Option

func Debug added in v0.10.4

func Debug() Option

func Listen

func Listen(uri string) Option

func LoadCertificate

func LoadCertificate(certificate string, key string) Option

func SelfSignedCertificate

func SelfSignedCertificate() Option

func TryLoadCertificate

func TryLoadCertificate(certificate string, key string) Option

type OptionAllowedMethods

type OptionAllowedMethods struct {
	Methods []string
}

type OptionAllowedOrigins

type OptionAllowedOrigins struct {
	Func func(origin string) bool
}

type OptionDebug added in v0.10.4

type OptionDebug struct {
	Debug bool
}

type OptionListen

type OptionListen struct {
	On string
}

type OptionLoadCertificate

type OptionLoadCertificate struct {
	CertificateFilename string
	KeyFilename         string
}

type OptionSelfSignedCertificate

type OptionSelfSignedCertificate struct{}

type OptionTryLoadCertificate

type OptionTryLoadCertificate OptionLoadCertificate

Jump to

Keyboard shortcuts

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