types

package
v0.0.0-...-a7bc12e Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CanonicalDomain

func CanonicalDomain(domain string) string

CanonicalDomain returns a lower case domain with trim space. CanonicalDomain 将域名转换为小写并去除空格, 规范化 domain 名称

func MatchDomain

func MatchDomain(domain, certDomain string) bool

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) Set

func (d *Domain) Set(domains []string)

Set sets a domains from an array of strings.

func (*Domain) ToStrArray

func (d *Domain) ToStrArray() []string

ToStrArray convert a domain into an array of strings.

type Duration

type Duration time.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

func (d Duration) MarshalJSON() ([]byte, error)

MarshalJSON serializes the given duration value.

func (Duration) MarshalText

func (d Duration) MarshalText() ([]byte, error)

MarshalText serialize the given duration value into a text.

func (*Duration) Set

func (d *Duration) Set(s string) error

Set sets the duration from the given string value.

func (Duration) String

func (d Duration) String() string

String returns a string representation of the duration value.

func (*Duration) UnmarshalJSON

func (d *Duration) UnmarshalJSON(text []byte) error

UnmarshalJSON deserializes the given text into a duration value.

func (*Duration) UnmarshalText

func (d *Duration) UnmarshalText(text []byte) error

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.

Jump to

Keyboard shortcuts

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