shared

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2023 License: GPL-3.0 Imports: 2 Imported by: 5

Documentation

Index

Constants

View Source
const ConfigKey = "config"
View Source
const IndexFile = "index.html"
View Source
const UIAssetsLocation = "ui/dist/assets"
View Source
const UILocation = "ui/dist"
View Source
const WiretapPortPlaceholder = "%WIRETAP_PORT%"

Variables

This section is empty.

Functions

func MarshalError added in v0.0.8

func MarshalError(err *WiretapError) []byte

Types

type WiretapConfiguration

type WiretapConfiguration struct {
	Contract         string   `json:"-"`
	RedirectHost     string   `json:"redirectHost,omitempty"`
	RedirectPort     string   `json:"redirectPort,omitempty"`
	RedirectBasePath string   `json:"redirectBasePath,omitempty"`
	RedirectProtocol string   `json:"redirectProtocol,omitempty"`
	RedirectURL      string   `json:"redirectURL,omitempty"`
	Port             string   `json:"port,omitempty"`
	MonitorPort      string   `json:"monitorPort,omitempty"`
	WebSocketPort    string   `json:"webSocketPort,omitempty"`
	GlobalAPIDelay   int      `json:"globalAPIDelay,omitempty"`
	FS               embed.FS `json:"-"`
}

type WiretapError added in v0.0.8

type WiretapError struct {
	Type     string `json:"type,omitempty"`   // URI reference to the type of problem
	Title    string `json:"title"`            // A short description of the issue
	Status   int    `json:"status,omitempty"` // HTTP status code.
	Detail   string `json:"detail"`           // explanation of the issue in detail.
	Instance string `json:"instance"`         // URI to the specific problem.
}

WiretapError is an rfc7807 compliant error struct

func GenerateError added in v0.0.8

func GenerateError(title string,
	status int,
	detail string,
	instance string) *WiretapError

Jump to

Keyboard shortcuts

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