envoy_service_ratelimit_v3

package
v0.9.4 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2020 License: Apache-2.0 Imports: 21 Imported by: 25

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RateLimitResponse_Code_name = map[int32]string{
	0: "UNKNOWN",
	1: "OK",
	2: "OVER_LIMIT",
}
View Source
var RateLimitResponse_Code_value = map[string]int32{
	"UNKNOWN":    0,
	"OK":         1,
	"OVER_LIMIT": 2,
}
View Source
var RateLimitResponse_RateLimit_Unit_name = map[int32]string{
	0: "UNKNOWN",
	1: "SECOND",
	2: "MINUTE",
	3: "HOUR",
	4: "DAY",
}
View Source
var RateLimitResponse_RateLimit_Unit_value = map[string]int32{
	"UNKNOWN": 0,
	"SECOND":  1,
	"MINUTE":  2,
	"HOUR":    3,
	"DAY":     4,
}

Functions

func RegisterRateLimitServiceServer

func RegisterRateLimitServiceServer(s *grpc.Server, srv RateLimitServiceServer)

Types

type RateLimitRequest

type RateLimitRequest struct {
	Domain               string                    `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"`
	Descriptors          []*v3.RateLimitDescriptor `protobuf:"bytes,2,rep,name=descriptors,proto3" json:"descriptors,omitempty"`
	HitsAddend           uint32                    `protobuf:"varint,3,opt,name=hits_addend,json=hitsAddend,proto3" json:"hits_addend,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                  `json:"-"`
	XXX_unrecognized     []byte                    `json:"-"`
	XXX_sizecache        int32                     `json:"-"`
}

func (*RateLimitRequest) Descriptor

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

func (*RateLimitRequest) GetDescriptors

func (m *RateLimitRequest) GetDescriptors() []*v3.RateLimitDescriptor

func (*RateLimitRequest) GetDomain

func (m *RateLimitRequest) GetDomain() string

func (*RateLimitRequest) GetHitsAddend

func (m *RateLimitRequest) GetHitsAddend() uint32

func (*RateLimitRequest) ProtoMessage

func (*RateLimitRequest) ProtoMessage()

func (*RateLimitRequest) Reset

func (m *RateLimitRequest) Reset()

func (*RateLimitRequest) String

func (m *RateLimitRequest) String() string

func (*RateLimitRequest) Validate

func (m *RateLimitRequest) Validate() error

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

func (*RateLimitRequest) XXX_DiscardUnknown

func (m *RateLimitRequest) XXX_DiscardUnknown()

func (*RateLimitRequest) XXX_Marshal

func (m *RateLimitRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RateLimitRequest) XXX_Merge

func (m *RateLimitRequest) XXX_Merge(src proto.Message)

func (*RateLimitRequest) XXX_Size

func (m *RateLimitRequest) XXX_Size() int

func (*RateLimitRequest) XXX_Unmarshal

func (m *RateLimitRequest) XXX_Unmarshal(b []byte) error

type RateLimitRequestValidationError

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

RateLimitRequestValidationError is the validation error returned by RateLimitRequest.Validate if the designated constraints aren't met.

func (RateLimitRequestValidationError) Cause

Cause function returns cause value.

func (RateLimitRequestValidationError) Error

Error satisfies the builtin error interface

func (RateLimitRequestValidationError) ErrorName

ErrorName returns error name.

func (RateLimitRequestValidationError) Field

Field function returns field value.

func (RateLimitRequestValidationError) Key

Key function returns key value.

func (RateLimitRequestValidationError) Reason

Reason function returns reason value.

type RateLimitResponse

type RateLimitResponse struct {
	OverallCode          RateLimitResponse_Code                `` /* 150-byte string literal not displayed */
	Statuses             []*RateLimitResponse_DescriptorStatus `protobuf:"bytes,2,rep,name=statuses,proto3" json:"statuses,omitempty"`
	ResponseHeadersToAdd []*v31.HeaderValue                    `protobuf:"bytes,3,rep,name=response_headers_to_add,json=responseHeadersToAdd,proto3" json:"response_headers_to_add,omitempty"`
	RequestHeadersToAdd  []*v31.HeaderValue                    `protobuf:"bytes,4,rep,name=request_headers_to_add,json=requestHeadersToAdd,proto3" json:"request_headers_to_add,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                              `json:"-"`
	XXX_unrecognized     []byte                                `json:"-"`
	XXX_sizecache        int32                                 `json:"-"`
}

func (*RateLimitResponse) Descriptor

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

func (*RateLimitResponse) GetOverallCode

func (m *RateLimitResponse) GetOverallCode() RateLimitResponse_Code

func (*RateLimitResponse) GetRequestHeadersToAdd

func (m *RateLimitResponse) GetRequestHeadersToAdd() []*v31.HeaderValue

func (*RateLimitResponse) GetResponseHeadersToAdd

func (m *RateLimitResponse) GetResponseHeadersToAdd() []*v31.HeaderValue

func (*RateLimitResponse) GetStatuses

func (*RateLimitResponse) ProtoMessage

func (*RateLimitResponse) ProtoMessage()

func (*RateLimitResponse) Reset

func (m *RateLimitResponse) Reset()

func (*RateLimitResponse) String

func (m *RateLimitResponse) String() string

func (*RateLimitResponse) Validate

func (m *RateLimitResponse) Validate() error

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

func (*RateLimitResponse) XXX_DiscardUnknown

func (m *RateLimitResponse) XXX_DiscardUnknown()

func (*RateLimitResponse) XXX_Marshal

func (m *RateLimitResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RateLimitResponse) XXX_Merge

func (m *RateLimitResponse) XXX_Merge(src proto.Message)

func (*RateLimitResponse) XXX_Size

func (m *RateLimitResponse) XXX_Size() int

func (*RateLimitResponse) XXX_Unmarshal

func (m *RateLimitResponse) XXX_Unmarshal(b []byte) error

type RateLimitResponseValidationError

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

RateLimitResponseValidationError is the validation error returned by RateLimitResponse.Validate if the designated constraints aren't met.

func (RateLimitResponseValidationError) Cause

Cause function returns cause value.

func (RateLimitResponseValidationError) Error

Error satisfies the builtin error interface

func (RateLimitResponseValidationError) ErrorName

ErrorName returns error name.

func (RateLimitResponseValidationError) Field

Field function returns field value.

func (RateLimitResponseValidationError) Key

Key function returns key value.

func (RateLimitResponseValidationError) Reason

Reason function returns reason value.

type RateLimitResponse_Code

type RateLimitResponse_Code int32
const (
	RateLimitResponse_UNKNOWN    RateLimitResponse_Code = 0
	RateLimitResponse_OK         RateLimitResponse_Code = 1
	RateLimitResponse_OVER_LIMIT RateLimitResponse_Code = 2
)

func (RateLimitResponse_Code) EnumDescriptor

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

func (RateLimitResponse_Code) String

func (x RateLimitResponse_Code) String() string

type RateLimitResponse_DescriptorStatus

type RateLimitResponse_DescriptorStatus struct {
	Code                 RateLimitResponse_Code       `protobuf:"varint,1,opt,name=code,proto3,enum=envoy.service.ratelimit.v3.RateLimitResponse_Code" json:"code,omitempty"`
	CurrentLimit         *RateLimitResponse_RateLimit `protobuf:"bytes,2,opt,name=current_limit,json=currentLimit,proto3" json:"current_limit,omitempty"`
	LimitRemaining       uint32                       `protobuf:"varint,3,opt,name=limit_remaining,json=limitRemaining,proto3" json:"limit_remaining,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                     `json:"-"`
	XXX_unrecognized     []byte                       `json:"-"`
	XXX_sizecache        int32                        `json:"-"`
}

func (*RateLimitResponse_DescriptorStatus) Descriptor

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

func (*RateLimitResponse_DescriptorStatus) GetCode

func (*RateLimitResponse_DescriptorStatus) GetCurrentLimit

func (*RateLimitResponse_DescriptorStatus) GetLimitRemaining

func (m *RateLimitResponse_DescriptorStatus) GetLimitRemaining() uint32

func (*RateLimitResponse_DescriptorStatus) ProtoMessage

func (*RateLimitResponse_DescriptorStatus) ProtoMessage()

func (*RateLimitResponse_DescriptorStatus) Reset

func (*RateLimitResponse_DescriptorStatus) String

func (*RateLimitResponse_DescriptorStatus) Validate

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

func (*RateLimitResponse_DescriptorStatus) XXX_DiscardUnknown

func (m *RateLimitResponse_DescriptorStatus) XXX_DiscardUnknown()

func (*RateLimitResponse_DescriptorStatus) XXX_Marshal

func (m *RateLimitResponse_DescriptorStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RateLimitResponse_DescriptorStatus) XXX_Merge

func (*RateLimitResponse_DescriptorStatus) XXX_Size

func (*RateLimitResponse_DescriptorStatus) XXX_Unmarshal

func (m *RateLimitResponse_DescriptorStatus) XXX_Unmarshal(b []byte) error

type RateLimitResponse_DescriptorStatusValidationError

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

RateLimitResponse_DescriptorStatusValidationError is the validation error returned by RateLimitResponse_DescriptorStatus.Validate if the designated constraints aren't met.

func (RateLimitResponse_DescriptorStatusValidationError) Cause

Cause function returns cause value.

func (RateLimitResponse_DescriptorStatusValidationError) Error

Error satisfies the builtin error interface

func (RateLimitResponse_DescriptorStatusValidationError) ErrorName

ErrorName returns error name.

func (RateLimitResponse_DescriptorStatusValidationError) Field

Field function returns field value.

func (RateLimitResponse_DescriptorStatusValidationError) Key

Key function returns key value.

func (RateLimitResponse_DescriptorStatusValidationError) Reason

Reason function returns reason value.

type RateLimitResponse_RateLimit

type RateLimitResponse_RateLimit struct {
	RequestsPerUnit      uint32                           `protobuf:"varint,1,opt,name=requests_per_unit,json=requestsPerUnit,proto3" json:"requests_per_unit,omitempty"`
	Unit                 RateLimitResponse_RateLimit_Unit `` /* 127-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}                         `json:"-"`
	XXX_unrecognized     []byte                           `json:"-"`
	XXX_sizecache        int32                            `json:"-"`
}

func (*RateLimitResponse_RateLimit) Descriptor

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

func (*RateLimitResponse_RateLimit) GetRequestsPerUnit

func (m *RateLimitResponse_RateLimit) GetRequestsPerUnit() uint32

func (*RateLimitResponse_RateLimit) GetUnit

func (*RateLimitResponse_RateLimit) ProtoMessage

func (*RateLimitResponse_RateLimit) ProtoMessage()

func (*RateLimitResponse_RateLimit) Reset

func (m *RateLimitResponse_RateLimit) Reset()

func (*RateLimitResponse_RateLimit) String

func (m *RateLimitResponse_RateLimit) String() string

func (*RateLimitResponse_RateLimit) Validate

func (m *RateLimitResponse_RateLimit) Validate() error

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

func (*RateLimitResponse_RateLimit) XXX_DiscardUnknown

func (m *RateLimitResponse_RateLimit) XXX_DiscardUnknown()

func (*RateLimitResponse_RateLimit) XXX_Marshal

func (m *RateLimitResponse_RateLimit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RateLimitResponse_RateLimit) XXX_Merge

func (m *RateLimitResponse_RateLimit) XXX_Merge(src proto.Message)

func (*RateLimitResponse_RateLimit) XXX_Size

func (m *RateLimitResponse_RateLimit) XXX_Size() int

func (*RateLimitResponse_RateLimit) XXX_Unmarshal

func (m *RateLimitResponse_RateLimit) XXX_Unmarshal(b []byte) error

type RateLimitResponse_RateLimitValidationError

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

RateLimitResponse_RateLimitValidationError is the validation error returned by RateLimitResponse_RateLimit.Validate if the designated constraints aren't met.

func (RateLimitResponse_RateLimitValidationError) Cause

Cause function returns cause value.

func (RateLimitResponse_RateLimitValidationError) Error

Error satisfies the builtin error interface

func (RateLimitResponse_RateLimitValidationError) ErrorName

ErrorName returns error name.

func (RateLimitResponse_RateLimitValidationError) Field

Field function returns field value.

func (RateLimitResponse_RateLimitValidationError) Key

Key function returns key value.

func (RateLimitResponse_RateLimitValidationError) Reason

Reason function returns reason value.

type RateLimitResponse_RateLimit_Unit

type RateLimitResponse_RateLimit_Unit int32
const (
	RateLimitResponse_RateLimit_UNKNOWN RateLimitResponse_RateLimit_Unit = 0
	RateLimitResponse_RateLimit_SECOND  RateLimitResponse_RateLimit_Unit = 1
	RateLimitResponse_RateLimit_MINUTE  RateLimitResponse_RateLimit_Unit = 2
	RateLimitResponse_RateLimit_HOUR    RateLimitResponse_RateLimit_Unit = 3
	RateLimitResponse_RateLimit_DAY     RateLimitResponse_RateLimit_Unit = 4
)

func (RateLimitResponse_RateLimit_Unit) EnumDescriptor

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

func (RateLimitResponse_RateLimit_Unit) String

type RateLimitServiceClient

type RateLimitServiceClient interface {
	ShouldRateLimit(ctx context.Context, in *RateLimitRequest, opts ...grpc.CallOption) (*RateLimitResponse, error)
}

RateLimitServiceClient is the client API for RateLimitService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewRateLimitServiceClient

func NewRateLimitServiceClient(cc *grpc.ClientConn) RateLimitServiceClient

type RateLimitServiceServer

type RateLimitServiceServer interface {
	ShouldRateLimit(context.Context, *RateLimitRequest) (*RateLimitResponse, error)
}

RateLimitServiceServer is the server API for RateLimitService service.

type UnimplementedRateLimitServiceServer

type UnimplementedRateLimitServiceServer struct {
}

UnimplementedRateLimitServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedRateLimitServiceServer) ShouldRateLimit

Jump to

Keyboard shortcuts

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