Documentation
¶
Index ¶
- func Parse(c Configurable, opts []Option) error
- type Configurable
- type Option
- func AllowedMethods(methods []string) Option
- func AllowedOrigins(regex bool, origins []string) Option
- func Debug() Option
- func Listen(uri string) Option
- func LoadCertificate(certificate string, key string) Option
- func SelfSignedCertificate() Option
- func TryLoadCertificate(certificate string, key string) Option
- type OptionAllowedMethods
- type OptionAllowedOrigins
- type OptionDebug
- type OptionListen
- type OptionLoadCertificate
- type OptionSelfSignedCertificate
- type OptionTryLoadCertificate
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 AllowedOrigins ¶
func LoadCertificate ¶
func SelfSignedCertificate ¶
func SelfSignedCertificate() Option
func TryLoadCertificate ¶
type OptionAllowedMethods ¶
type OptionAllowedMethods struct {
Methods []string
}
type OptionAllowedOrigins ¶
type OptionDebug ¶ added in v0.10.4
type OptionDebug struct {
Debug bool
}
type OptionListen ¶
type OptionListen struct {
On string
}
type OptionLoadCertificate ¶
type OptionSelfSignedCertificate ¶
type OptionSelfSignedCertificate struct{}
type OptionTryLoadCertificate ¶
type OptionTryLoadCertificate OptionLoadCertificate
Click to show internal directories.
Click to hide internal directories.