Documentation
¶
Index ¶
- Constants
- Variables
- func ParsePath(in string, faultTolerant bool) ([]string, error)
- type Address
- type ByHost
- func (instance *ByHost) All(consumer func(Rule) error) error
- func (instance *ByHost) Clone() *ByHost
- func (instance *ByHost) Find(host string, path []string) (Rules, error)
- func (instance *ByHost) HasContent() bool
- func (instance *ByHost) Put(r Rule) error
- func (instance *ByHost) Remove(predicate Predicate) error
- type ByPath
- func (instance *ByPath) All(consumer func(Rule) error) error
- func (instance *ByPath) Clone() *ByPath
- func (instance *ByPath) Find(path []string) (Rules, error)
- func (instance *ByPath) HasContent() bool
- func (instance *ByPath) Put(r Rule) error
- func (instance *ByPath) Remove(predicate Predicate) error
- type CertificateQuery
- type CertificateRepository
- type Certificates
- type CertificatesByHost
- type CombinedRepository
- type ForceableBool
- type Header
- type Headers
- type OnAdded
- type OnRemoved
- type OptionalBool
- type Options
- type Predicate
- type Query
- type Repository
- type Rule
- type Rules
- type SourceReference
- type Statistics
Constants ¶
View Source
const ( NotDefined = OptionalBool(0) False = OptionalBool(1) True = OptionalBool(2) )
Variables ¶
View Source
var (
ErrIllegalPath = errors.New("illegal path")
)
Functions ¶
Types ¶
type ByHost ¶
type ByHost struct {
// contains filtered or unexported fields
}
func (*ByHost) HasContent ¶
type ByPath ¶
type ByPath struct {
// contains filtered or unexported fields
}
func (*ByPath) HasContent ¶
type CertificateQuery ¶
type CertificateQuery struct {
Host string
}
type CertificateRepository ¶
type CertificateRepository interface {
FindCertificatesBy(CertificateQuery) (Certificates, error)
}
type Certificates ¶
type Certificates []*tls.Certificate
type CertificatesByHost ¶
type CertificatesByHost struct {
// contains filtered or unexported fields
}
func (*CertificatesByHost) Add ¶
func (instance *CertificatesByHost) Add(certificate tls.Certificate) error
func (*CertificatesByHost) AddBytes ¶
func (instance *CertificatesByHost) AddBytes(certificate, privateKey []byte) error
func (CertificatesByHost) Find ¶
func (instance CertificatesByHost) Find(host string) Certificates
type CombinedRepository ¶
type CombinedRepository interface { Repository CertificateRepository }
func NewRepository ¶
func NewRepository() (CombinedRepository, error)
type ForceableBool ¶
func (*ForceableBool) Set ¶
func (instance *ForceableBool) Set(plain string) error
func (ForceableBool) String ¶
func (instance ForceableBool) String() string
type OptionalBool ¶
type OptionalBool uint8
func (OptionalBool) IsEnabled ¶
func (instance OptionalBool) IsEnabled(def bool) bool
func (OptionalBool) IsEnabledOrForced ¶
func (instance OptionalBool) IsEnabledOrForced(def ForceableBool) bool
func (*OptionalBool) Set ¶
func (instance *OptionalBool) Set(plain string) error
func (OptionalBool) String ¶
func (instance OptionalBool) String() string
type Options ¶
type Options struct { Cors OptionalBool `json:"cors,omitempty"` ForceSecure OptionalBool `json:"forceSecure,omitempty"` StripRulePathPrefix OptionalBool `json:"stripRulePathPrefix,omitempty"` PathPrefix []string `json:"pathPrefix,omitempty"` XForwardedPrefix OptionalBool `json:"xForwardedPrefix,omitempty"` WhitelistedRemotes []Address `json:"whitelistedRemotes,omitempty"` RequestHeaders Headers `json:"requestHeaders,omitempty"` ResponseHeaders Headers `json:"responseHeaders,omitempty"` }
func (Options) IsRelevant ¶
type Predicate ¶
func PredicateBySource ¶
func PredicateBySource(reference SourceReference) Predicate
type Repository ¶
type Rule ¶
type Rule interface { Host() string Path() []string Source() SourceReference Backend() net.Addr Options() Options Statistics() *Statistics }
type SourceReference ¶
type SourceReference interface { Name() string Type() string String() string Equals(SourceReference) bool }
type Statistics ¶
type Statistics struct {
// contains filtered or unexported fields
}
func (*Statistics) MarkUsed ¶
func (instance *Statistics) MarkUsed(duration time.Duration)
func (*Statistics) MarshalJSON ¶
func (instance *Statistics) MarshalJSON() ([]byte, error)
func (*Statistics) NumberOfUsages ¶
func (instance *Statistics) NumberOfUsages() uint64
func (*Statistics) TotalDuration ¶
func (instance *Statistics) TotalDuration() time.Duration
Source Files
¶
Click to show internal directories.
Click to hide internal directories.