config

package
v3.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: Apache-2.0 Imports: 1 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRestConsumerServiceConfigMap

func GetRestConsumerServiceConfigMap() map[string]*RestServiceConfig

nolint

func GetRestProviderServiceConfigMap

func GetRestProviderServiceConfigMap() map[string]*RestServiceConfig

nolint

func SetRestConsumerServiceConfigMap

func SetRestConsumerServiceConfigMap(configMap map[string]*RestServiceConfig)

nolint

func SetRestProviderServiceConfigMap

func SetRestProviderServiceConfigMap(configMap map[string]*RestServiceConfig)

nolint

Types

type RestConsumerConfig

type RestConsumerConfig struct {
	Client                string                        `default:"resty" yaml:"rest_client" json:"rest_client,omitempty" property:"rest_client"`
	Produces              string                        `default:"application/json" yaml:"rest_produces"  json:"rest_produces,omitempty" property:"rest_produces"`
	Consumes              string                        `default:"application/json" yaml:"rest_consumes"  json:"rest_consumes,omitempty" property:"rest_consumes"`
	RestServiceConfigsMap map[string]*RestServiceConfig `yaml:"references" json:"references,omitempty" property:"references"`
}

nolint

func (*RestConsumerConfig) UnmarshalYAML

func (c *RestConsumerConfig) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML unmarshals the RestConsumerConfig by @unmarshal function

type RestMethodConfig

type RestMethodConfig struct {
	InterfaceName  string
	MethodName     string `required:"true" yaml:"name"  json:"name,omitempty" property:"name"`
	URL            string `yaml:"url"  json:"url,omitempty" property:"url"`
	Path           string `yaml:"rest_path"  json:"rest_path,omitempty" property:"rest_path"`
	Produces       string `yaml:"rest_produces"  json:"rest_produces,omitempty" property:"rest_produces"`
	Consumes       string `yaml:"rest_consumes"  json:"rest_consumes,omitempty" property:"rest_consumes"`
	MethodType     string `yaml:"rest_method"  json:"rest_method,omitempty" property:"rest_method"`
	PathParams     string `yaml:"rest_path_params"  json:"rest_path_params,omitempty" property:"rest_path_params"`
	PathParamsMap  map[int]string
	QueryParams    string `yaml:"rest_query_params"  json:"rest_query_params,omitempty" property:"rest_query_params"`
	QueryParamsMap map[int]string
	Body           int    `default:"-1" yaml:"rest_body"  json:"rest_body,omitempty" property:"rest_body"`
	Headers        string `yaml:"rest_headers"  json:"rest_headers,omitempty" property:"rest_headers"`
	HeadersMap     map[int]string
}

nolint

func (*RestMethodConfig) UnmarshalYAML

func (c *RestMethodConfig) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML unmarshals the RestMethodConfig by @unmarshal function

type RestProviderConfig

type RestProviderConfig struct {
	Server                string                        `default:"go-restful" yaml:"rest_server" json:"rest_server,omitempty" property:"rest_server"`
	Produces              string                        `default:"*/*" yaml:"rest_produces"  json:"rest_produces,omitempty" property:"rest_produces"`
	Consumes              string                        `default:"*/*" yaml:"rest_consumes"  json:"rest_consumes,omitempty" property:"rest_consumes"`
	RestServiceConfigsMap map[string]*RestServiceConfig `yaml:"services" json:"services,omitempty" property:"services"`
}

nolint

func (*RestProviderConfig) UnmarshalYAML

func (c *RestProviderConfig) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML unmarshals the RestProviderConfig by @unmarshal function

type RestServiceConfig

type RestServiceConfig struct {
	InterfaceName        string              `required:"true"  yaml:"interface"  json:"interface,omitempty" property:"interface"`
	URL                  string              `yaml:"url"  json:"url,omitempty" property:"url"`
	Path                 string              `yaml:"rest_path"  json:"rest_path,omitempty" property:"rest_path"`
	Produces             string              `yaml:"rest_produces"  json:"rest_produces,omitempty" property:"rest_produces"`
	Consumes             string              `yaml:"rest_consumes"  json:"rest_consumes,omitempty" property:"rest_consumes"`
	MethodType           string              `yaml:"rest_method"  json:"rest_method,omitempty" property:"rest_method"`
	Client               string              `yaml:"rest_client" json:"rest_client,omitempty" property:"rest_client"`
	Server               string              `yaml:"rest_server" json:"rest_server,omitempty" property:"rest_server"`
	RestMethodConfigs    []*RestMethodConfig `yaml:"methods" json:"methods,omitempty" property:"methods"`
	RestMethodConfigsMap map[string]*RestMethodConfig
}

nolint

func GetRestConsumerServiceConfig

func GetRestConsumerServiceConfig(id string) *RestServiceConfig

nolint

func GetRestProviderServiceConfig

func GetRestProviderServiceConfig(id string) *RestServiceConfig

nolint

func (*RestServiceConfig) UnmarshalYAML

func (c *RestServiceConfig) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML unmarshals the RestServiceConfig by @unmarshal function

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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