config

package
v3.0.28 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2022 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 Aggregate

type Aggregate struct {
	Method  *option.NamedType
	Params  option.SliceStringValue `swipe:"option"`
	Results option.SliceStringValue `swipe:"option"`
}

type ClientsEnable

type ClientsEnable struct {
	Langs Langs
}

type Config

type Config struct {
	HTTPServer           *struct{}
	HTTPFast             *struct{}
	ClientsEnable        ClientsEnable
	ClientOutput         option.StringValue
	CURLEnable           *struct{}
	CURLOutput           option.StringValue
	CURLURL              option.StringValue
	JSONRPCEnable        *struct{}
	JSONRPCPath          option.StringValue
	JSONRPCDocEnable     *struct{}
	JSONRPCDocOutput     option.StringValue
	Interfaces           []*Interface `mapstructure:"Interface"`
	OpenapiEnable        *struct{}
	OpenapiTags          []OpenapiTag
	OpenapiOutput        option.StringValue
	OpenapiInfo          OpenapiInfo
	OpenapiContact       OpenapiContact
	OpenapiLicence       OpenapiLicence
	OpenapiServers       []OpenapiServer `mapstructure:"OpenapiServer"`
	MethodOptions        []MethodOption
	MethodDefaultOptions MethodOptions
	InstrumentingLabels  []InstrumentingLabel `swipe:"option"`

	// non options params
	LoggingEnable       bool                          `mapstructure:"-"`
	InstrumentingEnable bool                          `mapstructure:"-"`
	MethodOptionsMap    map[string]MethodOptions      `mapstructure:"-"`
	OpenapiMethodTags   map[string][]string           `mapstructure:"-"`
	IfaceErrors         map[string]map[string][]Error `mapstructure:"-"`
	JSPkgImportPath     string                        `mapstructure:"-"`
	AppName             string                        `mapstructure:"-"`
	HasExternal         bool                          `mapstructure:"-"`
}

Config @swipe:"Gokit"

func (*Config) Options

func (*Config) Options() []byte

type Error

type Error struct {
	PkgName string
	PkgPath string
	Name    string
	Code    int64
	ErrCode string
}

type ExternalInterface

type ExternalInterface struct {
	Iface  *Interface
	Config *Config
	Build  *option.Inject
}

type InstrumentingLabel

type InstrumentingLabel struct {
	Key  interface{}
	Name string
}

type Interface

type Interface struct {
	Named      *option.NamedType  `mapstructure:"iface"`
	Namespace  string             `mapstructure:"ns"`
	ClientName option.StringValue `swipe:"option"`
	Gateway    *struct{}          `swipe:"option"`
}

type Langs

type Langs []string

func (Langs) Contains

func (a Langs) Contains(v string) bool

type LoggingContext

type LoggingContext struct {
	Key  interface{}
	Name string
}

type LoggingParams

type LoggingParams struct {
	Includes []string
	Excludes []string
}

type MethodErrorDecode added in v3.0.26

type MethodErrorDecode struct {
	Fn *option.NamedType
}

type MethodOption

type MethodOption struct {
	Signature     *option.NamedType
	MethodOptions `mapstructure:",squash"`
}

type MethodOptions

type MethodOptions struct {
	Instrumenting          option.BoolValue        `swipe:"option"`
	Logging                option.BoolValue        `swipe:"option"`
	LoggingParams          LoggingParams           `swipe:"option"`
	LoggingContext         []LoggingContext        `swipe:"option"`
	RESTMethod             option.ExprStringValue  `swipe:"option"`
	RESTWrapResponse       option.StringValue      `swipe:"option"`
	RESTWrapRequest        option.StringValue      `swipe:"option"`
	RESTPath               option.ExprStringValue  `swipe:"option"`
	RESTMultipartMaxMemory option.Int64Value       `swipe:"option"`
	RESTHeaderVars         option.SliceStringValue `swipe:"option"`
	RESTQueryVars          option.SliceStringValue `swipe:"option"`
	RESTQueryValues        option.SliceStringValue `swipe:"option"`
	RESTPathVars           map[string]string       `swipe:"option"`
	RESTBodyType           option.StringValue      `swipe:"option"`
	ErrorDecode            MethodErrorDecode       `swipe:"option"`
}

type OpenapiContact

type OpenapiContact struct {
	Name  string
	Email string
	Url   string
}

type OpenapiInfo

type OpenapiInfo struct {
	Title       string
	Description string
	Version     interface{}
}

type OpenapiLicence

type OpenapiLicence struct {
	Name string
	Url  string
}

type OpenapiServer

type OpenapiServer struct {
	Description string
	Url         string
}

type OpenapiTag

type OpenapiTag struct {
	Methods []option.NamedType `mapstructure:"methods"`
	Tags    []string           `mapstructure:"tags"`
}

type RESTMultipart

type RESTMultipart struct {
	MaxMemory int64
}

Jump to

Keyboard shortcuts

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