go-control-plane: github.com/envoyproxy/go-control-plane/envoy/service/ratelimit/v2 Index | Files

package envoy_service_ratelimit_v2

import "github.com/envoyproxy/go-control-plane/envoy/service/ratelimit/v2"

Index

Package Files

rls.pb.go rls.pb.validate.go

Variables

var (
    RateLimitResponse_Code_name = map[int32]string{
        0:  "UNKNOWN",
        1:  "OK",
        2:  "OVER_LIMIT",
    }
    RateLimitResponse_Code_value = map[string]int32{
        "UNKNOWN":    0,
        "OK":         1,
        "OVER_LIMIT": 2,
    }
)

Enum value maps for RateLimitResponse_Code.

var (
    RateLimitResponse_RateLimit_Unit_name = map[int32]string{
        0:  "UNKNOWN",
        1:  "SECOND",
        2:  "MINUTE",
        3:  "HOUR",
        4:  "DAY",
    }
    RateLimitResponse_RateLimit_Unit_value = map[string]int32{
        "UNKNOWN": 0,
        "SECOND":  1,
        "MINUTE":  2,
        "HOUR":    3,
        "DAY":     4,
    }
)

Enum value maps for RateLimitResponse_RateLimit_Unit.

var File_envoy_service_ratelimit_v2_rls_proto protoreflect.FileDescriptor

func RegisterRateLimitServiceServer Uses

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

type RateLimitRequest Uses

type RateLimitRequest struct {
    Domain      string                           `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"`
    Descriptors []*ratelimit.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"`
    // contains filtered or unexported fields
}

func (*RateLimitRequest) Descriptor Uses

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

Deprecated: Use RateLimitRequest.ProtoReflect.Descriptor instead.

func (*RateLimitRequest) GetDescriptors Uses

func (x *RateLimitRequest) GetDescriptors() []*ratelimit.RateLimitDescriptor

func (*RateLimitRequest) GetDomain Uses

func (x *RateLimitRequest) GetDomain() string

func (*RateLimitRequest) GetHitsAddend Uses

func (x *RateLimitRequest) GetHitsAddend() uint32

func (*RateLimitRequest) ProtoMessage Uses

func (*RateLimitRequest) ProtoMessage()

func (*RateLimitRequest) ProtoReflect Uses

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

func (*RateLimitRequest) Reset Uses

func (x *RateLimitRequest) Reset()

func (*RateLimitRequest) String Uses

func (x *RateLimitRequest) String() string

func (*RateLimitRequest) Validate Uses

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.

type RateLimitRequestValidationError Uses

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 Uses

func (e RateLimitRequestValidationError) Cause() error

Cause function returns cause value.

func (RateLimitRequestValidationError) Error Uses

func (e RateLimitRequestValidationError) Error() string

Error satisfies the builtin error interface

func (RateLimitRequestValidationError) ErrorName Uses

func (e RateLimitRequestValidationError) ErrorName() string

ErrorName returns error name.

func (RateLimitRequestValidationError) Field Uses

func (e RateLimitRequestValidationError) Field() string

Field function returns field value.

func (RateLimitRequestValidationError) Key Uses

func (e RateLimitRequestValidationError) Key() bool

Key function returns key value.

func (RateLimitRequestValidationError) Reason Uses

func (e RateLimitRequestValidationError) Reason() string

Reason function returns reason value.

type RateLimitResponse Uses

type RateLimitResponse struct {
    OverallCode         RateLimitResponse_Code                `protobuf:"varint,1,opt,name=overall_code,json=overallCode,proto3,enum=envoy.service.ratelimit.v2.RateLimitResponse_Code" json:"overall_code,omitempty"`
    Statuses            []*RateLimitResponse_DescriptorStatus `protobuf:"bytes,2,rep,name=statuses,proto3" json:"statuses,omitempty"`
    Headers             []*core.HeaderValue                   `protobuf:"bytes,3,rep,name=headers,proto3" json:"headers,omitempty"`
    RequestHeadersToAdd []*core.HeaderValue                   `protobuf:"bytes,4,rep,name=request_headers_to_add,json=requestHeadersToAdd,proto3" json:"request_headers_to_add,omitempty"`
    // contains filtered or unexported fields
}

func (*RateLimitResponse) Descriptor Uses

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

Deprecated: Use RateLimitResponse.ProtoReflect.Descriptor instead.

func (*RateLimitResponse) GetHeaders Uses

func (x *RateLimitResponse) GetHeaders() []*core.HeaderValue

func (*RateLimitResponse) GetOverallCode Uses

func (x *RateLimitResponse) GetOverallCode() RateLimitResponse_Code

func (*RateLimitResponse) GetRequestHeadersToAdd Uses

func (x *RateLimitResponse) GetRequestHeadersToAdd() []*core.HeaderValue

func (*RateLimitResponse) GetStatuses Uses

func (x *RateLimitResponse) GetStatuses() []*RateLimitResponse_DescriptorStatus

func (*RateLimitResponse) ProtoMessage Uses

func (*RateLimitResponse) ProtoMessage()

func (*RateLimitResponse) ProtoReflect Uses

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

func (*RateLimitResponse) Reset Uses

func (x *RateLimitResponse) Reset()

func (*RateLimitResponse) String Uses

func (x *RateLimitResponse) String() string

func (*RateLimitResponse) Validate Uses

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.

type RateLimitResponseValidationError Uses

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 Uses

func (e RateLimitResponseValidationError) Cause() error

Cause function returns cause value.

func (RateLimitResponseValidationError) Error Uses

func (e RateLimitResponseValidationError) Error() string

Error satisfies the builtin error interface

func (RateLimitResponseValidationError) ErrorName Uses

func (e RateLimitResponseValidationError) ErrorName() string

ErrorName returns error name.

func (RateLimitResponseValidationError) Field Uses

func (e RateLimitResponseValidationError) Field() string

Field function returns field value.

func (RateLimitResponseValidationError) Key Uses

func (e RateLimitResponseValidationError) Key() bool

Key function returns key value.

func (RateLimitResponseValidationError) Reason Uses

func (e RateLimitResponseValidationError) Reason() string

Reason function returns reason value.

type RateLimitResponse_Code Uses

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

func (RateLimitResponse_Code) Descriptor Uses

func (RateLimitResponse_Code) Descriptor() protoreflect.EnumDescriptor

func (RateLimitResponse_Code) Enum Uses

func (x RateLimitResponse_Code) Enum() *RateLimitResponse_Code

func (RateLimitResponse_Code) EnumDescriptor Uses

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

Deprecated: Use RateLimitResponse_Code.Descriptor instead.

func (RateLimitResponse_Code) Number Uses

func (x RateLimitResponse_Code) Number() protoreflect.EnumNumber

func (RateLimitResponse_Code) String Uses

func (x RateLimitResponse_Code) String() string

func (RateLimitResponse_Code) Type Uses

func (RateLimitResponse_Code) Type() protoreflect.EnumType

type RateLimitResponse_DescriptorStatus Uses

type RateLimitResponse_DescriptorStatus struct {
    Code           RateLimitResponse_Code       `protobuf:"varint,1,opt,name=code,proto3,enum=envoy.service.ratelimit.v2.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"`
    // contains filtered or unexported fields
}

func (*RateLimitResponse_DescriptorStatus) Descriptor Uses

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

Deprecated: Use RateLimitResponse_DescriptorStatus.ProtoReflect.Descriptor instead.

func (*RateLimitResponse_DescriptorStatus) GetCode Uses

func (x *RateLimitResponse_DescriptorStatus) GetCode() RateLimitResponse_Code

func (*RateLimitResponse_DescriptorStatus) GetCurrentLimit Uses

func (x *RateLimitResponse_DescriptorStatus) GetCurrentLimit() *RateLimitResponse_RateLimit

func (*RateLimitResponse_DescriptorStatus) GetLimitRemaining Uses

func (x *RateLimitResponse_DescriptorStatus) GetLimitRemaining() uint32

func (*RateLimitResponse_DescriptorStatus) ProtoMessage Uses

func (*RateLimitResponse_DescriptorStatus) ProtoMessage()

func (*RateLimitResponse_DescriptorStatus) ProtoReflect Uses

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

func (*RateLimitResponse_DescriptorStatus) Reset Uses

func (x *RateLimitResponse_DescriptorStatus) Reset()

func (*RateLimitResponse_DescriptorStatus) String Uses

func (x *RateLimitResponse_DescriptorStatus) String() string

func (*RateLimitResponse_DescriptorStatus) Validate Uses

func (m *RateLimitResponse_DescriptorStatus) Validate() error

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.

type RateLimitResponse_DescriptorStatusValidationError Uses

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 Uses

func (e RateLimitResponse_DescriptorStatusValidationError) Cause() error

Cause function returns cause value.

func (RateLimitResponse_DescriptorStatusValidationError) Error Uses

func (e RateLimitResponse_DescriptorStatusValidationError) Error() string

Error satisfies the builtin error interface

func (RateLimitResponse_DescriptorStatusValidationError) ErrorName Uses

func (e RateLimitResponse_DescriptorStatusValidationError) ErrorName() string

ErrorName returns error name.

func (RateLimitResponse_DescriptorStatusValidationError) Field Uses

func (e RateLimitResponse_DescriptorStatusValidationError) Field() string

Field function returns field value.

func (RateLimitResponse_DescriptorStatusValidationError) Key Uses

func (e RateLimitResponse_DescriptorStatusValidationError) Key() bool

Key function returns key value.

func (RateLimitResponse_DescriptorStatusValidationError) Reason Uses

func (e RateLimitResponse_DescriptorStatusValidationError) Reason() string

Reason function returns reason value.

type RateLimitResponse_RateLimit Uses

type RateLimitResponse_RateLimit struct {
    Name            string                           `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
    RequestsPerUnit uint32                           `protobuf:"varint,1,opt,name=requests_per_unit,json=requestsPerUnit,proto3" json:"requests_per_unit,omitempty"`
    Unit            RateLimitResponse_RateLimit_Unit `protobuf:"varint,2,opt,name=unit,proto3,enum=envoy.service.ratelimit.v2.RateLimitResponse_RateLimit_Unit" json:"unit,omitempty"`
    // contains filtered or unexported fields
}

func (*RateLimitResponse_RateLimit) Descriptor Uses

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

Deprecated: Use RateLimitResponse_RateLimit.ProtoReflect.Descriptor instead.

func (*RateLimitResponse_RateLimit) GetName Uses

func (x *RateLimitResponse_RateLimit) GetName() string

func (*RateLimitResponse_RateLimit) GetRequestsPerUnit Uses

func (x *RateLimitResponse_RateLimit) GetRequestsPerUnit() uint32

func (*RateLimitResponse_RateLimit) GetUnit Uses

func (x *RateLimitResponse_RateLimit) GetUnit() RateLimitResponse_RateLimit_Unit

func (*RateLimitResponse_RateLimit) ProtoMessage Uses

func (*RateLimitResponse_RateLimit) ProtoMessage()

func (*RateLimitResponse_RateLimit) ProtoReflect Uses

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

func (*RateLimitResponse_RateLimit) Reset Uses

func (x *RateLimitResponse_RateLimit) Reset()

func (*RateLimitResponse_RateLimit) String Uses

func (x *RateLimitResponse_RateLimit) String() string

func (*RateLimitResponse_RateLimit) Validate Uses

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.

type RateLimitResponse_RateLimitValidationError Uses

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 Uses

func (e RateLimitResponse_RateLimitValidationError) Cause() error

Cause function returns cause value.

func (RateLimitResponse_RateLimitValidationError) Error Uses

func (e RateLimitResponse_RateLimitValidationError) Error() string

Error satisfies the builtin error interface

func (RateLimitResponse_RateLimitValidationError) ErrorName Uses

func (e RateLimitResponse_RateLimitValidationError) ErrorName() string

ErrorName returns error name.

func (RateLimitResponse_RateLimitValidationError) Field Uses

func (e RateLimitResponse_RateLimitValidationError) Field() string

Field function returns field value.

func (RateLimitResponse_RateLimitValidationError) Key Uses

func (e RateLimitResponse_RateLimitValidationError) Key() bool

Key function returns key value.

func (RateLimitResponse_RateLimitValidationError) Reason Uses

func (e RateLimitResponse_RateLimitValidationError) Reason() string

Reason function returns reason value.

type RateLimitResponse_RateLimit_Unit Uses

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) Descriptor Uses

func (RateLimitResponse_RateLimit_Unit) Descriptor() protoreflect.EnumDescriptor

func (RateLimitResponse_RateLimit_Unit) Enum Uses

func (x RateLimitResponse_RateLimit_Unit) Enum() *RateLimitResponse_RateLimit_Unit

func (RateLimitResponse_RateLimit_Unit) EnumDescriptor Uses

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

Deprecated: Use RateLimitResponse_RateLimit_Unit.Descriptor instead.

func (RateLimitResponse_RateLimit_Unit) Number Uses

func (x RateLimitResponse_RateLimit_Unit) Number() protoreflect.EnumNumber

func (RateLimitResponse_RateLimit_Unit) String Uses

func (x RateLimitResponse_RateLimit_Unit) String() string

func (RateLimitResponse_RateLimit_Unit) Type Uses

func (RateLimitResponse_RateLimit_Unit) Type() protoreflect.EnumType

type RateLimitServiceClient Uses

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 Uses

func NewRateLimitServiceClient(cc grpc.ClientConnInterface) RateLimitServiceClient

type RateLimitServiceServer Uses

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

RateLimitServiceServer is the server API for RateLimitService service.

type UnimplementedRateLimitServiceServer Uses

type UnimplementedRateLimitServiceServer struct {
}

UnimplementedRateLimitServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedRateLimitServiceServer) ShouldRateLimit Uses

func (*UnimplementedRateLimitServiceServer) ShouldRateLimit(context.Context, *RateLimitRequest) (*RateLimitResponse, error)

Package envoy_service_ratelimit_v2 imports 24 packages (graph) and is imported by 13 packages. Updated 2020-07-26. Refresh now. Tools for package owners.