server

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2021 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListenAndServe

func ListenAndServe(ctx context.Context, lgger *logger.Logger, c *Config) error

Types

type Authentication

type Authentication struct {
	JwksURI string `yaml:"jwks_uri"`
}

type Authorization

type Authorization struct {
	RequestPolicy  string `yaml:"requests"`
	ResponsePolicy string `yaml:"responses"`
}

type Backend

type Backend struct {
	ChannelProvider *Provider `yaml:"channel_provider"`
	StorageProvider *Provider `yaml:"storage_provider"`
}

type Config

type Config struct {
	Port           int64           `yaml:"port"`
	TLS            *TLS            `yaml:"tls"`
	Cors           *Cors           `yaml:"cors"`
	Logging        *Logging        `yaml:"logging"`
	Authorization  *Authorization  `yaml:"authorization"`
	Authentication *Authentication `yaml:"authentication"`
	Backend        *Backend        `yaml:"backend"`
}

func ConfigFromFile

func ConfigFromFile(path string) (*Config, error)

func (*Config) SetDefaults

func (c *Config) SetDefaults()

type Cors

type Cors struct {
	// Normalized list of plain allowed origins
	AllowedOrigins []string `yaml:"allowed_origins"`
	// Normalized list of allowed headers
	AllowedHeaders []string `yaml:"allowed_headers"`
	// Normalized list of allowed methods
	AllowedMethods []string `yaml:"allowed_methods"`
	// Normalized list of exposed headers
	ExposedHeaders []string `yaml:"exposed_headers"`
}

type Logging

type Logging struct {
	Debug    bool `yaml:"debug"`
	Payloads bool `yaml:"payloads"`
}

type Provider

type Provider struct {
	Name   string            `yaml:"name"`
	Config map[string]string `yaml:"config"`
}

type TLS

type TLS struct {
	Cert string `yaml:"cert_file"`
	Key  string `yaml:"key_file"`
}

Jump to

Keyboard shortcuts

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