config

package
v0.0.0-...-d46a54d Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockConf

type MockConf struct {
	Enabled             bool                 `mapstructure:"enabled"`
	Address             string               `mapstructure:"address"`
	ContextPath         string               `mapstructure:"context_path"`
	TLS                 common.ServerTLSConf `mapstructure:"tls"`
	ReadTimeoutSeconds  int                  `mapstructure:"read_timeout_seconds"`
	WriteTimeoutSeconds int                  `mapstructure:"write_timeout_seconds"`
	Debug               bool                 `mapstructure:"is_debug"`
	DebugPath           string               `mapstructure:"debug_path"`
	Rules               RuleConfigs          `mapstructure:"rules"`
	WebAssetsDirectory  string               `mapstructure:"web_assets_directory"`
	Storage             StorageConf          `mapstructure:"storage"`
}

MockConf describes X-road mock server configuration

type RuleConf

type RuleConf struct {
	Service        string   `mapstructure:"service"`
	Priority       int64    `mapstructure:"priority"`
	MatcherRegex   []string `mapstructure:"matcher_regexes"`
	IdentityRegex  string   `mapstructure:"identity_regex"`
	TemplateFile   string   `mapstructure:"template_file"`
	Timeout        string   `mapstructure:"timeout_duration"`
	ResponseStatus int      `mapstructure:"response_status"`
	IsReadOnly     *bool    `mapstructure:"read_only"`
}

RuleConf describes configuration for rules how to mock requests

type RuleConfigs

type RuleConfigs []RuleConf

RuleConfigs is collection type for RuleConf structure

type StorageConf

type StorageConf struct {
	Size int `mapstructure:"size"`
}

StorageConf describes rules storage configuration

Jump to

Keyboard shortcuts

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