Documentation ¶
Index ¶
- Variables
- func RegisterRateLimiterServiceServer(s grpc.ServiceRegistrar, srv RateLimiterServiceServer)
- type DisabledLimiter
- func (*DisabledLimiter) Descriptor() ([]byte, []int)deprecated
- func (*DisabledLimiter) ProtoMessage()
- func (x *DisabledLimiter) ProtoReflect() protoreflect.Message
- func (x *DisabledLimiter) Reset()
- func (x *DisabledLimiter) String() string
- func (m *DisabledLimiter) Validate() error
- func (m *DisabledLimiter) ValidateAll() error
- type DisabledLimiterMultiError
- type DisabledLimiterValidationError
- func (e DisabledLimiterValidationError) Cause() error
- func (e DisabledLimiterValidationError) Error() string
- func (e DisabledLimiterValidationError) ErrorName() string
- func (e DisabledLimiterValidationError) Field() string
- func (e DisabledLimiterValidationError) Key() bool
- func (e DisabledLimiterValidationError) Reason() string
- type DoRequest
- func (*DoRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DoRequest) GetDescriptors() *RateLimitDescriptors
- func (x *DoRequest) GetRequestToken() string
- func (x *DoRequest) GetService() string
- func (*DoRequest) ProtoMessage()
- func (x *DoRequest) ProtoReflect() protoreflect.Message
- func (x *DoRequest) Reset()
- func (x *DoRequest) String() string
- func (m *DoRequest) Validate() error
- func (m *DoRequest) ValidateAll() error
- type DoRequestMultiError
- type DoRequestValidationError
- type DoResponse
- func (*DoResponse) Descriptor() ([]byte, []int)deprecated
- func (x *DoResponse) GetDescription() *RateLimitDescription
- func (x *DoResponse) GetRequestToken() string
- func (*DoResponse) ProtoMessage()
- func (x *DoResponse) ProtoReflect() protoreflect.Message
- func (x *DoResponse) Reset()
- func (x *DoResponse) String() string
- func (m *DoResponse) Validate() error
- func (m *DoResponse) ValidateAll() error
- type DoResponseMultiError
- type DoResponseValidationError
- type ExternalLimiter
- func (*ExternalLimiter) Descriptor() ([]byte, []int)deprecated
- func (x *ExternalLimiter) GetAddress() string
- func (x *ExternalLimiter) GetOptions() map[string]string
- func (*ExternalLimiter) ProtoMessage()
- func (x *ExternalLimiter) ProtoReflect() protoreflect.Message
- func (x *ExternalLimiter) Reset()
- func (x *ExternalLimiter) String() string
- func (m *ExternalLimiter) Validate() error
- func (m *ExternalLimiter) ValidateAll() error
- type ExternalLimiterMultiError
- type ExternalLimiterValidationError
- func (e ExternalLimiterValidationError) Cause() error
- func (e ExternalLimiterValidationError) Error() string
- func (e ExternalLimiterValidationError) ErrorName() string
- func (e ExternalLimiterValidationError) Field() string
- func (e ExternalLimiterValidationError) Key() bool
- func (e ExternalLimiterValidationError) Reason() string
- type FixedMemoryLimiter
- func (*FixedMemoryLimiter) Descriptor() ([]byte, []int)deprecated
- func (x *FixedMemoryLimiter) GetPeriod() *durationpb.Duration
- func (x *FixedMemoryLimiter) GetRate() int64
- func (*FixedMemoryLimiter) ProtoMessage()
- func (x *FixedMemoryLimiter) ProtoReflect() protoreflect.Message
- func (x *FixedMemoryLimiter) Reset()
- func (x *FixedMemoryLimiter) String() string
- func (m *FixedMemoryLimiter) Validate() error
- func (m *FixedMemoryLimiter) ValidateAll() error
- type FixedMemoryLimiterMultiError
- type FixedMemoryLimiterValidationError
- func (e FixedMemoryLimiterValidationError) Cause() error
- func (e FixedMemoryLimiterValidationError) Error() string
- func (e FixedMemoryLimiterValidationError) ErrorName() string
- func (e FixedMemoryLimiterValidationError) Field() string
- func (e FixedMemoryLimiterValidationError) Key() bool
- func (e FixedMemoryLimiterValidationError) Reason() string
- type RateLimitDescription
- func (*RateLimitDescription) Descriptor() ([]byte, []int)deprecated
- func (x *RateLimitDescription) GetCount() int64
- func (x *RateLimitDescription) GetLimit() int64
- func (x *RateLimitDescription) GetRemaining() int64
- func (x *RateLimitDescription) GetResetAt() *timestamppb.Timestamp
- func (x *RateLimitDescription) GetStatus() RateLimitDescription_Status
- func (*RateLimitDescription) ProtoMessage()
- func (x *RateLimitDescription) ProtoReflect() protoreflect.Message
- func (x *RateLimitDescription) Reset()
- func (x *RateLimitDescription) String() string
- func (m *RateLimitDescription) Validate() error
- func (m *RateLimitDescription) ValidateAll() error
- type RateLimitDescriptionMultiError
- type RateLimitDescriptionValidationError
- func (e RateLimitDescriptionValidationError) Cause() error
- func (e RateLimitDescriptionValidationError) Error() string
- func (e RateLimitDescriptionValidationError) ErrorName() string
- func (e RateLimitDescriptionValidationError) Field() string
- func (e RateLimitDescriptionValidationError) Key() bool
- func (e RateLimitDescriptionValidationError) Reason() string
- type RateLimitDescription_Status
- func (RateLimitDescription_Status) Descriptor() protoreflect.EnumDescriptor
- func (x RateLimitDescription_Status) Enum() *RateLimitDescription_Status
- func (RateLimitDescription_Status) EnumDescriptor() ([]byte, []int)deprecated
- func (x RateLimitDescription_Status) Number() protoreflect.EnumNumber
- func (x RateLimitDescription_Status) String() string
- func (RateLimitDescription_Status) Type() protoreflect.EnumType
- type RateLimitDescriptors
- func (*RateLimitDescriptors) Descriptor() ([]byte, []int)deprecated
- func (x *RateLimitDescriptors) GetEntries() []*RateLimitDescriptors_Entry
- func (*RateLimitDescriptors) ProtoMessage()
- func (x *RateLimitDescriptors) ProtoReflect() protoreflect.Message
- func (x *RateLimitDescriptors) Reset()
- func (x *RateLimitDescriptors) String() string
- func (m *RateLimitDescriptors) Validate() error
- func (m *RateLimitDescriptors) ValidateAll() error
- type RateLimitDescriptorsMultiError
- type RateLimitDescriptorsValidationError
- func (e RateLimitDescriptorsValidationError) Cause() error
- func (e RateLimitDescriptorsValidationError) Error() string
- func (e RateLimitDescriptorsValidationError) ErrorName() string
- func (e RateLimitDescriptorsValidationError) Field() string
- func (e RateLimitDescriptorsValidationError) Key() bool
- func (e RateLimitDescriptorsValidationError) Reason() string
- type RateLimitDescriptors_Entry
- func (*RateLimitDescriptors_Entry) Descriptor() ([]byte, []int)deprecated
- func (x *RateLimitDescriptors_Entry) GetKey() string
- func (x *RateLimitDescriptors_Entry) GetValue() string
- func (*RateLimitDescriptors_Entry) ProtoMessage()
- func (x *RateLimitDescriptors_Entry) ProtoReflect() protoreflect.Message
- func (x *RateLimitDescriptors_Entry) Reset()
- func (x *RateLimitDescriptors_Entry) String() string
- func (m *RateLimitDescriptors_Entry) Validate() error
- func (m *RateLimitDescriptors_Entry) ValidateAll() error
- type RateLimitDescriptors_EntryMultiError
- type RateLimitDescriptors_EntryValidationError
- func (e RateLimitDescriptors_EntryValidationError) Cause() error
- func (e RateLimitDescriptors_EntryValidationError) Error() string
- func (e RateLimitDescriptors_EntryValidationError) ErrorName() string
- func (e RateLimitDescriptors_EntryValidationError) Field() string
- func (e RateLimitDescriptors_EntryValidationError) Key() bool
- func (e RateLimitDescriptors_EntryValidationError) Reason() string
- type RateLimiterConfig
- func (*RateLimiterConfig) Descriptor() ([]byte, []int)deprecated
- func (x *RateLimiterConfig) GetDisabled() *DisabledLimiter
- func (x *RateLimiterConfig) GetExternal() *ExternalLimiter
- func (x *RateLimiterConfig) GetFixedMem() *FixedMemoryLimiter
- func (x *RateLimiterConfig) GetSlidingMem() *SlidingMemoryLimiter
- func (m *RateLimiterConfig) GetType() isRateLimiterConfig_Type
- func (*RateLimiterConfig) ProtoMessage()
- func (x *RateLimiterConfig) ProtoReflect() protoreflect.Message
- func (x *RateLimiterConfig) Reset()
- func (x *RateLimiterConfig) String() string
- func (m *RateLimiterConfig) Validate() error
- func (m *RateLimiterConfig) ValidateAll() error
- type RateLimiterConfigMultiError
- type RateLimiterConfigValidationError
- func (e RateLimiterConfigValidationError) Cause() error
- func (e RateLimiterConfigValidationError) Error() string
- func (e RateLimiterConfigValidationError) ErrorName() string
- func (e RateLimiterConfigValidationError) Field() string
- func (e RateLimiterConfigValidationError) Key() bool
- func (e RateLimiterConfigValidationError) Reason() string
- type RateLimiterConfig_Disabled
- type RateLimiterConfig_External
- type RateLimiterConfig_FixedMem
- type RateLimiterConfig_SlidingMem
- type RateLimiterServiceClient
- type RateLimiterServiceServer
- type ReportRequest
- func (*ReportRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ReportRequest) GetDescription() *RateLimitDescription
- func (x *ReportRequest) GetDescriptors() *RateLimitDescriptors
- func (x *ReportRequest) GetRequestToken() string
- func (x *ReportRequest) GetService() string
- func (*ReportRequest) ProtoMessage()
- func (x *ReportRequest) ProtoReflect() protoreflect.Message
- func (x *ReportRequest) Reset()
- func (x *ReportRequest) String() string
- func (m *ReportRequest) Validate() error
- func (m *ReportRequest) ValidateAll() error
- type ReportRequestMultiError
- type ReportRequestValidationError
- func (e ReportRequestValidationError) Cause() error
- func (e ReportRequestValidationError) Error() string
- func (e ReportRequestValidationError) ErrorName() string
- func (e ReportRequestValidationError) Field() string
- func (e ReportRequestValidationError) Key() bool
- func (e ReportRequestValidationError) Reason() string
- type ReportResponse
- func (*ReportResponse) Descriptor() ([]byte, []int)deprecated
- func (*ReportResponse) ProtoMessage()
- func (x *ReportResponse) ProtoReflect() protoreflect.Message
- func (x *ReportResponse) Reset()
- func (x *ReportResponse) String() string
- func (m *ReportResponse) Validate() error
- func (m *ReportResponse) ValidateAll() error
- type ReportResponseMultiError
- type ReportResponseValidationError
- func (e ReportResponseValidationError) Cause() error
- func (e ReportResponseValidationError) Error() string
- func (e ReportResponseValidationError) ErrorName() string
- func (e ReportResponseValidationError) Field() string
- func (e ReportResponseValidationError) Key() bool
- func (e ReportResponseValidationError) Reason() string
- type SlidingMemoryLimiter
- func (*SlidingMemoryLimiter) Descriptor() ([]byte, []int)deprecated
- func (x *SlidingMemoryLimiter) GetUsePercent() float64
- func (*SlidingMemoryLimiter) ProtoMessage()
- func (x *SlidingMemoryLimiter) ProtoReflect() protoreflect.Message
- func (x *SlidingMemoryLimiter) Reset()
- func (x *SlidingMemoryLimiter) String() string
- func (m *SlidingMemoryLimiter) Validate() error
- func (m *SlidingMemoryLimiter) ValidateAll() error
- type SlidingMemoryLimiterMultiError
- type SlidingMemoryLimiterValidationError
- func (e SlidingMemoryLimiterValidationError) Cause() error
- func (e SlidingMemoryLimiterValidationError) Error() string
- func (e SlidingMemoryLimiterValidationError) ErrorName() string
- func (e SlidingMemoryLimiterValidationError) Field() string
- func (e SlidingMemoryLimiterValidationError) Key() bool
- func (e SlidingMemoryLimiterValidationError) Reason() string
- type UnimplementedRateLimiterServiceServer
- type UnsafeRateLimiterServiceServer
Constants ¶
This section is empty.
Variables ¶
var ( RateLimitDescription_Status_name = map[int32]string{ 0: "STATUS_UNSPECIFIED", 1: "STATUS_OK", 2: "STATUS_OVERLIMIT", 3: "STATUS_ERROR", 4: "STATUS_EMPTY", } RateLimitDescription_Status_value = map[string]int32{ "STATUS_UNSPECIFIED": 0, "STATUS_OK": 1, "STATUS_OVERLIMIT": 2, "STATUS_ERROR": 3, "STATUS_EMPTY": 4, } )
Enum value maps for RateLimitDescription_Status.
var File_c1_ratelimit_v1_ratelimit_proto protoreflect.FileDescriptor
var RateLimiterService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "c1.ratelimit.v1.RateLimiterService", HandlerType: (*RateLimiterServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Do", Handler: _RateLimiterService_Do_Handler, }, { MethodName: "Report", Handler: _RateLimiterService_Report_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "c1/ratelimit/v1/ratelimit.proto", }
RateLimiterService_ServiceDesc is the grpc.ServiceDesc for RateLimiterService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterRateLimiterServiceServer ¶ added in v0.1.0
func RegisterRateLimiterServiceServer(s grpc.ServiceRegistrar, srv RateLimiterServiceServer)
Types ¶
type DisabledLimiter ¶
type DisabledLimiter struct {
// contains filtered or unexported fields
}
func (*DisabledLimiter) Descriptor
deprecated
func (*DisabledLimiter) Descriptor() ([]byte, []int)
Deprecated: Use DisabledLimiter.ProtoReflect.Descriptor instead.
func (*DisabledLimiter) ProtoMessage ¶
func (*DisabledLimiter) ProtoMessage()
func (*DisabledLimiter) ProtoReflect ¶
func (x *DisabledLimiter) ProtoReflect() protoreflect.Message
func (*DisabledLimiter) Reset ¶
func (x *DisabledLimiter) Reset()
func (*DisabledLimiter) String ¶
func (x *DisabledLimiter) String() string
func (*DisabledLimiter) Validate ¶
func (m *DisabledLimiter) Validate() error
Validate checks the field values on DisabledLimiter with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*DisabledLimiter) ValidateAll ¶
func (m *DisabledLimiter) ValidateAll() error
ValidateAll checks the field values on DisabledLimiter with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in DisabledLimiterMultiError, or nil if none found.
type DisabledLimiterMultiError ¶
type DisabledLimiterMultiError []error
DisabledLimiterMultiError is an error wrapping multiple validation errors returned by DisabledLimiter.ValidateAll() if the designated constraints aren't met.
func (DisabledLimiterMultiError) AllErrors ¶
func (m DisabledLimiterMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (DisabledLimiterMultiError) Error ¶
func (m DisabledLimiterMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type DisabledLimiterValidationError ¶
type DisabledLimiterValidationError struct {
// contains filtered or unexported fields
}
DisabledLimiterValidationError is the validation error returned by DisabledLimiter.Validate if the designated constraints aren't met.
func (DisabledLimiterValidationError) Cause ¶
func (e DisabledLimiterValidationError) Cause() error
Cause function returns cause value.
func (DisabledLimiterValidationError) Error ¶
func (e DisabledLimiterValidationError) Error() string
Error satisfies the builtin error interface
func (DisabledLimiterValidationError) ErrorName ¶
func (e DisabledLimiterValidationError) ErrorName() string
ErrorName returns error name.
func (DisabledLimiterValidationError) Field ¶
func (e DisabledLimiterValidationError) Field() string
Field function returns field value.
func (DisabledLimiterValidationError) Key ¶
func (e DisabledLimiterValidationError) Key() bool
Key function returns key value.
func (DisabledLimiterValidationError) Reason ¶
func (e DisabledLimiterValidationError) Reason() string
Reason function returns reason value.
type DoRequest ¶
type DoRequest struct { RequestToken string `protobuf:"bytes,1,opt,name=request_token,json=requestToken,proto3" json:"request_token,omitempty"` Service string `protobuf:"bytes,2,opt,name=service,proto3" json:"service,omitempty"` Descriptors *RateLimitDescriptors `protobuf:"bytes,3,opt,name=descriptors,proto3" json:"descriptors,omitempty"` // contains filtered or unexported fields }
func (*DoRequest) Descriptor
deprecated
func (*DoRequest) GetDescriptors ¶
func (x *DoRequest) GetDescriptors() *RateLimitDescriptors
func (*DoRequest) GetRequestToken ¶
func (*DoRequest) GetService ¶
func (*DoRequest) ProtoMessage ¶
func (*DoRequest) ProtoMessage()
func (*DoRequest) ProtoReflect ¶
func (x *DoRequest) ProtoReflect() protoreflect.Message
func (*DoRequest) Validate ¶
Validate checks the field values on DoRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*DoRequest) ValidateAll ¶
ValidateAll checks the field values on DoRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in DoRequestMultiError, or nil if none found.
type DoRequestMultiError ¶
type DoRequestMultiError []error
DoRequestMultiError is an error wrapping multiple validation errors returned by DoRequest.ValidateAll() if the designated constraints aren't met.
func (DoRequestMultiError) AllErrors ¶
func (m DoRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (DoRequestMultiError) Error ¶
func (m DoRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type DoRequestValidationError ¶
type DoRequestValidationError struct {
// contains filtered or unexported fields
}
DoRequestValidationError is the validation error returned by DoRequest.Validate if the designated constraints aren't met.
func (DoRequestValidationError) Cause ¶
func (e DoRequestValidationError) Cause() error
Cause function returns cause value.
func (DoRequestValidationError) Error ¶
func (e DoRequestValidationError) Error() string
Error satisfies the builtin error interface
func (DoRequestValidationError) ErrorName ¶
func (e DoRequestValidationError) ErrorName() string
ErrorName returns error name.
func (DoRequestValidationError) Field ¶
func (e DoRequestValidationError) Field() string
Field function returns field value.
func (DoRequestValidationError) Key ¶
func (e DoRequestValidationError) Key() bool
Key function returns key value.
func (DoRequestValidationError) Reason ¶
func (e DoRequestValidationError) Reason() string
Reason function returns reason value.
type DoResponse ¶
type DoResponse struct { RequestToken string `protobuf:"bytes,1,opt,name=request_token,json=requestToken,proto3" json:"request_token,omitempty"` Description *RateLimitDescription `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` // contains filtered or unexported fields }
func (*DoResponse) Descriptor
deprecated
func (*DoResponse) Descriptor() ([]byte, []int)
Deprecated: Use DoResponse.ProtoReflect.Descriptor instead.
func (*DoResponse) GetDescription ¶
func (x *DoResponse) GetDescription() *RateLimitDescription
func (*DoResponse) GetRequestToken ¶
func (x *DoResponse) GetRequestToken() string
func (*DoResponse) ProtoMessage ¶
func (*DoResponse) ProtoMessage()
func (*DoResponse) ProtoReflect ¶
func (x *DoResponse) ProtoReflect() protoreflect.Message
func (*DoResponse) Reset ¶
func (x *DoResponse) Reset()
func (*DoResponse) String ¶
func (x *DoResponse) String() string
func (*DoResponse) Validate ¶
func (m *DoResponse) Validate() error
Validate checks the field values on DoResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*DoResponse) ValidateAll ¶
func (m *DoResponse) ValidateAll() error
ValidateAll checks the field values on DoResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in DoResponseMultiError, or nil if none found.
type DoResponseMultiError ¶
type DoResponseMultiError []error
DoResponseMultiError is an error wrapping multiple validation errors returned by DoResponse.ValidateAll() if the designated constraints aren't met.
func (DoResponseMultiError) AllErrors ¶
func (m DoResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (DoResponseMultiError) Error ¶
func (m DoResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type DoResponseValidationError ¶
type DoResponseValidationError struct {
// contains filtered or unexported fields
}
DoResponseValidationError is the validation error returned by DoResponse.Validate if the designated constraints aren't met.
func (DoResponseValidationError) Cause ¶
func (e DoResponseValidationError) Cause() error
Cause function returns cause value.
func (DoResponseValidationError) Error ¶
func (e DoResponseValidationError) Error() string
Error satisfies the builtin error interface
func (DoResponseValidationError) ErrorName ¶
func (e DoResponseValidationError) ErrorName() string
ErrorName returns error name.
func (DoResponseValidationError) Field ¶
func (e DoResponseValidationError) Field() string
Field function returns field value.
func (DoResponseValidationError) Key ¶
func (e DoResponseValidationError) Key() bool
Key function returns key value.
func (DoResponseValidationError) Reason ¶
func (e DoResponseValidationError) Reason() string
Reason function returns reason value.
type ExternalLimiter ¶
type ExternalLimiter struct { Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` Options map[string]string `` /* 155-byte string literal not displayed */ // contains filtered or unexported fields }
func (*ExternalLimiter) Descriptor
deprecated
func (*ExternalLimiter) Descriptor() ([]byte, []int)
Deprecated: Use ExternalLimiter.ProtoReflect.Descriptor instead.
func (*ExternalLimiter) GetAddress ¶
func (x *ExternalLimiter) GetAddress() string
func (*ExternalLimiter) GetOptions ¶
func (x *ExternalLimiter) GetOptions() map[string]string
func (*ExternalLimiter) ProtoMessage ¶
func (*ExternalLimiter) ProtoMessage()
func (*ExternalLimiter) ProtoReflect ¶
func (x *ExternalLimiter) ProtoReflect() protoreflect.Message
func (*ExternalLimiter) Reset ¶
func (x *ExternalLimiter) Reset()
func (*ExternalLimiter) String ¶
func (x *ExternalLimiter) String() string
func (*ExternalLimiter) Validate ¶
func (m *ExternalLimiter) Validate() error
Validate checks the field values on ExternalLimiter with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*ExternalLimiter) ValidateAll ¶
func (m *ExternalLimiter) ValidateAll() error
ValidateAll checks the field values on ExternalLimiter with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ExternalLimiterMultiError, or nil if none found.
type ExternalLimiterMultiError ¶
type ExternalLimiterMultiError []error
ExternalLimiterMultiError is an error wrapping multiple validation errors returned by ExternalLimiter.ValidateAll() if the designated constraints aren't met.
func (ExternalLimiterMultiError) AllErrors ¶
func (m ExternalLimiterMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ExternalLimiterMultiError) Error ¶
func (m ExternalLimiterMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ExternalLimiterValidationError ¶
type ExternalLimiterValidationError struct {
// contains filtered or unexported fields
}
ExternalLimiterValidationError is the validation error returned by ExternalLimiter.Validate if the designated constraints aren't met.
func (ExternalLimiterValidationError) Cause ¶
func (e ExternalLimiterValidationError) Cause() error
Cause function returns cause value.
func (ExternalLimiterValidationError) Error ¶
func (e ExternalLimiterValidationError) Error() string
Error satisfies the builtin error interface
func (ExternalLimiterValidationError) ErrorName ¶
func (e ExternalLimiterValidationError) ErrorName() string
ErrorName returns error name.
func (ExternalLimiterValidationError) Field ¶
func (e ExternalLimiterValidationError) Field() string
Field function returns field value.
func (ExternalLimiterValidationError) Key ¶
func (e ExternalLimiterValidationError) Key() bool
Key function returns key value.
func (ExternalLimiterValidationError) Reason ¶
func (e ExternalLimiterValidationError) Reason() string
Reason function returns reason value.
type FixedMemoryLimiter ¶
type FixedMemoryLimiter struct { Rate int64 `protobuf:"varint,1,opt,name=rate,proto3" json:"rate,omitempty"` Period *durationpb.Duration `protobuf:"bytes,2,opt,name=period,proto3" json:"period,omitempty"` // contains filtered or unexported fields }
func (*FixedMemoryLimiter) Descriptor
deprecated
func (*FixedMemoryLimiter) Descriptor() ([]byte, []int)
Deprecated: Use FixedMemoryLimiter.ProtoReflect.Descriptor instead.
func (*FixedMemoryLimiter) GetPeriod ¶
func (x *FixedMemoryLimiter) GetPeriod() *durationpb.Duration
func (*FixedMemoryLimiter) GetRate ¶
func (x *FixedMemoryLimiter) GetRate() int64
func (*FixedMemoryLimiter) ProtoMessage ¶
func (*FixedMemoryLimiter) ProtoMessage()
func (*FixedMemoryLimiter) ProtoReflect ¶
func (x *FixedMemoryLimiter) ProtoReflect() protoreflect.Message
func (*FixedMemoryLimiter) Reset ¶
func (x *FixedMemoryLimiter) Reset()
func (*FixedMemoryLimiter) String ¶
func (x *FixedMemoryLimiter) String() string
func (*FixedMemoryLimiter) Validate ¶
func (m *FixedMemoryLimiter) Validate() error
Validate checks the field values on FixedMemoryLimiter with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*FixedMemoryLimiter) ValidateAll ¶
func (m *FixedMemoryLimiter) ValidateAll() error
ValidateAll checks the field values on FixedMemoryLimiter with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in FixedMemoryLimiterMultiError, or nil if none found.
type FixedMemoryLimiterMultiError ¶
type FixedMemoryLimiterMultiError []error
FixedMemoryLimiterMultiError is an error wrapping multiple validation errors returned by FixedMemoryLimiter.ValidateAll() if the designated constraints aren't met.
func (FixedMemoryLimiterMultiError) AllErrors ¶
func (m FixedMemoryLimiterMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (FixedMemoryLimiterMultiError) Error ¶
func (m FixedMemoryLimiterMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type FixedMemoryLimiterValidationError ¶
type FixedMemoryLimiterValidationError struct {
// contains filtered or unexported fields
}
FixedMemoryLimiterValidationError is the validation error returned by FixedMemoryLimiter.Validate if the designated constraints aren't met.
func (FixedMemoryLimiterValidationError) Cause ¶
func (e FixedMemoryLimiterValidationError) Cause() error
Cause function returns cause value.
func (FixedMemoryLimiterValidationError) Error ¶
func (e FixedMemoryLimiterValidationError) Error() string
Error satisfies the builtin error interface
func (FixedMemoryLimiterValidationError) ErrorName ¶
func (e FixedMemoryLimiterValidationError) ErrorName() string
ErrorName returns error name.
func (FixedMemoryLimiterValidationError) Field ¶
func (e FixedMemoryLimiterValidationError) Field() string
Field function returns field value.
func (FixedMemoryLimiterValidationError) Key ¶
func (e FixedMemoryLimiterValidationError) Key() bool
Key function returns key value.
func (FixedMemoryLimiterValidationError) Reason ¶
func (e FixedMemoryLimiterValidationError) Reason() string
Reason function returns reason value.
type RateLimitDescription ¶
type RateLimitDescription struct { Status RateLimitDescription_Status `protobuf:"varint,1,opt,name=status,proto3,enum=c1.ratelimit.v1.RateLimitDescription_Status" json:"status,omitempty"` Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` Remaining int64 `protobuf:"varint,3,opt,name=remaining,proto3" json:"remaining,omitempty"` Count int64 `protobuf:"varint,5,opt,name=count,proto3" json:"count,omitempty"` ResetAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=reset_at,json=resetAt,proto3" json:"reset_at,omitempty"` // contains filtered or unexported fields }
https://tools.ietf.org/html/draft-ietf-httpapi-ratelimit-headers-00#section-1.1 RateLimitDescription is a minimal representation of a rate limit.
func (*RateLimitDescription) Descriptor
deprecated
func (*RateLimitDescription) Descriptor() ([]byte, []int)
Deprecated: Use RateLimitDescription.ProtoReflect.Descriptor instead.
func (*RateLimitDescription) GetCount ¶
func (x *RateLimitDescription) GetCount() int64
func (*RateLimitDescription) GetLimit ¶
func (x *RateLimitDescription) GetLimit() int64
func (*RateLimitDescription) GetRemaining ¶
func (x *RateLimitDescription) GetRemaining() int64
func (*RateLimitDescription) GetResetAt ¶
func (x *RateLimitDescription) GetResetAt() *timestamppb.Timestamp
func (*RateLimitDescription) GetStatus ¶
func (x *RateLimitDescription) GetStatus() RateLimitDescription_Status
func (*RateLimitDescription) ProtoMessage ¶
func (*RateLimitDescription) ProtoMessage()
func (*RateLimitDescription) ProtoReflect ¶
func (x *RateLimitDescription) ProtoReflect() protoreflect.Message
func (*RateLimitDescription) Reset ¶
func (x *RateLimitDescription) Reset()
func (*RateLimitDescription) String ¶
func (x *RateLimitDescription) String() string
func (*RateLimitDescription) Validate ¶
func (m *RateLimitDescription) Validate() error
Validate checks the field values on RateLimitDescription with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*RateLimitDescription) ValidateAll ¶
func (m *RateLimitDescription) ValidateAll() error
ValidateAll checks the field values on RateLimitDescription with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in RateLimitDescriptionMultiError, or nil if none found.
type RateLimitDescriptionMultiError ¶
type RateLimitDescriptionMultiError []error
RateLimitDescriptionMultiError is an error wrapping multiple validation errors returned by RateLimitDescription.ValidateAll() if the designated constraints aren't met.
func (RateLimitDescriptionMultiError) AllErrors ¶
func (m RateLimitDescriptionMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (RateLimitDescriptionMultiError) Error ¶
func (m RateLimitDescriptionMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type RateLimitDescriptionValidationError ¶
type RateLimitDescriptionValidationError struct {
// contains filtered or unexported fields
}
RateLimitDescriptionValidationError is the validation error returned by RateLimitDescription.Validate if the designated constraints aren't met.
func (RateLimitDescriptionValidationError) Cause ¶
func (e RateLimitDescriptionValidationError) Cause() error
Cause function returns cause value.
func (RateLimitDescriptionValidationError) Error ¶
func (e RateLimitDescriptionValidationError) Error() string
Error satisfies the builtin error interface
func (RateLimitDescriptionValidationError) ErrorName ¶
func (e RateLimitDescriptionValidationError) ErrorName() string
ErrorName returns error name.
func (RateLimitDescriptionValidationError) Field ¶
func (e RateLimitDescriptionValidationError) Field() string
Field function returns field value.
func (RateLimitDescriptionValidationError) Key ¶
func (e RateLimitDescriptionValidationError) Key() bool
Key function returns key value.
func (RateLimitDescriptionValidationError) Reason ¶
func (e RateLimitDescriptionValidationError) Reason() string
Reason function returns reason value.
type RateLimitDescription_Status ¶
type RateLimitDescription_Status int32
const ( RateLimitDescription_STATUS_UNSPECIFIED RateLimitDescription_Status = 0 RateLimitDescription_STATUS_OK RateLimitDescription_Status = 1 RateLimitDescription_STATUS_OVERLIMIT RateLimitDescription_Status = 2 RateLimitDescription_STATUS_ERROR RateLimitDescription_Status = 3 RateLimitDescription_STATUS_EMPTY RateLimitDescription_Status = 4 )
func (RateLimitDescription_Status) Descriptor ¶
func (RateLimitDescription_Status) Descriptor() protoreflect.EnumDescriptor
func (RateLimitDescription_Status) Enum ¶
func (x RateLimitDescription_Status) Enum() *RateLimitDescription_Status
func (RateLimitDescription_Status) EnumDescriptor
deprecated
func (RateLimitDescription_Status) EnumDescriptor() ([]byte, []int)
Deprecated: Use RateLimitDescription_Status.Descriptor instead.
func (RateLimitDescription_Status) Number ¶
func (x RateLimitDescription_Status) Number() protoreflect.EnumNumber
func (RateLimitDescription_Status) String ¶
func (x RateLimitDescription_Status) String() string
func (RateLimitDescription_Status) Type ¶
func (RateLimitDescription_Status) Type() protoreflect.EnumType
type RateLimitDescriptors ¶
type RateLimitDescriptors struct { Entries []*RateLimitDescriptors_Entry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"` // contains filtered or unexported fields }
func (*RateLimitDescriptors) Descriptor
deprecated
func (*RateLimitDescriptors) Descriptor() ([]byte, []int)
Deprecated: Use RateLimitDescriptors.ProtoReflect.Descriptor instead.
func (*RateLimitDescriptors) GetEntries ¶
func (x *RateLimitDescriptors) GetEntries() []*RateLimitDescriptors_Entry
func (*RateLimitDescriptors) ProtoMessage ¶
func (*RateLimitDescriptors) ProtoMessage()
func (*RateLimitDescriptors) ProtoReflect ¶
func (x *RateLimitDescriptors) ProtoReflect() protoreflect.Message
func (*RateLimitDescriptors) Reset ¶
func (x *RateLimitDescriptors) Reset()
func (*RateLimitDescriptors) String ¶
func (x *RateLimitDescriptors) String() string
func (*RateLimitDescriptors) Validate ¶
func (m *RateLimitDescriptors) Validate() error
Validate checks the field values on RateLimitDescriptors with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*RateLimitDescriptors) ValidateAll ¶
func (m *RateLimitDescriptors) ValidateAll() error
ValidateAll checks the field values on RateLimitDescriptors with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in RateLimitDescriptorsMultiError, or nil if none found.
type RateLimitDescriptorsMultiError ¶
type RateLimitDescriptorsMultiError []error
RateLimitDescriptorsMultiError is an error wrapping multiple validation errors returned by RateLimitDescriptors.ValidateAll() if the designated constraints aren't met.
func (RateLimitDescriptorsMultiError) AllErrors ¶
func (m RateLimitDescriptorsMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (RateLimitDescriptorsMultiError) Error ¶
func (m RateLimitDescriptorsMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type RateLimitDescriptorsValidationError ¶
type RateLimitDescriptorsValidationError struct {
// contains filtered or unexported fields
}
RateLimitDescriptorsValidationError is the validation error returned by RateLimitDescriptors.Validate if the designated constraints aren't met.
func (RateLimitDescriptorsValidationError) Cause ¶
func (e RateLimitDescriptorsValidationError) Cause() error
Cause function returns cause value.
func (RateLimitDescriptorsValidationError) Error ¶
func (e RateLimitDescriptorsValidationError) Error() string
Error satisfies the builtin error interface
func (RateLimitDescriptorsValidationError) ErrorName ¶
func (e RateLimitDescriptorsValidationError) ErrorName() string
ErrorName returns error name.
func (RateLimitDescriptorsValidationError) Field ¶
func (e RateLimitDescriptorsValidationError) Field() string
Field function returns field value.
func (RateLimitDescriptorsValidationError) Key ¶
func (e RateLimitDescriptorsValidationError) Key() bool
Key function returns key value.
func (RateLimitDescriptorsValidationError) Reason ¶
func (e RateLimitDescriptorsValidationError) Reason() string
Reason function returns reason value.
type RateLimitDescriptors_Entry ¶
type RateLimitDescriptors_Entry struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*RateLimitDescriptors_Entry) Descriptor
deprecated
func (*RateLimitDescriptors_Entry) Descriptor() ([]byte, []int)
Deprecated: Use RateLimitDescriptors_Entry.ProtoReflect.Descriptor instead.
func (*RateLimitDescriptors_Entry) GetKey ¶
func (x *RateLimitDescriptors_Entry) GetKey() string
func (*RateLimitDescriptors_Entry) GetValue ¶
func (x *RateLimitDescriptors_Entry) GetValue() string
func (*RateLimitDescriptors_Entry) ProtoMessage ¶
func (*RateLimitDescriptors_Entry) ProtoMessage()
func (*RateLimitDescriptors_Entry) ProtoReflect ¶
func (x *RateLimitDescriptors_Entry) ProtoReflect() protoreflect.Message
func (*RateLimitDescriptors_Entry) Reset ¶
func (x *RateLimitDescriptors_Entry) Reset()
func (*RateLimitDescriptors_Entry) String ¶
func (x *RateLimitDescriptors_Entry) String() string
func (*RateLimitDescriptors_Entry) Validate ¶
func (m *RateLimitDescriptors_Entry) Validate() error
Validate checks the field values on RateLimitDescriptors_Entry with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*RateLimitDescriptors_Entry) ValidateAll ¶
func (m *RateLimitDescriptors_Entry) ValidateAll() error
ValidateAll checks the field values on RateLimitDescriptors_Entry with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in RateLimitDescriptors_EntryMultiError, or nil if none found.
type RateLimitDescriptors_EntryMultiError ¶
type RateLimitDescriptors_EntryMultiError []error
RateLimitDescriptors_EntryMultiError is an error wrapping multiple validation errors returned by RateLimitDescriptors_Entry.ValidateAll() if the designated constraints aren't met.
func (RateLimitDescriptors_EntryMultiError) AllErrors ¶
func (m RateLimitDescriptors_EntryMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (RateLimitDescriptors_EntryMultiError) Error ¶
func (m RateLimitDescriptors_EntryMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type RateLimitDescriptors_EntryValidationError ¶
type RateLimitDescriptors_EntryValidationError struct {
// contains filtered or unexported fields
}
RateLimitDescriptors_EntryValidationError is the validation error returned by RateLimitDescriptors_Entry.Validate if the designated constraints aren't met.
func (RateLimitDescriptors_EntryValidationError) Cause ¶
func (e RateLimitDescriptors_EntryValidationError) Cause() error
Cause function returns cause value.
func (RateLimitDescriptors_EntryValidationError) Error ¶
func (e RateLimitDescriptors_EntryValidationError) Error() string
Error satisfies the builtin error interface
func (RateLimitDescriptors_EntryValidationError) ErrorName ¶
func (e RateLimitDescriptors_EntryValidationError) ErrorName() string
ErrorName returns error name.
func (RateLimitDescriptors_EntryValidationError) Field ¶
func (e RateLimitDescriptors_EntryValidationError) Field() string
Field function returns field value.
func (RateLimitDescriptors_EntryValidationError) Key ¶
func (e RateLimitDescriptors_EntryValidationError) Key() bool
Key function returns key value.
func (RateLimitDescriptors_EntryValidationError) Reason ¶
func (e RateLimitDescriptors_EntryValidationError) Reason() string
Reason function returns reason value.
type RateLimiterConfig ¶
type RateLimiterConfig struct { // Types that are assignable to Type: // // *RateLimiterConfig_Disabled // *RateLimiterConfig_SlidingMem // *RateLimiterConfig_FixedMem // *RateLimiterConfig_External Type isRateLimiterConfig_Type `protobuf_oneof:"type"` // contains filtered or unexported fields }
func (*RateLimiterConfig) Descriptor
deprecated
func (*RateLimiterConfig) Descriptor() ([]byte, []int)
Deprecated: Use RateLimiterConfig.ProtoReflect.Descriptor instead.
func (*RateLimiterConfig) GetDisabled ¶
func (x *RateLimiterConfig) GetDisabled() *DisabledLimiter
func (*RateLimiterConfig) GetExternal ¶
func (x *RateLimiterConfig) GetExternal() *ExternalLimiter
func (*RateLimiterConfig) GetFixedMem ¶
func (x *RateLimiterConfig) GetFixedMem() *FixedMemoryLimiter
func (*RateLimiterConfig) GetSlidingMem ¶
func (x *RateLimiterConfig) GetSlidingMem() *SlidingMemoryLimiter
func (*RateLimiterConfig) GetType ¶
func (m *RateLimiterConfig) GetType() isRateLimiterConfig_Type
func (*RateLimiterConfig) ProtoMessage ¶
func (*RateLimiterConfig) ProtoMessage()
func (*RateLimiterConfig) ProtoReflect ¶
func (x *RateLimiterConfig) ProtoReflect() protoreflect.Message
func (*RateLimiterConfig) Reset ¶
func (x *RateLimiterConfig) Reset()
func (*RateLimiterConfig) String ¶
func (x *RateLimiterConfig) String() string
func (*RateLimiterConfig) Validate ¶
func (m *RateLimiterConfig) Validate() error
Validate checks the field values on RateLimiterConfig with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*RateLimiterConfig) ValidateAll ¶
func (m *RateLimiterConfig) ValidateAll() error
ValidateAll checks the field values on RateLimiterConfig with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in RateLimiterConfigMultiError, or nil if none found.
type RateLimiterConfigMultiError ¶
type RateLimiterConfigMultiError []error
RateLimiterConfigMultiError is an error wrapping multiple validation errors returned by RateLimiterConfig.ValidateAll() if the designated constraints aren't met.
func (RateLimiterConfigMultiError) AllErrors ¶
func (m RateLimiterConfigMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (RateLimiterConfigMultiError) Error ¶
func (m RateLimiterConfigMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type RateLimiterConfigValidationError ¶
type RateLimiterConfigValidationError struct {
// contains filtered or unexported fields
}
RateLimiterConfigValidationError is the validation error returned by RateLimiterConfig.Validate if the designated constraints aren't met.
func (RateLimiterConfigValidationError) Cause ¶
func (e RateLimiterConfigValidationError) Cause() error
Cause function returns cause value.
func (RateLimiterConfigValidationError) Error ¶
func (e RateLimiterConfigValidationError) Error() string
Error satisfies the builtin error interface
func (RateLimiterConfigValidationError) ErrorName ¶
func (e RateLimiterConfigValidationError) ErrorName() string
ErrorName returns error name.
func (RateLimiterConfigValidationError) Field ¶
func (e RateLimiterConfigValidationError) Field() string
Field function returns field value.
func (RateLimiterConfigValidationError) Key ¶
func (e RateLimiterConfigValidationError) Key() bool
Key function returns key value.
func (RateLimiterConfigValidationError) Reason ¶
func (e RateLimiterConfigValidationError) Reason() string
Reason function returns reason value.
type RateLimiterConfig_Disabled ¶
type RateLimiterConfig_Disabled struct {
Disabled *DisabledLimiter `protobuf:"bytes,100,opt,name=disabled,proto3,oneof"`
}
type RateLimiterConfig_External ¶
type RateLimiterConfig_External struct {
External *ExternalLimiter `protobuf:"bytes,103,opt,name=external,proto3,oneof"`
}
type RateLimiterConfig_FixedMem ¶
type RateLimiterConfig_FixedMem struct {
FixedMem *FixedMemoryLimiter `protobuf:"bytes,102,opt,name=fixed_mem,json=fixedMem,proto3,oneof"`
}
type RateLimiterConfig_SlidingMem ¶
type RateLimiterConfig_SlidingMem struct {
SlidingMem *SlidingMemoryLimiter `protobuf:"bytes,101,opt,name=sliding_mem,json=slidingMem,proto3,oneof"`
}
type RateLimiterServiceClient ¶ added in v0.1.0
type RateLimiterServiceClient interface { Do(ctx context.Context, in *DoRequest, opts ...grpc.CallOption) (*DoResponse, error) Report(ctx context.Context, in *ReportRequest, opts ...grpc.CallOption) (*ReportResponse, error) }
RateLimiterServiceClient is the client API for RateLimiterService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewRateLimiterServiceClient ¶ added in v0.1.0
func NewRateLimiterServiceClient(cc grpc.ClientConnInterface) RateLimiterServiceClient
type RateLimiterServiceServer ¶ added in v0.1.0
type RateLimiterServiceServer interface { Do(context.Context, *DoRequest) (*DoResponse, error) Report(context.Context, *ReportRequest) (*ReportResponse, error) }
RateLimiterServiceServer is the server API for RateLimiterService service. All implementations should embed UnimplementedRateLimiterServiceServer for forward compatibility
type ReportRequest ¶
type ReportRequest struct { RequestToken string `protobuf:"bytes,1,opt,name=request_token,json=requestToken,proto3" json:"request_token,omitempty"` Description *RateLimitDescription `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` Service string `protobuf:"bytes,3,opt,name=service,proto3" json:"service,omitempty"` Descriptors *RateLimitDescriptors `protobuf:"bytes,4,opt,name=descriptors,proto3" json:"descriptors,omitempty"` // contains filtered or unexported fields }
func (*ReportRequest) Descriptor
deprecated
func (*ReportRequest) Descriptor() ([]byte, []int)
Deprecated: Use ReportRequest.ProtoReflect.Descriptor instead.
func (*ReportRequest) GetDescription ¶
func (x *ReportRequest) GetDescription() *RateLimitDescription
func (*ReportRequest) GetDescriptors ¶
func (x *ReportRequest) GetDescriptors() *RateLimitDescriptors
func (*ReportRequest) GetRequestToken ¶
func (x *ReportRequest) GetRequestToken() string
func (*ReportRequest) GetService ¶
func (x *ReportRequest) GetService() string
func (*ReportRequest) ProtoMessage ¶
func (*ReportRequest) ProtoMessage()
func (*ReportRequest) ProtoReflect ¶
func (x *ReportRequest) ProtoReflect() protoreflect.Message
func (*ReportRequest) Reset ¶
func (x *ReportRequest) Reset()
func (*ReportRequest) String ¶
func (x *ReportRequest) String() string
func (*ReportRequest) Validate ¶
func (m *ReportRequest) Validate() error
Validate checks the field values on ReportRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*ReportRequest) ValidateAll ¶
func (m *ReportRequest) ValidateAll() error
ValidateAll checks the field values on ReportRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ReportRequestMultiError, or nil if none found.
type ReportRequestMultiError ¶
type ReportRequestMultiError []error
ReportRequestMultiError is an error wrapping multiple validation errors returned by ReportRequest.ValidateAll() if the designated constraints aren't met.
func (ReportRequestMultiError) AllErrors ¶
func (m ReportRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ReportRequestMultiError) Error ¶
func (m ReportRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ReportRequestValidationError ¶
type ReportRequestValidationError struct {
// contains filtered or unexported fields
}
ReportRequestValidationError is the validation error returned by ReportRequest.Validate if the designated constraints aren't met.
func (ReportRequestValidationError) Cause ¶
func (e ReportRequestValidationError) Cause() error
Cause function returns cause value.
func (ReportRequestValidationError) Error ¶
func (e ReportRequestValidationError) Error() string
Error satisfies the builtin error interface
func (ReportRequestValidationError) ErrorName ¶
func (e ReportRequestValidationError) ErrorName() string
ErrorName returns error name.
func (ReportRequestValidationError) Field ¶
func (e ReportRequestValidationError) Field() string
Field function returns field value.
func (ReportRequestValidationError) Key ¶
func (e ReportRequestValidationError) Key() bool
Key function returns key value.
func (ReportRequestValidationError) Reason ¶
func (e ReportRequestValidationError) Reason() string
Reason function returns reason value.
type ReportResponse ¶ added in v0.1.0
type ReportResponse struct {
// contains filtered or unexported fields
}
func (*ReportResponse) Descriptor
deprecated
added in
v0.1.0
func (*ReportResponse) Descriptor() ([]byte, []int)
Deprecated: Use ReportResponse.ProtoReflect.Descriptor instead.
func (*ReportResponse) ProtoMessage ¶ added in v0.1.0
func (*ReportResponse) ProtoMessage()
func (*ReportResponse) ProtoReflect ¶ added in v0.1.0
func (x *ReportResponse) ProtoReflect() protoreflect.Message
func (*ReportResponse) Reset ¶ added in v0.1.0
func (x *ReportResponse) Reset()
func (*ReportResponse) String ¶ added in v0.1.0
func (x *ReportResponse) String() string
func (*ReportResponse) Validate ¶ added in v0.1.0
func (m *ReportResponse) Validate() error
Validate checks the field values on ReportResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*ReportResponse) ValidateAll ¶ added in v0.1.0
func (m *ReportResponse) ValidateAll() error
ValidateAll checks the field values on ReportResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ReportResponseMultiError, or nil if none found.
type ReportResponseMultiError ¶ added in v0.1.0
type ReportResponseMultiError []error
ReportResponseMultiError is an error wrapping multiple validation errors returned by ReportResponse.ValidateAll() if the designated constraints aren't met.
func (ReportResponseMultiError) AllErrors ¶ added in v0.1.0
func (m ReportResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ReportResponseMultiError) Error ¶ added in v0.1.0
func (m ReportResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ReportResponseValidationError ¶ added in v0.1.0
type ReportResponseValidationError struct {
// contains filtered or unexported fields
}
ReportResponseValidationError is the validation error returned by ReportResponse.Validate if the designated constraints aren't met.
func (ReportResponseValidationError) Cause ¶ added in v0.1.0
func (e ReportResponseValidationError) Cause() error
Cause function returns cause value.
func (ReportResponseValidationError) Error ¶ added in v0.1.0
func (e ReportResponseValidationError) Error() string
Error satisfies the builtin error interface
func (ReportResponseValidationError) ErrorName ¶ added in v0.1.0
func (e ReportResponseValidationError) ErrorName() string
ErrorName returns error name.
func (ReportResponseValidationError) Field ¶ added in v0.1.0
func (e ReportResponseValidationError) Field() string
Field function returns field value.
func (ReportResponseValidationError) Key ¶ added in v0.1.0
func (e ReportResponseValidationError) Key() bool
Key function returns key value.
func (ReportResponseValidationError) Reason ¶ added in v0.1.0
func (e ReportResponseValidationError) Reason() string
Reason function returns reason value.
type SlidingMemoryLimiter ¶
type SlidingMemoryLimiter struct { UsePercent float64 `protobuf:"fixed64,1,opt,name=use_percent,json=usePercent,proto3" json:"use_percent,omitempty"` // contains filtered or unexported fields }
func (*SlidingMemoryLimiter) Descriptor
deprecated
func (*SlidingMemoryLimiter) Descriptor() ([]byte, []int)
Deprecated: Use SlidingMemoryLimiter.ProtoReflect.Descriptor instead.
func (*SlidingMemoryLimiter) GetUsePercent ¶
func (x *SlidingMemoryLimiter) GetUsePercent() float64
func (*SlidingMemoryLimiter) ProtoMessage ¶
func (*SlidingMemoryLimiter) ProtoMessage()
func (*SlidingMemoryLimiter) ProtoReflect ¶
func (x *SlidingMemoryLimiter) ProtoReflect() protoreflect.Message
func (*SlidingMemoryLimiter) Reset ¶
func (x *SlidingMemoryLimiter) Reset()
func (*SlidingMemoryLimiter) String ¶
func (x *SlidingMemoryLimiter) String() string
func (*SlidingMemoryLimiter) Validate ¶
func (m *SlidingMemoryLimiter) Validate() error
Validate checks the field values on SlidingMemoryLimiter with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*SlidingMemoryLimiter) ValidateAll ¶
func (m *SlidingMemoryLimiter) ValidateAll() error
ValidateAll checks the field values on SlidingMemoryLimiter with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in SlidingMemoryLimiterMultiError, or nil if none found.
type SlidingMemoryLimiterMultiError ¶
type SlidingMemoryLimiterMultiError []error
SlidingMemoryLimiterMultiError is an error wrapping multiple validation errors returned by SlidingMemoryLimiter.ValidateAll() if the designated constraints aren't met.
func (SlidingMemoryLimiterMultiError) AllErrors ¶
func (m SlidingMemoryLimiterMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (SlidingMemoryLimiterMultiError) Error ¶
func (m SlidingMemoryLimiterMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type SlidingMemoryLimiterValidationError ¶
type SlidingMemoryLimiterValidationError struct {
// contains filtered or unexported fields
}
SlidingMemoryLimiterValidationError is the validation error returned by SlidingMemoryLimiter.Validate if the designated constraints aren't met.
func (SlidingMemoryLimiterValidationError) Cause ¶
func (e SlidingMemoryLimiterValidationError) Cause() error
Cause function returns cause value.
func (SlidingMemoryLimiterValidationError) Error ¶
func (e SlidingMemoryLimiterValidationError) Error() string
Error satisfies the builtin error interface
func (SlidingMemoryLimiterValidationError) ErrorName ¶
func (e SlidingMemoryLimiterValidationError) ErrorName() string
ErrorName returns error name.
func (SlidingMemoryLimiterValidationError) Field ¶
func (e SlidingMemoryLimiterValidationError) Field() string
Field function returns field value.
func (SlidingMemoryLimiterValidationError) Key ¶
func (e SlidingMemoryLimiterValidationError) Key() bool
Key function returns key value.
func (SlidingMemoryLimiterValidationError) Reason ¶
func (e SlidingMemoryLimiterValidationError) Reason() string
Reason function returns reason value.
type UnimplementedRateLimiterServiceServer ¶ added in v0.1.0
type UnimplementedRateLimiterServiceServer struct { }
UnimplementedRateLimiterServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedRateLimiterServiceServer) Do ¶ added in v0.1.0
func (UnimplementedRateLimiterServiceServer) Do(context.Context, *DoRequest) (*DoResponse, error)
func (UnimplementedRateLimiterServiceServer) Report ¶ added in v0.1.0
func (UnimplementedRateLimiterServiceServer) Report(context.Context, *ReportRequest) (*ReportResponse, error)
type UnsafeRateLimiterServiceServer ¶ added in v0.1.0
type UnsafeRateLimiterServiceServer interface {
// contains filtered or unexported methods
}
UnsafeRateLimiterServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to RateLimiterServiceServer will result in compilation errors.