v1

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2023 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RateLimitDescription_Status_name = map[int32]string{
		0: "UNKNOWN",
		1: "OK",
		2: "OVERLIMIT",
		3: "ERROR",
		4: "EMPTY",
	}
	RateLimitDescription_Status_value = map[string]int32{
		"UNKNOWN":   0,
		"OK":        1,
		"OVERLIMIT": 2,
		"ERROR":     3,
		"EMPTY":     4,
	}
)

Enum value maps for RateLimitDescription_Status.

View Source
var File_c1_ratelimit_v1_ratelimit_proto protoreflect.FileDescriptor
View Source
var RateLimiter_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "c1.ratelimit.v1.RateLimiter",
	HandlerType: (*RateLimiterServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Do",
			Handler:    _RateLimiter_Do_Handler,
		},
		{
			MethodName: "Report",
			Handler:    _RateLimiter_Report_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "c1/ratelimit/v1/ratelimit.proto",
}

RateLimiter_ServiceDesc is the grpc.ServiceDesc for RateLimiter service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterRateLimiterServer

func RegisterRateLimiterServer(s grpc.ServiceRegistrar, srv RateLimiterServer)

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

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

Cause function returns cause value.

func (DisabledLimiterValidationError) Error

Error satisfies the builtin error interface

func (DisabledLimiterValidationError) ErrorName

func (e DisabledLimiterValidationError) ErrorName() string

ErrorName returns error name.

func (DisabledLimiterValidationError) Field

Field function returns field value.

func (DisabledLimiterValidationError) Key

Key function returns key value.

func (DisabledLimiterValidationError) Reason

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) Descriptor() ([]byte, []int)

Deprecated: Use DoRequest.ProtoReflect.Descriptor instead.

func (*DoRequest) GetDescriptors

func (x *DoRequest) GetDescriptors() *RateLimitDescriptors

func (*DoRequest) GetRequestToken

func (x *DoRequest) GetRequestToken() string

func (*DoRequest) GetService

func (x *DoRequest) GetService() string

func (*DoRequest) ProtoMessage

func (*DoRequest) ProtoMessage()

func (*DoRequest) ProtoReflect

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

func (*DoRequest) Reset

func (x *DoRequest) Reset()

func (*DoRequest) String

func (x *DoRequest) String() string

func (*DoRequest) Validate

func (m *DoRequest) Validate() error

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

func (m *DoRequest) ValidateAll() error

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

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

Error satisfies the builtin error interface

func (DoResponseValidationError) ErrorName

func (e DoResponseValidationError) ErrorName() string

ErrorName returns error name.

func (DoResponseValidationError) Field

Field function returns field value.

func (DoResponseValidationError) Key

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

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

Cause function returns cause value.

func (ExternalLimiterValidationError) Error

Error satisfies the builtin error interface

func (ExternalLimiterValidationError) ErrorName

func (e ExternalLimiterValidationError) ErrorName() string

ErrorName returns error name.

func (ExternalLimiterValidationError) Field

Field function returns field value.

func (ExternalLimiterValidationError) Key

Key function returns key value.

func (ExternalLimiterValidationError) Reason

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

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

Cause function returns cause value.

func (FixedMemoryLimiterValidationError) Error

Error satisfies the builtin error interface

func (FixedMemoryLimiterValidationError) ErrorName

ErrorName returns error name.

func (FixedMemoryLimiterValidationError) Field

Field function returns field value.

func (FixedMemoryLimiterValidationError) Key

Key function returns key value.

func (FixedMemoryLimiterValidationError) Reason

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 (*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

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

Cause function returns cause value.

func (RateLimitDescriptionValidationError) Error

Error satisfies the builtin error interface

func (RateLimitDescriptionValidationError) ErrorName

ErrorName returns error name.

func (RateLimitDescriptionValidationError) Field

Field function returns field value.

func (RateLimitDescriptionValidationError) Key

Key function returns key value.

func (RateLimitDescriptionValidationError) Reason

Reason function returns reason value.

type RateLimitDescription_Status

type RateLimitDescription_Status int32
const (
	RateLimitDescription_UNKNOWN   RateLimitDescription_Status = 0
	RateLimitDescription_OK        RateLimitDescription_Status = 1
	RateLimitDescription_OVERLIMIT RateLimitDescription_Status = 2
	RateLimitDescription_ERROR     RateLimitDescription_Status = 3
	RateLimitDescription_EMPTY     RateLimitDescription_Status = 4
)

func (RateLimitDescription_Status) Descriptor

func (RateLimitDescription_Status) Enum

func (RateLimitDescription_Status) EnumDescriptor deprecated

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

Deprecated: Use RateLimitDescription_Status.Descriptor instead.

func (RateLimitDescription_Status) Number

func (RateLimitDescription_Status) String

func (RateLimitDescription_Status) Type

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 (*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

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

Cause function returns cause value.

func (RateLimitDescriptorsValidationError) Error

Error satisfies the builtin error interface

func (RateLimitDescriptorsValidationError) ErrorName

ErrorName returns error name.

func (RateLimitDescriptorsValidationError) Field

Field function returns field value.

func (RateLimitDescriptorsValidationError) Key

Key function returns key value.

func (RateLimitDescriptorsValidationError) Reason

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 (*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

AllErrors returns a list of validation violation errors.

func (RateLimitDescriptors_EntryMultiError) Error

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

Cause function returns cause value.

func (RateLimitDescriptors_EntryValidationError) Error

Error satisfies the builtin error interface

func (RateLimitDescriptors_EntryValidationError) ErrorName

ErrorName returns error name.

func (RateLimitDescriptors_EntryValidationError) Field

Field function returns field value.

func (RateLimitDescriptors_EntryValidationError) Key

Key function returns key value.

func (RateLimitDescriptors_EntryValidationError) Reason

Reason function returns reason value.

type RateLimiterClient

type RateLimiterClient interface {
	Do(ctx context.Context, in *DoRequest, opts ...grpc.CallOption) (*DoResponse, error)
	Report(ctx context.Context, in *ReportRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

RateLimiterClient is the client API for RateLimiter 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.

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

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

Cause function returns cause value.

func (RateLimiterConfigValidationError) Error

Error satisfies the builtin error interface

func (RateLimiterConfigValidationError) ErrorName

ErrorName returns error name.

func (RateLimiterConfigValidationError) Field

Field function returns field value.

func (RateLimiterConfigValidationError) Key

Key function returns key value.

func (RateLimiterConfigValidationError) Reason

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 RateLimiterServer

type RateLimiterServer interface {
	Do(context.Context, *DoRequest) (*DoResponse, error)
	Report(context.Context, *ReportRequest) (*emptypb.Empty, error)
}

RateLimiterServer is the server API for RateLimiter service. All implementations should embed UnimplementedRateLimiterServer 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

Cause function returns cause value.

func (ReportRequestValidationError) Error

Error satisfies the builtin error interface

func (ReportRequestValidationError) ErrorName

func (e ReportRequestValidationError) ErrorName() string

ErrorName returns error name.

func (ReportRequestValidationError) Field

Field function returns field value.

func (ReportRequestValidationError) Key

Key function returns key value.

func (ReportRequestValidationError) Reason

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

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

Cause function returns cause value.

func (SlidingMemoryLimiterValidationError) Error

Error satisfies the builtin error interface

func (SlidingMemoryLimiterValidationError) ErrorName

ErrorName returns error name.

func (SlidingMemoryLimiterValidationError) Field

Field function returns field value.

func (SlidingMemoryLimiterValidationError) Key

Key function returns key value.

func (SlidingMemoryLimiterValidationError) Reason

Reason function returns reason value.

type UnimplementedRateLimiterServer

type UnimplementedRateLimiterServer struct {
}

UnimplementedRateLimiterServer should be embedded to have forward compatible implementations.

func (UnimplementedRateLimiterServer) Do

func (UnimplementedRateLimiterServer) Report

type UnsafeRateLimiterServer

type UnsafeRateLimiterServer interface {
	// contains filtered or unexported methods
}

UnsafeRateLimiterServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to RateLimiterServer will result in compilation errors.

Jump to

Keyboard shortcuts

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