tokenbucketv1

package
v2.0.0-...-d8f0e26 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2024 License: Apache-2.0 Imports: 23 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLength        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflow          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group")
)
View Source
var File_aperture_tokenbucket_v1_state_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type State

type State struct {
	StartFillAt *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=start_fill_at,json=startFillAt,proto3" json:"start_fill_at,omitempty"`
	LastFillAt  *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=last_fill_at,json=lastFillAt,proto3" json:"last_fill_at,omitempty"`
	Available   float64                `protobuf:"fixed64,3,opt,name=available,proto3" json:"available,omitempty"`
	// contains filtered or unexported fields
}

func (*State) Descriptor deprecated

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

Deprecated: Use State.ProtoReflect.Descriptor instead.

func (*State) GetAvailable

func (x *State) GetAvailable() float64

func (*State) GetLastFillAt

func (x *State) GetLastFillAt() *timestamppb.Timestamp

func (*State) GetStartFillAt

func (x *State) GetStartFillAt() *timestamppb.Timestamp

func (*State) MarshalJSON

func (msg *State) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (*State) MarshalToSizedBufferVT

func (m *State) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*State) MarshalToVT

func (m *State) MarshalToVT(dAtA []byte) (int, error)

func (*State) MarshalVT

func (m *State) MarshalVT() (dAtA []byte, err error)

func (*State) ProtoMessage

func (*State) ProtoMessage()

func (*State) ProtoReflect

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

func (*State) Reset

func (x *State) Reset()

func (*State) SizeVT

func (m *State) SizeVT() (n int)

func (*State) String

func (x *State) String() string

func (*State) UnmarshalJSON

func (msg *State) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler

func (*State) UnmarshalVT

func (m *State) UnmarshalVT(dAtA []byte) error

func (*State) Validate

func (m *State) Validate() error

Validate checks the field values on State 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 (*State) ValidateAll

func (m *State) ValidateAll() error

ValidateAll checks the field values on State 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 StateMultiError, or nil if none found.

type StateMultiError

type StateMultiError []error

StateMultiError is an error wrapping multiple validation errors returned by State.ValidateAll() if the designated constraints aren't met.

func (StateMultiError) AllErrors

func (m StateMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (StateMultiError) Error

func (m StateMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type StateValidationError

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

StateValidationError is the validation error returned by State.Validate if the designated constraints aren't met.

func (StateValidationError) Cause

func (e StateValidationError) Cause() error

Cause function returns cause value.

func (StateValidationError) Error

func (e StateValidationError) Error() string

Error satisfies the builtin error interface

func (StateValidationError) ErrorName

func (e StateValidationError) ErrorName() string

ErrorName returns error name.

func (StateValidationError) Field

func (e StateValidationError) Field() string

Field function returns field value.

func (StateValidationError) Key

func (e StateValidationError) Key() bool

Key function returns key value.

func (StateValidationError) Reason

func (e StateValidationError) Reason() string

Reason function returns reason value.

type TakeNRequest

type TakeNRequest struct {
	Deadline *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=deadline,proto3" json:"deadline,omitempty"`
	Want     float64                `protobuf:"fixed64,2,opt,name=want,proto3" json:"want,omitempty"`
	CanWait  bool                   `protobuf:"varint,3,opt,name=can_wait,json=canWait,proto3" json:"can_wait,omitempty"`
	// contains filtered or unexported fields
}

func (*TakeNRequest) Descriptor deprecated

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

Deprecated: Use TakeNRequest.ProtoReflect.Descriptor instead.

func (*TakeNRequest) GetCanWait

func (x *TakeNRequest) GetCanWait() bool

func (*TakeNRequest) GetDeadline

func (x *TakeNRequest) GetDeadline() *timestamppb.Timestamp

func (*TakeNRequest) GetWant

func (x *TakeNRequest) GetWant() float64

func (*TakeNRequest) MarshalJSON

func (msg *TakeNRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (*TakeNRequest) MarshalToSizedBufferVT

func (m *TakeNRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*TakeNRequest) MarshalToVT

func (m *TakeNRequest) MarshalToVT(dAtA []byte) (int, error)

func (*TakeNRequest) MarshalVT

func (m *TakeNRequest) MarshalVT() (dAtA []byte, err error)

func (*TakeNRequest) ProtoMessage

func (*TakeNRequest) ProtoMessage()

func (*TakeNRequest) ProtoReflect

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

func (*TakeNRequest) Reset

func (x *TakeNRequest) Reset()

func (*TakeNRequest) SizeVT

func (m *TakeNRequest) SizeVT() (n int)

func (*TakeNRequest) String

func (x *TakeNRequest) String() string

func (*TakeNRequest) UnmarshalJSON

func (msg *TakeNRequest) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler

func (*TakeNRequest) UnmarshalVT

func (m *TakeNRequest) UnmarshalVT(dAtA []byte) error

func (*TakeNRequest) Validate

func (m *TakeNRequest) Validate() error

Validate checks the field values on TakeNRequest 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 (*TakeNRequest) ValidateAll

func (m *TakeNRequest) ValidateAll() error

ValidateAll checks the field values on TakeNRequest 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 TakeNRequestMultiError, or nil if none found.

type TakeNRequestMultiError

type TakeNRequestMultiError []error

TakeNRequestMultiError is an error wrapping multiple validation errors returned by TakeNRequest.ValidateAll() if the designated constraints aren't met.

func (TakeNRequestMultiError) AllErrors

func (m TakeNRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (TakeNRequestMultiError) Error

func (m TakeNRequestMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type TakeNRequestValidationError

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

TakeNRequestValidationError is the validation error returned by TakeNRequest.Validate if the designated constraints aren't met.

func (TakeNRequestValidationError) Cause

Cause function returns cause value.

func (TakeNRequestValidationError) Error

Error satisfies the builtin error interface

func (TakeNRequestValidationError) ErrorName

func (e TakeNRequestValidationError) ErrorName() string

ErrorName returns error name.

func (TakeNRequestValidationError) Field

Field function returns field value.

func (TakeNRequestValidationError) Key

Key function returns key value.

func (TakeNRequestValidationError) Reason

Reason function returns reason value.

type TakeNResponse

type TakeNResponse struct {
	AvailableAt *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=available_at,json=availableAt,proto3" json:"available_at,omitempty"`
	Current     float64                `protobuf:"fixed64,2,opt,name=current,proto3" json:"current,omitempty"`
	Remaining   float64                `protobuf:"fixed64,3,opt,name=remaining,proto3" json:"remaining,omitempty"`
	Ok          bool                   `protobuf:"varint,4,opt,name=ok,proto3" json:"ok,omitempty"`
	// contains filtered or unexported fields
}

func (*TakeNResponse) Descriptor deprecated

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

Deprecated: Use TakeNResponse.ProtoReflect.Descriptor instead.

func (*TakeNResponse) GetAvailableAt

func (x *TakeNResponse) GetAvailableAt() *timestamppb.Timestamp

func (*TakeNResponse) GetCurrent

func (x *TakeNResponse) GetCurrent() float64

func (*TakeNResponse) GetOk

func (x *TakeNResponse) GetOk() bool

func (*TakeNResponse) GetRemaining

func (x *TakeNResponse) GetRemaining() float64

func (*TakeNResponse) MarshalJSON

func (msg *TakeNResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (*TakeNResponse) MarshalToSizedBufferVT

func (m *TakeNResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*TakeNResponse) MarshalToVT

func (m *TakeNResponse) MarshalToVT(dAtA []byte) (int, error)

func (*TakeNResponse) MarshalVT

func (m *TakeNResponse) MarshalVT() (dAtA []byte, err error)

func (*TakeNResponse) ProtoMessage

func (*TakeNResponse) ProtoMessage()

func (*TakeNResponse) ProtoReflect

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

func (*TakeNResponse) Reset

func (x *TakeNResponse) Reset()

func (*TakeNResponse) SizeVT

func (m *TakeNResponse) SizeVT() (n int)

func (*TakeNResponse) String

func (x *TakeNResponse) String() string

func (*TakeNResponse) UnmarshalJSON

func (msg *TakeNResponse) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler

func (*TakeNResponse) UnmarshalVT

func (m *TakeNResponse) UnmarshalVT(dAtA []byte) error

func (*TakeNResponse) Validate

func (m *TakeNResponse) Validate() error

Validate checks the field values on TakeNResponse 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 (*TakeNResponse) ValidateAll

func (m *TakeNResponse) ValidateAll() error

ValidateAll checks the field values on TakeNResponse 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 TakeNResponseMultiError, or nil if none found.

type TakeNResponseMultiError

type TakeNResponseMultiError []error

TakeNResponseMultiError is an error wrapping multiple validation errors returned by TakeNResponse.ValidateAll() if the designated constraints aren't met.

func (TakeNResponseMultiError) AllErrors

func (m TakeNResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (TakeNResponseMultiError) Error

func (m TakeNResponseMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type TakeNResponseValidationError

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

TakeNResponseValidationError is the validation error returned by TakeNResponse.Validate if the designated constraints aren't met.

func (TakeNResponseValidationError) Cause

Cause function returns cause value.

func (TakeNResponseValidationError) Error

Error satisfies the builtin error interface

func (TakeNResponseValidationError) ErrorName

func (e TakeNResponseValidationError) ErrorName() string

ErrorName returns error name.

func (TakeNResponseValidationError) Field

Field function returns field value.

func (TakeNResponseValidationError) Key

Key function returns key value.

func (TakeNResponseValidationError) Reason

Reason function returns reason value.

Jump to

Keyboard shortcuts

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