types

package
v1.7.35 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2026 License: MIT Imports: 17 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.

func MatchDomain

func MatchDomain(domain, certDomain string) bool

MatchDomain returns true if a domain match the cert domain.

Types

type ClientTLS

type ClientTLS struct {
	CA                 string `description:"TLS CA" json:"ca,omitempty" toml:"ca,omitempty" yaml:"ca,omitempty"`
	Cert               string `description:"TLS cert" json:"cert,omitempty" toml:"cert,omitempty" yaml:"cert,omitempty"`
	Key                string `description:"TLS key" json:"key,omitempty" toml:"key,omitempty" yaml:"key,omitempty" loggable:"false"`
	InsecureSkipVerify bool   `` /* 160-byte string literal not displayed */
}

ClientTLS holds TLS specific configurations as client CA, Cert and Key can be either path or file contents.

func (*ClientTLS) CreateTLSConfig

func (c *ClientTLS) CreateTLSConfig(ctx context.Context) (*tls.Config, error)

CreateTLSConfig creates a TLS config from ClientTLS structures.

func (*ClientTLS) DeepCopy

func (in *ClientTLS) DeepCopy() *ClientTLS

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClientTLS.

func (*ClientTLS) DeepCopyInto

func (in *ClientTLS) DeepCopyInto(out *ClientTLS)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

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

func (in *Domain) DeepCopy() *Domain

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Domain.

func (*Domain) DeepCopyInto

func (in *Domain) DeepCopyInto(out *Domain)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

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 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.

type K8sAttributesDetector

type K8sAttributesDetector struct{}

K8sAttributesDetector detects the metadata of the Ingress pod running in a Kubernetes cluster. It reads the pod name from the hostname file and the namespace from the service account namespace file and queries the Kubernetes API to get the pod's UID.

func (K8sAttributesDetector) Detect

type RouteAppender

type RouteAppender interface {
	Append(systemRouter *mux.Router)
}

RouteAppender appends routes on a router (/api, /ping ...).

Jump to

Keyboard shortcuts

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