config

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CcmS256 = "ccm_s256"
)
View Source
const DefaultFilename = "couper.hcl"

DefaultFilename defines the default filename for a couper config file.

Variables

View Source
var (
	BackendInlineSchema = Backend{}.Schema(true)
)
View Source
var DefaultSettings = Settings{
	DefaultPort:              8080,
	HealthPath:               "/healthz",
	LogFormat:                "common",
	LogLevel:                 "info",
	LogPretty:                false,
	NoProxyFromEnv:           false,
	RequestIDBackendHeader:   "Couper-Request-ID",
	RequestIDClientHeader:    "Couper-Request-ID",
	RequestIDFormat:          "common",
	TelemetryMetricsEndpoint: otelCollectorEndpoint,
	TelemetryMetricsExporter: "prometheus",
	TelemetryMetricsPort:     9090,
	TelemetryServiceName:     "couper",
	TelemetryTracesEndpoint:  otelCollectorEndpoint,
	XForwardedHost:           false,

	AcceptForwardedURL: []string{},
	AcceptForwarded:    &AcceptForwarded{},
}

DefaultSettings defines the <DefaultSettings> object.

View Source
var OAuthBlockSchema = &hcl.BodySchema{
	Blocks: []hcl.BlockHeaderSchema{
		{
			Type: "oauth2",
		},
	},
}
View Source
var (
	ResponseInlineSchema = Response{}.Schema(true)
)
View Source
var (
	WebsocketsInlineSchema = Websockets{}.Schema(true)
)

Functions

func SchemaWithOAuth2RA

func SchemaWithOAuth2RA(schema *hcl.BodySchema) *hcl.BodySchema

func WithErrorHandlerSchema

func WithErrorHandlerSchema(schema *hcl.BodySchema) *hcl.BodySchema

Types

type API

type API struct {
	ErrorHandlerSetter
	AccessControl        []string  `hcl:"access_control,optional"`
	BasePath             string    `hcl:"base_path,optional"`
	CORS                 *CORS     `hcl:"cors,block"`
	DisableAccessControl []string  `hcl:"disable_access_control,optional"`
	Endpoints            Endpoints `hcl:"endpoint,block"`
	ErrorFile            string    `hcl:"error_file,optional"`
	Name                 string    `hcl:"name,label"`
	Remain               hcl.Body  `hcl:",remain"`
	Scope                cty.Value `hcl:"beta_scope,optional"`

	// internally used
	CatchAllEndpoint *Endpoint
}

API represents the <API> object.

func (API) HCLBody

func (a API) HCLBody() hcl.Body

HCLBody implements the <Inline> interface.

func (API) Inline

func (a API) Inline() interface{}

Inline implements the <Inline> interface.

func (API) Schema

func (a API) Schema(inline bool) *hcl.BodySchema

Schema implements the <Inline> interface.

type APIs

type APIs []*API

APIs represents a list of <API> objects.

type AcceptForwarded

type AcceptForwarded struct {
	// contains filtered or unexported fields
}

func (*AcceptForwarded) Set

func (a *AcceptForwarded) Set(forwarded []string) error

func (AcceptForwarded) String

func (a AcceptForwarded) String() string

type AccessControl

type AccessControl struct {
	AccessControl        []string
	DisableAccessControl []string
}

AccessControl holds all active and inactive access control references.

func NewAccessControl

func NewAccessControl(ac, dac []string) AccessControl

NewAccessControl creates the container object for ac configuration.

func (AccessControl) List

func (ac AccessControl) List() []string

List returns all active access controls.

func (AccessControl) Merge

Merge appends control references in order.

type Backend

type Backend struct {
	ConnectTimeout         string   `hcl:"connect_timeout,optional"`
	DisableCertValidation  bool     `hcl:"disable_certificate_validation,optional"`
	DisableConnectionReuse bool     `hcl:"disable_connection_reuse,optional"`
	HTTP2                  bool     `hcl:"http2,optional"`
	MaxConnections         int      `hcl:"max_connections,optional"`
	Name                   string   `hcl:"name,label"`
	OpenAPI                *OpenAPI `hcl:"openapi,block"`
	Remain                 hcl.Body `hcl:",remain"`
	TTFBTimeout            string   `hcl:"ttfb_timeout,optional"`
	Timeout                string   `hcl:"timeout,optional"`

	// explicit configuration on load
	OAuth2 *OAuth2ReqAuth
}

Backend represents the <Backend> object.

func (Backend) HCLBody

func (b Backend) HCLBody() hcl.Body

HCLBody implements the <Inline> interface.

func (Backend) Inline

func (b Backend) Inline() interface{}

Inline implements the <Inline> interface.

func (Backend) Reference

func (b Backend) Reference() string

Reference implements the <BackendReference> interface.

func (Backend) Schema

func (b Backend) Schema(inline bool) *hcl.BodySchema

Schema implements the <Inline> interface.

type BackendReference

type BackendReference interface {
	Reference() string
}

BackendReference defines the <BackendReference> interface.

type BasicAuth

type BasicAuth struct {
	ErrorHandlerSetter
	File   string   `hcl:"htpasswd_file,optional"`
	Name   string   `hcl:"name,label"`
	User   string   `hcl:"user,optional"`
	Pass   string   `hcl:"password,optional"`
	Realm  string   `hcl:"realm,optional"`
	Remain hcl.Body `hcl:",remain"`
}

BasicAuth represents the "basic_auth" config block

func (*BasicAuth) DefaultErrorHandler

func (b *BasicAuth) DefaultErrorHandler() *ErrorHandler

func (*BasicAuth) HCLBody

func (b *BasicAuth) HCLBody() hcl.Body

HCLBody implements the <Inline> interface. Internally used for 'error_handler'.

func (*BasicAuth) Inline added in v1.7.0

func (b *BasicAuth) Inline() interface{}

func (*BasicAuth) Schema added in v1.7.0

func (b *BasicAuth) Schema(inline bool) *hcl.BodySchema

Schema implements the <Inline> interface.

type Body

type Body interface {
	HCLBody() hcl.Body
}

Body defines the <Body> interface.

type CORS

type CORS struct {
	AllowedOrigins   cty.Value `hcl:"allowed_origins"`
	AllowCredentials bool      `hcl:"allow_credentials,optional"`
	Disable          bool      `hcl:"disable,optional"`
	MaxAge           string    `hcl:"max_age,optional"`
}

CORS represents the <CORS> object.

type Claims

type Claims hcl.Expression

Claims represents the <Claims> object.

type Couper

type Couper struct {
	Bytes       []byte
	Context     context.Context
	Filename    string
	Definitions *Definitions `hcl:"definitions,block"`
	Servers     Servers      `hcl:"server,block"`
	Settings    *Settings    `hcl:"settings,block"`
	Defaults    *Defaults    `hcl:"defaults,block"`
}

Couper represents the <Couper> config object.

type DefaultEnvVars

type DefaultEnvVars map[string]string

type Defaults

type Defaults struct {
	EnvironmentVariables DefaultEnvVars `hcl:"environment_variables,optional"`
}

type DefaultsBlock

type DefaultsBlock struct {
	Defaults *Defaults `hcl:"defaults,block"`
	Remain   hcl.Body  `hcl:",remain"`
}

type Definitions

type Definitions struct {
	Backend           []*Backend           `hcl:"backend,block"`
	BasicAuth         []*BasicAuth         `hcl:"basic_auth,block"`
	JWT               []*JWT               `hcl:"jwt,block"`
	JWTSigningProfile []*JWTSigningProfile `hcl:"jwt_signing_profile,block"`
	SAML              []*SAML              `hcl:"saml,block"`
	OAuth2AC          []*OAuth2AC          `hcl:"beta_oauth2,block"`
	OIDC              []*OIDC              `hcl:"oidc,block"`
	// TODO remove for version 1.8
	BetaOIDC []*OIDC `hcl:"beta_oidc,block"`
}

Definitions represents the <Definitions> object.

type Endpoint

type Endpoint struct {
	ErrorHandlerSetter
	AccessControl        []string  `hcl:"access_control,optional"`
	DisableAccessControl []string  `hcl:"disable_access_control,optional"`
	ErrorFile            string    `hcl:"error_file,optional"`
	Pattern              string    `hcl:"pattern,label"`
	Remain               hcl.Body  `hcl:",remain"`
	RequestBodyLimit     string    `hcl:"request_body_limit,optional"`
	Response             *Response `hcl:"response,block"`
	Scope                cty.Value `hcl:"beta_scope,optional"`

	// internally configured due to multi-label options
	Proxies   Proxies
	Requests  Requests
	Sequences Sequences
}

Endpoint represents the <Endpoint> object.

func (Endpoint) HCLBody

func (e Endpoint) HCLBody() hcl.Body

HCLBody implements the <Inline> interface.

func (Endpoint) Inline

func (e Endpoint) Inline() interface{}

Inline implements the <Inline> interface.

func (Endpoint) Schema

func (e Endpoint) Schema(inline bool) *hcl.BodySchema

Schema implements the <Inline> interface.

type Endpoints

type Endpoints []*Endpoint

Endpoints represents a list of <Endpoint> objects.

type ErrorHandler

type ErrorHandler struct {
	Kinds     []string
	ErrorFile string    `hcl:"error_file,optional"`
	Remain    hcl.Body  `hcl:",remain"`
	Response  *Response `hcl:"response,block"`

	// internally configured due to multi-label options
	Proxies  Proxies
	Requests Requests
}

ErrorHandler represents a subset of Endpoint.

func (ErrorHandler) HCLBody

func (e ErrorHandler) HCLBody() hcl.Body

HCLBody implements the <Inline> interface.

func (ErrorHandler) Inline

func (e ErrorHandler) Inline() interface{}

Inline implements the <Inline> interface.

func (ErrorHandler) Schema

func (e ErrorHandler) Schema(inline bool) *hcl.BodySchema

Schema implements the <Inline> interface.

type ErrorHandlerGetter

type ErrorHandlerGetter interface {
	DefaultErrorHandler() *ErrorHandler
}

ErrorHandlerGetter defines the <ErrorHandlerGetter> interface.

type ErrorHandlerSetter

type ErrorHandlerSetter struct {
	ErrorHandler []*ErrorHandler `hcl:"error_handler,block"`
}

func (*ErrorHandlerSetter) Set

func (ehs *ErrorHandlerSetter) Set(ehConf *ErrorHandler)

type Files

type Files struct {
	AccessControl        []string `hcl:"access_control,optional"`
	BasePath             string   `hcl:"base_path,optional"`
	CORS                 *CORS    `hcl:"cors,block"`
	DisableAccessControl []string `hcl:"disable_access_control,optional"`
	DocumentRoot         string   `hcl:"document_root"`
	ErrorFile            string   `hcl:"error_file,optional"`
	Remain               hcl.Body `hcl:",remain"`
}

Files represents the <Files> object.

func (Files) HCLBody

func (f Files) HCLBody() hcl.Body

HCLBody implements the <Inline> interface.

func (Files) Inline

func (f Files) Inline() interface{}

Inline implements the <Inline> interface.

func (Files) Schema

func (f Files) Schema(inline bool) *hcl.BodySchema

Schema implements the <Inline> interface.

type Inline

type Inline interface {
	Body
	Inline() interface{}
	Schema(inline bool) *hcl.BodySchema
}

Inline defines the <Inline> interface.

type JWT

type JWT struct {
	ErrorHandlerSetter
	BackendName        string              `hcl:"backend,optional"`
	Claims             Claims              `hcl:"claims,optional"`
	ClaimsRequired     []string            `hcl:"required_claims,optional"`
	Cookie             string              `hcl:"cookie,optional"`
	Header             string              `hcl:"header,optional"`
	JWKsURL            string              `hcl:"jwks_url,optional"`
	JWKsTTL            string              `hcl:"jwks_ttl,optional"`
	Key                string              `hcl:"key,optional"`
	KeyFile            string              `hcl:"key_file,optional"`
	Name               string              `hcl:"name,label"`
	Remain             hcl.Body            `hcl:",remain"`
	RolesClaim         string              `hcl:"beta_roles_claim,optional"`
	RolesMap           map[string][]string `hcl:"beta_roles_map,optional"`
	ScopeClaim         string              `hcl:"beta_scope_claim,optional"`
	SignatureAlgorithm string              `hcl:"signature_algorithm,optional"`
	SigningKey         string              `hcl:"signing_key,optional"`
	SigningKeyFile     string              `hcl:"signing_key_file,optional"`
	SigningTTL         string              `hcl:"signing_ttl,optional"`
	TokenValue         hcl.Expression      `hcl:"token_value,optional"`

	// Internally used
	BodyContent *hcl.BodyContent
	Backend     hcl.Body
}

JWT represents the <JWT> object.

func (*JWT) Check

func (j *JWT) Check() error

func (*JWT) HCLBody

func (j *JWT) HCLBody() hcl.Body

HCLBody implements the <Body> interface.

func (*JWT) Inline

func (j *JWT) Inline() interface{}

Inline implements the <Inline> interface.

func (*JWT) Reference

func (j *JWT) Reference() string

Reference implements the <BackendReference> interface.

func (*JWT) Schema

func (j *JWT) Schema(inline bool) *hcl.BodySchema

Schema implements the <Inline> interface.

type JWTSigningProfile

type JWTSigningProfile struct {
	Claims             Claims         `hcl:"claims,optional"`
	Headers            hcl.Expression `hcl:"headers,optional"`
	Key                string         `hcl:"key,optional"`
	KeyFile            string         `hcl:"key_file,optional"`
	Name               string         `hcl:"name,label"`
	SignatureAlgorithm string         `hcl:"signature_algorithm"`
	TTL                string         `hcl:"ttl"`

	// internally used
	KeyBytes []byte
}

type List

type List []string

func (*List) Set

func (s *List) Set(val string) error

func (*List) String

func (s *List) String() string

type OAuth2AC

type OAuth2AC struct {
	ErrorHandlerSetter
	AuthorizationEndpoint   string   `hcl:"authorization_endpoint"`
	BackendName             string   `hcl:"backend,optional"`
	ClientID                string   `hcl:"client_id"`
	ClientSecret            string   `hcl:"client_secret"`
	GrantType               string   `hcl:"grant_type"`
	Name                    string   `hcl:"name,label"`
	Remain                  hcl.Body `hcl:",remain"`
	Scope                   *string  `hcl:"scope,optional"`
	TokenEndpoint           string   `hcl:"token_endpoint"`
	TokenEndpointAuthMethod *string  `hcl:"token_endpoint_auth_method,optional"`
	VerifierMethod          string   `hcl:"verifier_method"`

	// internally used
	Backend     hcl.Body
	BodyContent *hcl.BodyContent
}

OAuth2AC represents an oauth2 block for an OAuth2 client using the authorization code flow.

func (OAuth2AC) GetAuthorizationEndpoint

func (oa OAuth2AC) GetAuthorizationEndpoint(_ string) (string, error)

func (*OAuth2AC) GetBodyContent

func (oa *OAuth2AC) GetBodyContent() *hcl.BodyContent

func (OAuth2AC) GetClientID

func (oa OAuth2AC) GetClientID() string

func (OAuth2AC) GetClientSecret

func (oa OAuth2AC) GetClientSecret() string

func (OAuth2AC) GetGrantType

func (oa OAuth2AC) GetGrantType() string

func (OAuth2AC) GetName

func (oa OAuth2AC) GetName() string

func (OAuth2AC) GetScope

func (oa OAuth2AC) GetScope() string

func (OAuth2AC) GetTokenEndpoint

func (oa OAuth2AC) GetTokenEndpoint() (string, error)

func (OAuth2AC) GetTokenEndpointAuthMethod

func (oa OAuth2AC) GetTokenEndpointAuthMethod() *string

func (OAuth2AC) GetVerifierMethod

func (oa OAuth2AC) GetVerifierMethod(_ string) (string, error)

GetVerifierMethod retrieves the verifier method (ccm_s256 or state)

func (OAuth2AC) HCLBody

func (oa OAuth2AC) HCLBody() hcl.Body

HCLBody implements the <Inline> interface.

func (OAuth2AC) Inline

func (oa OAuth2AC) Inline() interface{}

Inline implements the <Inline> interface.

func (OAuth2AC) Reference

func (oa OAuth2AC) Reference() string

Reference implements the <BackendReference> interface.

func (OAuth2AC) Schema

func (oa OAuth2AC) Schema(inline bool) *hcl.BodySchema

Schema implements the <Inline> interface.

type OAuth2AS

type OAuth2AS interface {
	BackendReference
	GetTokenEndpoint() (string, error)
}

OAuth2AS represents the authorization server configuration for OAuth2 clients.

type OAuth2AcAS

type OAuth2AcAS interface {
	OAuth2AS
	GetAuthorizationEndpoint(uid string) (string, error)
}

OAuth2AcAS represents the authorization server configuration for OAuth2 clients using the authorization code flow.

type OAuth2AcClient

type OAuth2AcClient interface {
	OAuth2Client
	GetName() string
	// GetVerifierMethod retrieves the verifier method (ccm_s256, nonce or state)
	GetVerifierMethod(uid string) (string, error)
	GetBodyContent() *hcl.BodyContent
}

OAuth2AcClient represents the client configuration for OAuth2 clients using the authorization code flow.

type OAuth2Authorization

type OAuth2Authorization interface {
	Inline
	GetAuthorizationEndpoint(uid string) (string, error)
	GetClientID() string
	GetName() string
	GetScope() string
	GetVerifierMethod(uid string) (string, error)
}

OAuth2Authorization represents the configuration for the OAuth2 authorization URL function

type OAuth2Client

type OAuth2Client interface {
	Inline
	GetClientID() string
	GetClientSecret() string
	GetGrantType() string
	GetScope() string
	GetTokenEndpointAuthMethod() *string
}

OAuth2Client represents the client configuration for OAuth2 clients.

type OAuth2ReqAuth

type OAuth2ReqAuth struct {
	BackendName             string   `hcl:"backend,optional"`
	ClientID                string   `hcl:"client_id"`
	ClientSecret            string   `hcl:"client_secret"`
	GrantType               string   `hcl:"grant_type"`
	Remain                  hcl.Body `hcl:",remain"`
	Retries                 *uint8   `hcl:"retries,optional"`
	Scope                   *string  `hcl:"scope,optional"`
	TokenEndpoint           string   `hcl:"token_endpoint,optional"`
	TokenEndpointAuthMethod *string  `hcl:"token_endpoint_auth_method,optional"`
}

OAuth2ReqAuth represents the the oauth2 block in a backend block.

func (OAuth2ReqAuth) GetClientID

func (oa OAuth2ReqAuth) GetClientID() string

func (OAuth2ReqAuth) GetClientSecret

func (oa OAuth2ReqAuth) GetClientSecret() string

func (OAuth2ReqAuth) GetGrantType

func (oa OAuth2ReqAuth) GetGrantType() string

func (OAuth2ReqAuth) GetScope

func (oa OAuth2ReqAuth) GetScope() string

func (OAuth2ReqAuth) GetTokenEndpoint

func (oa OAuth2ReqAuth) GetTokenEndpoint() (string, error)

func (OAuth2ReqAuth) GetTokenEndpointAuthMethod

func (oa OAuth2ReqAuth) GetTokenEndpointAuthMethod() *string

func (OAuth2ReqAuth) HCLBody

func (oa OAuth2ReqAuth) HCLBody() hcl.Body

HCLBody implements the <Inline> interface.

func (OAuth2ReqAuth) Inline

func (oa OAuth2ReqAuth) Inline() interface{}

Inline implements the <Inline> interface.

func (OAuth2ReqAuth) Reference

func (oa OAuth2ReqAuth) Reference() string

Reference implements the <BackendReference> interface.

func (OAuth2ReqAuth) Schema

func (oa OAuth2ReqAuth) Schema(inline bool) *hcl.BodySchema

Schema implements the <Inline> interface.

type OIDC

type OIDC struct {
	ErrorHandlerSetter
	BackendName             string   `hcl:"backend,optional"`
	ClientID                string   `hcl:"client_id"`
	ClientSecret            string   `hcl:"client_secret"`
	ConfigurationURL        string   `hcl:"configuration_url"`
	Name                    string   `hcl:"name,label"`
	Remain                  hcl.Body `hcl:",remain"`
	Scope                   *string  `hcl:"scope,optional"`
	TokenEndpointAuthMethod *string  `hcl:"token_endpoint_auth_method,optional"`
	ConfigurationTTL        string   `hcl:"configuration_ttl,optional"`
	VerifierMethod          string   `hcl:"verifier_method,optional"`

	// internally used
	Backend     hcl.Body
	BodyContent *hcl.BodyContent
}

OIDC represents an oidc block.

func (*OIDC) GetBodyContent

func (o *OIDC) GetBodyContent() *hcl.BodyContent

func (OIDC) GetClientID

func (o OIDC) GetClientID() string

func (OIDC) GetClientSecret

func (o OIDC) GetClientSecret() string

func (OIDC) GetGrantType

func (o OIDC) GetGrantType() string

func (OIDC) GetName

func (o OIDC) GetName() string

func (OIDC) GetScope

func (o OIDC) GetScope() string

func (OIDC) GetTokenEndpointAuthMethod

func (o OIDC) GetTokenEndpointAuthMethod() *string

func (OIDC) HCLBody

func (o OIDC) HCLBody() hcl.Body

HCLBody implements the <Inline> interface.

func (OIDC) Inline

func (o OIDC) Inline() interface{}

Inline implements the <Inline> interface.

func (OIDC) Reference

func (o OIDC) Reference() string

Reference implements the <BackendReference> interface.

func (OIDC) Schema

func (o OIDC) Schema(inline bool) *hcl.BodySchema

Schema implements the <Inline> interface.

type OidcAS

type OidcAS interface {
	OAuth2AcAS
	GetIssuer() (string, error)
	GetUserinfoEndpoint() (string, error)
}

OidcAS represents the OIDC server configuration for OIDC clients.

type OpenAPI

type OpenAPI struct {
	File                     string `hcl:"file"`
	IgnoreRequestViolations  bool   `hcl:"ignore_request_violations,optional"`
	IgnoreResponseViolations bool   `hcl:"ignore_response_violations,optional"`
}

OpenAPI represents the <OpenAPI> object.

type Proxies

type Proxies []*Proxy

Proxies represents a list of <Proxy> objects.

type Proxy

type Proxy struct {
	BackendName string   `hcl:"backend,optional"`
	Name        string   `hcl:"name,label"`
	Remain      hcl.Body `hcl:",remain"`
	Websockets  *bool    `hcl:"websockets,optional"`

	// internally used
	Backend hcl.Body
}

Proxy represents the <Proxy> object.

func (Proxy) HCLBody

func (p Proxy) HCLBody() hcl.Body

HCLBody implements the <Inline> interface.

func (Proxy) Inline

func (p Proxy) Inline() interface{}

Inline implements the <Inline> interface.

func (Proxy) Reference

func (p Proxy) Reference() string

Reference implements the <BackendReference> interface.

func (Proxy) Schema

func (p Proxy) Schema(inline bool) *hcl.BodySchema

Schema implements the <Inline> interface.

type Request

type Request struct {
	BackendName string   `hcl:"backend,optional"`
	Name        string   `hcl:"name,label"`
	Remain      hcl.Body `hcl:",remain"`

	// Internally used
	Backend hcl.Body
}

Request represents the <Request> object.

func (Request) HCLBody

func (r Request) HCLBody() hcl.Body

HCLBody implements the <Inline> interface.

func (Request) Inline

func (r Request) Inline() interface{}

Inline implements the <Inline> interface.

func (Request) Reference

func (r Request) Reference() string

Reference implements the <BackendReference> interface.

func (Request) Schema

func (r Request) Schema(inline bool) *hcl.BodySchema

Schema implements the <Inline> interface.

type Requests

type Requests []*Request

Requests represents a list of <Requests> objects.

type Response

type Response struct {
	Remain hcl.Body `hcl:",remain"`
}

Response represents the <Response> object.

func (Response) HCLBody

func (r Response) HCLBody() hcl.Body

HCLBody implements the <Inline> interface.

func (Response) Inline

func (r Response) Inline() interface{}

Inline implements the <Inline> interface.

func (Response) Schema

func (r Response) Schema(inline bool) *hcl.BodySchema

Schema implements the <Inline> interface.

type SAML

type SAML struct {
	ErrorHandlerSetter
	ArrayAttributes []string `hcl:"array_attributes,optional"`
	IdpMetadataFile string   `hcl:"idp_metadata_file"`
	Name            string   `hcl:"name,label"`
	Remain          hcl.Body `hcl:",remain"`
	SpAcsUrl        string   `hcl:"sp_acs_url"`
	SpEntityId      string   `hcl:"sp_entity_id"`

	// internally used
	MetadataBytes []byte
}

SAML represents the <SAML> object.

func (*SAML) HCLBody

func (s *SAML) HCLBody() hcl.Body

HCLBody implements the <Body> interface. Internally used for 'error_handler'.

func (*SAML) Inline added in v1.7.0

func (s *SAML) Inline() interface{}

func (*SAML) Schema added in v1.7.0

func (s *SAML) Schema(inline bool) *hcl.BodySchema

Schema implements the <Inline> interface.

type Sequence added in v1.7.0

type Sequence struct {
	BodyRange hcl.Range
	Name      string
	// contains filtered or unexported fields
}

func (*Sequence) Add added in v1.7.0

func (s *Sequence) Add(ref *Sequence)

func (*Sequence) Deps added in v1.7.0

func (s *Sequence) Deps() Sequences

Deps returns sequence dependency in reversed order since they have to be solved first.

func (*Sequence) HasParent added in v1.7.0

func (s *Sequence) HasParent() bool

type Sequences added in v1.7.0

type Sequences []*Sequence

type Server

type Server struct {
	AccessControl        []string  `hcl:"access_control,optional"`
	BasePath             string    `hcl:"base_path,optional"`
	CORS                 *CORS     `hcl:"cors,block"`
	DisableAccessControl []string  `hcl:"disable_access_control,optional"`
	Endpoints            Endpoints `hcl:"endpoint,block"`
	ErrorFile            string    `hcl:"error_file,optional"`
	Files                *Files    `hcl:"files,block"`
	Hosts                []string  `hcl:"hosts,optional"`
	Name                 string    `hcl:"name,label"`
	Remain               hcl.Body  `hcl:",remain"`
	Spa                  *Spa      `hcl:"spa,block"`
	APIs                 APIs
}

Server represents the <Server> object.

func (Server) HCLBody

func (s Server) HCLBody() hcl.Body

HCLBody implements the <Inline> interface.

func (Server) Inline

func (s Server) Inline() interface{}

Inline implements the <Inline> interface.

func (Server) Schema

func (s Server) Schema(inline bool) *hcl.BodySchema

Schema implements the <Inline> interface.

type Servers

type Servers []*Server

Servers represents a list of <Server> objects.

type Settings

type Settings struct {
	AcceptForwarded *AcceptForwarded

	AcceptForwardedURL        []string `hcl:"accept_forwarded_url,optional"`
	DefaultPort               int      `hcl:"default_port,optional"`
	HealthPath                string   `hcl:"health_path,optional"`
	LogFormat                 string   `hcl:"log_format,optional"`
	LogLevel                  string   `hcl:"log_level,optional"`
	LogPretty                 bool     `hcl:"log_pretty,optional"`
	NoProxyFromEnv            bool     `hcl:"no_proxy_from_env,optional"`
	RequestIDAcceptFromHeader string   `hcl:"request_id_accept_from_header,optional"`
	RequestIDBackendHeader    string   `hcl:"request_id_backend_header,optional"`
	RequestIDClientHeader     string   `hcl:"request_id_client_header,optional"`
	RequestIDFormat           string   `hcl:"request_id_format,optional"`
	SecureCookies             string   `hcl:"secure_cookies,optional"`
	TLSDevProxy               List     `hcl:"https_dev_proxy,optional"`
	TelemetryMetrics          bool     `hcl:"beta_metrics,optional"`
	TelemetryMetricsEndpoint  string   `hcl:"beta_metrics_endpoint,optional"`
	TelemetryMetricsExporter  string   `hcl:"beta_metrics_exporter,optional"`
	TelemetryMetricsPort      int      `hcl:"beta_metrics_port,optional"`
	TelemetryServiceName      string   `hcl:"beta_service_name,optional"`
	TelemetryTraces           bool     `hcl:"beta_traces,optional"`
	TelemetryTracesEndpoint   string   `hcl:"beta_traces_endpoint,optional"`
	XForwardedHost            bool     `hcl:"xfh,optional"`
}

Settings represents the <Settings> object.

func (*Settings) AcceptsForwardedHost

func (s *Settings) AcceptsForwardedHost() bool

func (*Settings) AcceptsForwardedPort

func (s *Settings) AcceptsForwardedPort() bool

func (*Settings) AcceptsForwardedProtocol

func (s *Settings) AcceptsForwardedProtocol() bool

func (*Settings) SetAcceptForwarded

func (s *Settings) SetAcceptForwarded() error

type Spa

type Spa struct {
	AccessControl        []string `hcl:"access_control,optional"`
	BasePath             string   `hcl:"base_path,optional"`
	BootstrapFile        string   `hcl:"bootstrap_file"`
	CORS                 *CORS    `hcl:"cors,block"`
	DisableAccessControl []string `hcl:"disable_access_control,optional"`
	Paths                []string `hcl:"paths"`
	Remain               hcl.Body `hcl:",remain"`
}

Spa represents the <Spa> object.

func (Spa) HCLBody

func (s Spa) HCLBody() hcl.Body

HCLBody implements the <Inline> interface.

func (Spa) Inline

func (s Spa) Inline() interface{}

Inline implements the <Inline> interface.

func (Spa) Schema

func (s Spa) Schema(inline bool) *hcl.BodySchema

Schema implements the <Inline> interface.

type Websockets

type Websockets struct {
	Remain hcl.Body `hcl:",remain"`
}

func (Websockets) HCLBody

func (w Websockets) HCLBody() hcl.Body

HCLBody implements the <Inline> interface.

func (Websockets) Inline

func (w Websockets) Inline() interface{}

Inline implements the <Inline> interface.

func (Websockets) Schema

func (w Websockets) Schema(inline bool) *hcl.BodySchema

Schema implements the <Inline> interface.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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