Documentation
¶
Index ¶
- Variables
- func NewRouter(logger *logging.Logger, ca ca.CertificateAuthority, ...) router.WebServiceRouter
- type CORSConfig
- type Config
- type HandlerRegistry
- func (registry *HandlerRegistry) ACMERestService() acmehandler.RestServicer
- func (registry *HandlerRegistry) JSONWebTokenHandler() jwthandler.TokenHandler
- func (registry *HandlerRegistry) SystemRestService() system.RestHandler
- func (registry *HandlerRegistry) WebAuthnRestService() webauthn.RestHandler
- type Identity
- type JWT
- type ProxyConfig
- type RegistryParams
- type RestHandlerRegistry
- type RestService
- type RewriteRule
- type Router
- type VirtualHost
- type WebAuthn
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func NewRouter ¶
func NewRouter( logger *logging.Logger, ca ca.CertificateAuthority, serverKeyAttribtues *keystore.KeyAttributes, restHandlerRegistry RestHandlerRegistry, responseWriter response.HttpWriter) router.WebServiceRouter
Types ¶
type CORSConfig ¶
type CORSConfig struct { AllowedOrigins []string `yaml:"allowed-origins" json:"allowed_origins" mapstructure:"allowed-origins"` AllowedMethods []string `yaml:"allowed-methods" json:"allowed_methods" mapstructure:"allowed-methods"` AllowedHeaders []string `yaml:"allowed-headers" json:"allowed_headers" mapstructure:"allowed-headers"` AllowCredentials bool `yaml:"allow-credentials" json:"allow_credentials" mapstructure:"allow-credentials"` }
type Config ¶
type Config struct { Certificate Identity `yaml:"certificate" json:"certificate" mapstructure:"certificate"` Home string `yaml:"home" json:"home" mapstructure:"home"` Index string `yaml:"index" json:"index" mapstructure:"index"` JWT JWT `yaml:"jwt" json:"jwt" mapstructure:"jwt"` Key *keystore.KeyConfig `yaml:"key" json:"key" mapstructure:"key"` Port int `yaml:"port" json:"port" mapstructure:"port"` Proxy *ProxyConfig `yaml:"proxy" json:"proxy" mapstructure:"proxy"` RewriteRules []*RewriteRule `yaml:"rewrite" json:"rewrite" mapstructure:"rewrite"` TLSPort int `yaml:"tls-port" json:"tls_port" mapstructure:"tls-port"` VirtualHosts *[]VirtualHost `yaml:"virtual-hosts" json:"virtual_hosts" mapstructure:"virtual-hosts"` WebAuthn *WebAuthn `yaml:"webauthn" json:"webauthn" mapstructure:"webauthn"` CORS *CORSConfig `yaml:"cors" json:"cors" mapstructure:"cors"` }
type HandlerRegistry ¶
type HandlerRegistry struct { RestHandlerRegistry // contains filtered or unexported fields }
func (*HandlerRegistry) ACMERestService ¶
func (registry *HandlerRegistry) ACMERestService() acmehandler.RestServicer
func (*HandlerRegistry) JSONWebTokenHandler ¶
func (registry *HandlerRegistry) JSONWebTokenHandler() jwthandler.TokenHandler
func (*HandlerRegistry) SystemRestService ¶
func (registry *HandlerRegistry) SystemRestService() system.RestHandler
func (*HandlerRegistry) WebAuthnRestService ¶
func (registry *HandlerRegistry) WebAuthnRestService() webauthn.RestHandler
type Identity ¶
type Identity struct { ACME *acme.CertificateRequest `yaml:"acme" json:"acme" mapstructure:"acme"` SANS *ca.SubjectAlternativeNames `yaml:"sans" json:"sans" mapstructure:"sans"` Subject ca.Subject `yaml:"subject" json:"subject" mapstructure:"subject"` Valid int `yaml:"valid" json:"valid" mapstructure:"valid"` }
type ProxyConfig ¶
type ProxyConfig struct {
Backends []string `yaml:"backends" json:"backends" mapstructure:"backends"`
}
type RegistryParams ¶
type RegistryParams struct { ACMEConfig *acme.Config ACMEDAOFactory dao.Factory CA ca.CertificateAuthority Debug bool HTTPWriter response.HttpWriter Keyring *platform.Keyring JWTAudience string JWTClaimsIssuer string JWTExpiration int Logger *logging.Logger ServerKeyAttributes *keystore.KeyAttributes ServiceRegistry *service.Registry TPM tpm2.TrustedPlatformModule WebServiceConfig *Config WebAuthnConfig *webauthn.Config }
type RestHandlerRegistry ¶
type RestHandlerRegistry interface { ACMERestService() acmehandler.RestServicer JSONWebTokenHandler() jwthandler.TokenHandler WebAuthnRestService() webauthn.RestHandler }
func NewHandlerRegistry ¶
func NewHandlerRegistry(params RegistryParams) RestHandlerRegistry
type RestService ¶
type RewriteRule ¶
type Router ¶
type Router struct { router.WebServiceRouter // contains filtered or unexported fields }
func (*Router) RegisterRoutes ¶
Registers all websocket and REST services
type VirtualHost ¶
type VirtualHost struct { Certificate *Identity `yaml:"certificate" json:"certificate" mapstructure:"certificate"` CORS *CORSConfig `yaml:"cors" json:"cors" mapstructure:"cors"` Home string `yaml:"home" json:"home" mapstructure:"home"` Hosts []string `yaml:"hosts" json:"hosts" mapstructure:"hosts"` Index string `yaml:"index" json:"index" mapstructure:"index"` Key *keystore.KeyConfig `yaml:"key" json:"key" mapstructure:"key"` Proxy *ProxyConfig `yaml:"proxy" json:"proxy" mapstructure:"proxy"` RewriteRules []*RewriteRule `yaml:"rewrite" json:"rewrite" mapstructure:"rewrite"` }
Click to show internal directories.
Click to hide internal directories.