models

package
v0.0.0-...-f63f0ea Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2022 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend struct {
	UrlPattern          string   `json:"url_pattern"`
	Encoding            string   `json:"encoding"`
	Method              string   `json:"method"`
	Host                []string `json:"host"`
	DisableHostSanitize bool     `json:"disable_host_sanitize"`
}

func NewBackend

func NewBackend(host string, endpoint string, method string, outputEncoding string) Backend

type Configuration

type Configuration struct {
	Schema         string                 `json:"$schema"`
	Version        string                 `json:"version"`
	Timeout        string                 `json:"timeout"`
	CacheTtl       string                 `json:"cache_ttl"`
	OutputEncoding string                 `json:"output_encoding"`
	Name           string                 `json:"name"`
	Endpoints      []Endpoint             `json:"endpoints"`
	ExtraConfig    map[string]interface{} `json:"extra_config,omitempty"`
}

func NewConfiguration

func NewConfiguration(outputEncoding string, timeout string) Configuration

func (*Configuration) InsertEndpoint

func (c *Configuration) InsertEndpoint(endpoint Endpoint)

type Cors

type Cors struct {
	AllowOrigins  []string `json:"allow_origins"`
	ExposeHeaders []string `json:"expose_headers"`
	MaxAge        string   `json:"max_age"`
	AllowMethods  []string `json:"allow_methods"`
	AllowHeaders  []string `json:"allow_headers"`
	Debug         bool     `json:"debug"`
}

func NewCors

func NewCors() Cors

type Endpoint

type Endpoint struct {
	Endpoint          string    `json:"endpoint"`
	Method            string    `json:"method"`
	OutputEncoding    string    `json:"output_encoding"`
	Timeout           string    `json:"timeout"`
	InputQueryStrings []string  `json:"input_query_strings"`
	Backend           []Backend `json:"backend"`
	InputHeaders      []string  `json:"input_headers"`
}

func NewEndpoint

func NewEndpoint(host string, endpoint string, backendEndpoint string, method string, outputEncoding string, timeout string) Endpoint

func (*Endpoint) InsertHeadersToPass

func (e *Endpoint) InsertHeadersToPass(header string)

func (*Endpoint) InsertQuerystringParams

func (e *Endpoint) InsertQuerystringParams(param string)

type Logging

type Logging struct {
	Level  string `json:"level"`
	Prefix string `json:"prefix"`
	Syslog bool   `json:"syslog"`
	Stdout bool   `json:"stdout"`
	Format string `json:"format"`
}

func NewLogging

func NewLogging() Logging

type Router

type Router struct {
	LoggerSkipPaths []string `json:"logger_skip_paths"`
}

Jump to

Keyboard shortcuts

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