options

package
v1.1.10 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2026 License: BSD-3-Clause Imports: 2 Imported by: 0

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(any) error
}

type Option

type Option func(s Configurable) error

func ACME

func ACME(directoryURL string) Option

func ACMEWithKey

func ACMEWithKey(directoryURL string, key crypto.Signer) Option

func AllowedMethods

func AllowedMethods(methods []string) Option

func AllowedOrigins

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

func Debug

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 OptionACME

type OptionACME struct {
	Key          crypto.Signer
	DirectoryURL string
}

type OptionAllowedMethods

type OptionAllowedMethods struct {
	Methods []string
}

type OptionAllowedOrigins

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

type OptionDebug

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