Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CanonicalDomain ¶
CanonicalDomain returns a lower case domain with trim space. CanonicalDomain 将域名转换为小写并去除空格, 规范化 domain 名称
func MatchDomain ¶
MatchDomain returns true if a domain match the cert domain.
Types ¶
type Domain ¶
type Domain struct {
// Main defines the main domain name.
Main string `description:"Default subject name." json:"main,omitempty" toml:"main,omitempty" yaml:"main,omitempty"`
// SANs defines the subject alternative domain names.
SANs []string `description:"Subject alternative names." json:"sans,omitempty" toml:"sans,omitempty" yaml:"sans,omitempty"`
}
Domain holds a domain name with SANs.
func (*Domain) ToStrArray ¶
ToStrArray convert a domain into an array of strings.
type Duration ¶
Duration is a custom type suitable for parsing duration values. It supports `time.ParseDuration`-compatible values and suffix-less digits; in the latter case, seconds are assumed.
func (Duration) MarshalJSON ¶
MarshalJSON serializes the given duration value.
func (Duration) MarshalText ¶
MarshalText serialize the given duration value into a text.
func (*Duration) UnmarshalJSON ¶
UnmarshalJSON deserializes the given text into a duration value.
func (*Duration) UnmarshalText ¶
UnmarshalText deserializes the given text into a duration value. It is meant to support TOML decoding of durations.
type FileOrContent ¶
type FileOrContent string
FileOrContent holds a file path or content.
func (FileOrContent) IsPath ¶
func (f FileOrContent) IsPath() bool
IsPath returns true if the FileOrContent is a file path, otherwise returns false.
func (FileOrContent) Read ¶
func (f FileOrContent) Read() ([]byte, error)
Read returns the content after reading the FileOrContent variable.
func (FileOrContent) String ¶
func (f FileOrContent) String() string
String returns the FileOrContent in string format.
type HTTPCodeRanges ¶
type HTTPCodeRanges [][2]int
HTTPCodeRanges holds HTTP code ranges.
func NewHTTPCodeRanges ¶
func NewHTTPCodeRanges(strBlocks []string) (HTTPCodeRanges, error)
NewHTTPCodeRanges creates HTTPCodeRanges from a given []string. Break out the http status code ranges into a low int and high int for ease of use at runtime.
func (HTTPCodeRanges) Contains ¶
func (h HTTPCodeRanges) Contains(statusCode int) bool
Contains tests whether the passed status code is within one of its HTTP code ranges.
type HostResolverConfig ¶
type HostResolverConfig struct {
CnameFlattening bool `` /* 168-byte string literal not displayed */
ResolvConfig string `` /* 152-byte string literal not displayed */
ResolvDepth int `` /* 159-byte string literal not displayed */
}
HostResolverConfig contain configuration for CNAME Flattening.
func (*HostResolverConfig) SetDefaults ¶
func (h *HostResolverConfig) SetDefaults()
SetDefaults sets the default values.