Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Middleware ¶
type Middleware struct {
ID string `json:"id"`
Name string `json:"name"`
Type string `json:"type"`
Config string `json:"config"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
Middleware represents a Traefik middleware configuration
func (*Middleware) ConfigMap ¶
func (m *Middleware) ConfigMap() (map[string]interface{}, error)
ConfigMap returns the middleware config as a map
type PangolinResource ¶
type PangolinResource struct {
ID string `json:"id"`
Host string `json:"host"`
OrgID string `json:"org_id"`
SiteID string `json:"site_id"`
}
PangolinResource represents the format of a resource from Pangolin API
type PangolinRouter ¶
type PangolinRouter struct {
Rule string `json:"rule"`
Service string `json:"service"`
EntryPoints []string `json:"entryPoints"`
Middlewares []string `json:"middlewares"`
TLS struct {
CertResolver string `json:"certResolver"`
} `json:"tls"`
}
PangolinRouter represents a router configuration from Pangolin API
type PangolinService ¶
type PangolinService struct {
LoadBalancer struct {
Servers []struct {
URL string `json:"url"`
} `json:"servers"`
} `json:"loadBalancer"`
}
PangolinService represents a service configuration from Pangolin API
type PangolinTraefikConfig ¶
type PangolinTraefikConfig struct {
HTTP struct {
Routers map[string]PangolinRouter `json:"routers"`
Services map[string]PangolinService `json:"services"`
} `json:"http"`
}
PangolinTraefikConfig represents the Traefik configuration from Pangolin API
type Resource ¶
type Resource struct {
ID string `json:"id"`
Host string `json:"host"`
ServiceID string `json:"service_id"`
OrgID string `json:"org_id"`
SiteID string `json:"site_id"`
Status string `json:"status"`
// HTTP router configuration
Entrypoints string `json:"entrypoints"`
// TLS certificate configuration
TLSDomains string `json:"tls_domains"`
// TCP SNI routing configuration
TCPEnabled bool `json:"tcp_enabled"`
TCPEntrypoints string `json:"tcp_entrypoints"`
TCPSNIRule string `json:"tcp_sni_rule"`
// Custom headers configuration
CustomHeaders string `json:"custom_headers"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
// Middlewares is a list of associated middlewares, populated when needed
Middlewares []ResourceMiddleware `json:"middlewares,omitempty"`
}
Resource represents a Pangolin resource
Click to show internal directories.
Click to hide internal directories.