pb

package
v0.0.0-...-732b845 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2022 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Logger_Level_name = map[int32]string{
		0: "UNSPECIFIED",
		1: "DEBUG",
		2: "INFO",
		3: "WARN",
		4: "ERROR",
		5: "PANIC",
		6: "FATAL",
	}
	Logger_Level_value = map[string]int32{
		"UNSPECIFIED": 0,
		"DEBUG":       1,
		"INFO":        2,
		"WARN":        3,
		"ERROR":       4,
		"PANIC":       5,
		"FATAL":       6,
	}
)

Enum value maps for Logger_Level.

View Source
var File_pb_config_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Config

type Config struct {
	Listener *Listener `protobuf:"bytes,1,opt,name=listener,proto3" json:"listener,omitempty"`
	Logger   *Logger   `protobuf:"bytes,2,opt,name=logger,proto3" json:"logger,omitempty"`
	// The list of routes that will be matched, in order, for incoming requests.
	// The first route that matches will be used.
	Routes []*Route `protobuf:"bytes,3,rep,name=routes,proto3" json:"routes,omitempty"`
	// contains filtered or unexported fields
}

func (*Config) Descriptor deprecated

func (*Config) Descriptor() ([]byte, []int)

Deprecated: Use Config.ProtoReflect.Descriptor instead.

func (*Config) GetListener

func (x *Config) GetListener() *Listener

func (*Config) GetLogger

func (x *Config) GetLogger() *Logger

func (*Config) GetRoutes

func (x *Config) GetRoutes() []*Route

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) ProtoReflect

func (x *Config) ProtoReflect() protoreflect.Message

func (*Config) Reset

func (x *Config) Reset()

func (*Config) String

func (x *Config) String() string

func (*Config) Validate

func (m *Config) Validate() error

Validate checks the field values on Config with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type ConfigValidationError

type ConfigValidationError struct {
	// contains filtered or unexported fields
}

ConfigValidationError is the validation error returned by Config.Validate if the designated constraints aren't met.

func (ConfigValidationError) Cause

func (e ConfigValidationError) Cause() error

Cause function returns cause value.

func (ConfigValidationError) Error

func (e ConfigValidationError) Error() string

Error satisfies the builtin error interface

func (ConfigValidationError) ErrorName

func (e ConfigValidationError) ErrorName() string

ErrorName returns error name.

func (ConfigValidationError) Field

func (e ConfigValidationError) Field() string

Field function returns field value.

func (ConfigValidationError) Key

func (e ConfigValidationError) Key() bool

Key function returns key value.

func (ConfigValidationError) Reason

func (e ConfigValidationError) Reason() string

Reason function returns reason value.

type HeaderMatcher

type HeaderMatcher struct {

	// Specifies the name of the header in the request.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Specifies how the header match will be performed to route the request.
	//
	// Types that are assignable to HeaderMatchSpecifier:
	//	*HeaderMatcher_ExactMatch
	HeaderMatchSpecifier isHeaderMatcher_HeaderMatchSpecifier `protobuf_oneof:"header_match_specifier"`
	// contains filtered or unexported fields
}

func (*HeaderMatcher) Descriptor deprecated

func (*HeaderMatcher) Descriptor() ([]byte, []int)

Deprecated: Use HeaderMatcher.ProtoReflect.Descriptor instead.

func (*HeaderMatcher) GetExactMatch

func (x *HeaderMatcher) GetExactMatch() string

func (*HeaderMatcher) GetHeaderMatchSpecifier

func (m *HeaderMatcher) GetHeaderMatchSpecifier() isHeaderMatcher_HeaderMatchSpecifier

func (*HeaderMatcher) GetName

func (x *HeaderMatcher) GetName() string

func (*HeaderMatcher) ProtoMessage

func (*HeaderMatcher) ProtoMessage()

func (*HeaderMatcher) ProtoReflect

func (x *HeaderMatcher) ProtoReflect() protoreflect.Message

func (*HeaderMatcher) Reset

func (x *HeaderMatcher) Reset()

func (*HeaderMatcher) String

func (x *HeaderMatcher) String() string

func (*HeaderMatcher) Validate

func (m *HeaderMatcher) Validate() error

Validate checks the field values on HeaderMatcher with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type HeaderMatcherValidationError

type HeaderMatcherValidationError struct {
	// contains filtered or unexported fields
}

HeaderMatcherValidationError is the validation error returned by HeaderMatcher.Validate if the designated constraints aren't met.

func (HeaderMatcherValidationError) Cause

Cause function returns cause value.

func (HeaderMatcherValidationError) Error

Error satisfies the builtin error interface

func (HeaderMatcherValidationError) ErrorName

func (e HeaderMatcherValidationError) ErrorName() string

ErrorName returns error name.

func (HeaderMatcherValidationError) Field

Field function returns field value.

func (HeaderMatcherValidationError) Key

Key function returns key value.

func (HeaderMatcherValidationError) Reason

Reason function returns reason value.

type HeaderMatcher_ExactMatch

type HeaderMatcher_ExactMatch struct {
	// If specified, header match will be performed based on the value of the header.
	ExactMatch string `protobuf:"bytes,4,opt,name=exact_match,json=exactMatch,proto3,oneof"`
}

type Listener

type Listener struct {

	// Types that are assignable to Socket:
	//	*Listener_Tcp
	//	*Listener_Unix
	Socket isListener_Socket `protobuf_oneof:"socket"`
	// contains filtered or unexported fields
}

func (*Listener) Descriptor deprecated

func (*Listener) Descriptor() ([]byte, []int)

Deprecated: Use Listener.ProtoReflect.Descriptor instead.

func (*Listener) GetSocket

func (m *Listener) GetSocket() isListener_Socket

func (*Listener) GetTcp

func (x *Listener) GetTcp() *TCPSocket

func (*Listener) GetUnix

func (x *Listener) GetUnix() *UnixSocket

func (*Listener) ProtoMessage

func (*Listener) ProtoMessage()

func (*Listener) ProtoReflect

func (x *Listener) ProtoReflect() protoreflect.Message

func (*Listener) Reset

func (x *Listener) Reset()

func (*Listener) String

func (x *Listener) String() string

func (*Listener) Validate

func (m *Listener) Validate() error

Validate checks the field values on Listener with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type ListenerValidationError

type ListenerValidationError struct {
	// contains filtered or unexported fields
}

ListenerValidationError is the validation error returned by Listener.Validate if the designated constraints aren't met.

func (ListenerValidationError) Cause

func (e ListenerValidationError) Cause() error

Cause function returns cause value.

func (ListenerValidationError) Error

func (e ListenerValidationError) Error() string

Error satisfies the builtin error interface

func (ListenerValidationError) ErrorName

func (e ListenerValidationError) ErrorName() string

ErrorName returns error name.

func (ListenerValidationError) Field

func (e ListenerValidationError) Field() string

Field function returns field value.

func (ListenerValidationError) Key

func (e ListenerValidationError) Key() bool

Key function returns key value.

func (ListenerValidationError) Reason

func (e ListenerValidationError) Reason() string

Reason function returns reason value.

type Listener_Tcp

type Listener_Tcp struct {
	Tcp *TCPSocket `protobuf:"bytes,1,opt,name=tcp,proto3,oneof"`
}

type Listener_Unix

type Listener_Unix struct {
	Unix *UnixSocket `protobuf:"bytes,2,opt,name=unix,proto3,oneof"`
}

type Logger

type Logger struct {
	Level Logger_Level `protobuf:"varint,1,opt,name=level,proto3,enum=pb.Logger_Level" json:"level,omitempty"`
	// Types that are assignable to Format:
	//	*Logger_Pretty
	Format isLogger_Format `protobuf_oneof:"format"`
	// contains filtered or unexported fields
}

func (*Logger) Descriptor deprecated

func (*Logger) Descriptor() ([]byte, []int)

Deprecated: Use Logger.ProtoReflect.Descriptor instead.

func (*Logger) GetFormat

func (m *Logger) GetFormat() isLogger_Format

func (*Logger) GetLevel

func (x *Logger) GetLevel() Logger_Level

func (*Logger) GetPretty

func (x *Logger) GetPretty() bool

func (*Logger) ProtoMessage

func (*Logger) ProtoMessage()

func (*Logger) ProtoReflect

func (x *Logger) ProtoReflect() protoreflect.Message

func (*Logger) Reset

func (x *Logger) Reset()

func (*Logger) String

func (x *Logger) String() string

func (*Logger) Validate

func (m *Logger) Validate() error

Validate checks the field values on Logger with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type LoggerValidationError

type LoggerValidationError struct {
	// contains filtered or unexported fields
}

LoggerValidationError is the validation error returned by Logger.Validate if the designated constraints aren't met.

func (LoggerValidationError) Cause

func (e LoggerValidationError) Cause() error

Cause function returns cause value.

func (LoggerValidationError) Error

func (e LoggerValidationError) Error() string

Error satisfies the builtin error interface

func (LoggerValidationError) ErrorName

func (e LoggerValidationError) ErrorName() string

ErrorName returns error name.

func (LoggerValidationError) Field

func (e LoggerValidationError) Field() string

Field function returns field value.

func (LoggerValidationError) Key

func (e LoggerValidationError) Key() bool

Key function returns key value.

func (LoggerValidationError) Reason

func (e LoggerValidationError) Reason() string

Reason function returns reason value.

type Logger_Level

type Logger_Level int32
const (
	Logger_UNSPECIFIED Logger_Level = 0
	Logger_DEBUG       Logger_Level = 1
	Logger_INFO        Logger_Level = 2
	Logger_WARN        Logger_Level = 3
	Logger_ERROR       Logger_Level = 4
	Logger_PANIC       Logger_Level = 5
	Logger_FATAL       Logger_Level = 6
)

func (Logger_Level) Descriptor

func (Logger_Level) Enum

func (x Logger_Level) Enum() *Logger_Level

func (Logger_Level) EnumDescriptor deprecated

func (Logger_Level) EnumDescriptor() ([]byte, []int)

Deprecated: Use Logger_Level.Descriptor instead.

func (Logger_Level) Number

func (Logger_Level) String

func (x Logger_Level) String() string

func (Logger_Level) Type

type Logger_Pretty

type Logger_Pretty struct {
	Pretty bool `protobuf:"varint,2,opt,name=pretty,proto3,oneof"`
}

type Route

type Route struct {

	// Route matching parameters.
	Match           *RouteMatch        `protobuf:"bytes,1,opt,name=match,proto3" json:"match,omitempty"`
	ResponseCode    int32              `protobuf:"varint,2,opt,name=response_code,json=responseCode,proto3" json:"response_code,omitempty"`
	ResponseHeaders map[string]string  `` /* 194-byte string literal not displayed */
	ResponseBody    string             `protobuf:"bytes,4,opt,name=response_body,json=responseBody,proto3" json:"response_body,omitempty"`
	Delay           *duration.Duration `protobuf:"bytes,5,opt,name=delay,proto3" json:"delay,omitempty"`
	// contains filtered or unexported fields
}

For my need first

func (*Route) Descriptor deprecated

func (*Route) Descriptor() ([]byte, []int)

Deprecated: Use Route.ProtoReflect.Descriptor instead.

func (*Route) GetDelay

func (x *Route) GetDelay() *duration.Duration

func (*Route) GetMatch

func (x *Route) GetMatch() *RouteMatch

func (*Route) GetResponseBody

func (x *Route) GetResponseBody() string

func (*Route) GetResponseCode

func (x *Route) GetResponseCode() int32

func (*Route) GetResponseHeaders

func (x *Route) GetResponseHeaders() map[string]string

func (*Route) ProtoMessage

func (*Route) ProtoMessage()

func (*Route) ProtoReflect

func (x *Route) ProtoReflect() protoreflect.Message

func (*Route) Reset

func (x *Route) Reset()

func (*Route) String

func (x *Route) String() string

func (*Route) Validate

func (m *Route) Validate() error

Validate checks the field values on Route with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type RouteMatch

type RouteMatch struct {

	// Types that are assignable to PathSpecifier:
	//	*RouteMatch_Prefix
	//	*RouteMatch_Path
	PathSpecifier isRouteMatch_PathSpecifier `protobuf_oneof:"path_specifier"`
	// Specifies a set of headers that the route should match on. The router will
	// check the request’s headers against all the specified headers in the route
	// config. A match will happen if all the headers in the route are present in
	// the request with the same values (or based on presence if the value field
	// is not in the config).
	Headers []*HeaderMatcher `protobuf:"bytes,6,rep,name=headers,proto3" json:"headers,omitempty"`
	// contains filtered or unexported fields
}

func (*RouteMatch) Descriptor deprecated

func (*RouteMatch) Descriptor() ([]byte, []int)

Deprecated: Use RouteMatch.ProtoReflect.Descriptor instead.

func (*RouteMatch) GetHeaders

func (x *RouteMatch) GetHeaders() []*HeaderMatcher

func (*RouteMatch) GetPath

func (x *RouteMatch) GetPath() string

func (*RouteMatch) GetPathSpecifier

func (m *RouteMatch) GetPathSpecifier() isRouteMatch_PathSpecifier

func (*RouteMatch) GetPrefix

func (x *RouteMatch) GetPrefix() string

func (*RouteMatch) ProtoMessage

func (*RouteMatch) ProtoMessage()

func (*RouteMatch) ProtoReflect

func (x *RouteMatch) ProtoReflect() protoreflect.Message

func (*RouteMatch) Reset

func (x *RouteMatch) Reset()

func (*RouteMatch) String

func (x *RouteMatch) String() string

func (*RouteMatch) Validate

func (m *RouteMatch) Validate() error

Validate checks the field values on RouteMatch with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type RouteMatchValidationError

type RouteMatchValidationError struct {
	// contains filtered or unexported fields
}

RouteMatchValidationError is the validation error returned by RouteMatch.Validate if the designated constraints aren't met.

func (RouteMatchValidationError) Cause

func (e RouteMatchValidationError) Cause() error

Cause function returns cause value.

func (RouteMatchValidationError) Error

Error satisfies the builtin error interface

func (RouteMatchValidationError) ErrorName

func (e RouteMatchValidationError) ErrorName() string

ErrorName returns error name.

func (RouteMatchValidationError) Field

Field function returns field value.

func (RouteMatchValidationError) Key

Key function returns key value.

func (RouteMatchValidationError) Reason

func (e RouteMatchValidationError) Reason() string

Reason function returns reason value.

type RouteMatch_Path

type RouteMatch_Path struct {
	// If specified, the route is an exact path rule meaning that the path must
	// exactly match the *:path* header once the query string is removed.
	Path string `protobuf:"bytes,2,opt,name=path,proto3,oneof"`
}

type RouteMatch_Prefix

type RouteMatch_Prefix struct {
	// If specified, the route is a prefix rule meaning that the prefix must
	// match the beginning of the *:path* header.
	Prefix string `protobuf:"bytes,1,opt,name=prefix,proto3,oneof"`
}

type RouteValidationError

type RouteValidationError struct {
	// contains filtered or unexported fields
}

RouteValidationError is the validation error returned by Route.Validate if the designated constraints aren't met.

func (RouteValidationError) Cause

func (e RouteValidationError) Cause() error

Cause function returns cause value.

func (RouteValidationError) Error

func (e RouteValidationError) Error() string

Error satisfies the builtin error interface

func (RouteValidationError) ErrorName

func (e RouteValidationError) ErrorName() string

ErrorName returns error name.

func (RouteValidationError) Field

func (e RouteValidationError) Field() string

Field function returns field value.

func (RouteValidationError) Key

func (e RouteValidationError) Key() bool

Key function returns key value.

func (RouteValidationError) Reason

func (e RouteValidationError) Reason() string

Reason function returns reason value.

type TCPSocket

type TCPSocket struct {
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	Port    uint32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"`
	Secure  bool   `protobuf:"varint,3,opt,name=secure,proto3" json:"secure,omitempty"`
	// contains filtered or unexported fields
}

func (*TCPSocket) Descriptor deprecated

func (*TCPSocket) Descriptor() ([]byte, []int)

Deprecated: Use TCPSocket.ProtoReflect.Descriptor instead.

func (*TCPSocket) GetAddress

func (x *TCPSocket) GetAddress() string

func (*TCPSocket) GetPort

func (x *TCPSocket) GetPort() uint32

func (*TCPSocket) GetSecure

func (x *TCPSocket) GetSecure() bool

func (*TCPSocket) ProtoMessage

func (*TCPSocket) ProtoMessage()

func (*TCPSocket) ProtoReflect

func (x *TCPSocket) ProtoReflect() protoreflect.Message

func (*TCPSocket) Reset

func (x *TCPSocket) Reset()

func (*TCPSocket) String

func (x *TCPSocket) String() string

func (*TCPSocket) Validate

func (m *TCPSocket) Validate() error

Validate checks the field values on TCPSocket with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type TCPSocketValidationError

type TCPSocketValidationError struct {
	// contains filtered or unexported fields
}

TCPSocketValidationError is the validation error returned by TCPSocket.Validate if the designated constraints aren't met.

func (TCPSocketValidationError) Cause

func (e TCPSocketValidationError) Cause() error

Cause function returns cause value.

func (TCPSocketValidationError) Error

func (e TCPSocketValidationError) Error() string

Error satisfies the builtin error interface

func (TCPSocketValidationError) ErrorName

func (e TCPSocketValidationError) ErrorName() string

ErrorName returns error name.

func (TCPSocketValidationError) Field

func (e TCPSocketValidationError) Field() string

Field function returns field value.

func (TCPSocketValidationError) Key

Key function returns key value.

func (TCPSocketValidationError) Reason

func (e TCPSocketValidationError) Reason() string

Reason function returns reason value.

type UnixSocket

type UnixSocket struct {
	Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
	// contains filtered or unexported fields
}

func (*UnixSocket) Descriptor deprecated

func (*UnixSocket) Descriptor() ([]byte, []int)

Deprecated: Use UnixSocket.ProtoReflect.Descriptor instead.

func (*UnixSocket) GetPath

func (x *UnixSocket) GetPath() string

func (*UnixSocket) ProtoMessage

func (*UnixSocket) ProtoMessage()

func (*UnixSocket) ProtoReflect

func (x *UnixSocket) ProtoReflect() protoreflect.Message

func (*UnixSocket) Reset

func (x *UnixSocket) Reset()

func (*UnixSocket) String

func (x *UnixSocket) String() string

func (*UnixSocket) Validate

func (m *UnixSocket) Validate() error

Validate checks the field values on UnixSocket with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type UnixSocketValidationError

type UnixSocketValidationError struct {
	// contains filtered or unexported fields
}

UnixSocketValidationError is the validation error returned by UnixSocket.Validate if the designated constraints aren't met.

func (UnixSocketValidationError) Cause

func (e UnixSocketValidationError) Cause() error

Cause function returns cause value.

func (UnixSocketValidationError) Error

Error satisfies the builtin error interface

func (UnixSocketValidationError) ErrorName

func (e UnixSocketValidationError) ErrorName() string

ErrorName returns error name.

func (UnixSocketValidationError) Field

Field function returns field value.

func (UnixSocketValidationError) Key

Key function returns key value.

func (UnixSocketValidationError) Reason

func (e UnixSocketValidationError) Reason() string

Reason function returns reason value.

Jump to

Keyboard shortcuts

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