Documentation
¶
Index ¶
- Variables
- func RegisterOsirisServer(s *grpc.Server, srv OsirisServer)
- func ValidateLimit(limit *Limit) error
- func ValidateLimits(limits *LimitsByKey) error
- type Limit
- func (*Limit) Descriptor() ([]byte, []int)
- func (m *Limit) GetExpires() *wrappers.Int64Value
- func (m *Limit) GetId() string
- func (m *Limit) GetLimit() *wrappers.Int64Value
- func (m *Limit) GetMaxBurst() *wrappers.Int64Value
- func (m *Limit) GetPeriodBucket() PeriodBucketType
- func (m *Limit) GetRate() *wrappers.Int64Value
- func (m *Limit) GetRefresh() *wrappers.Int64Value
- func (m *Limit) GetResource() *wrappers.StringValue
- func (m *Limit) GetType() LimitType
- func (msg *Limit) MarshalJSON() ([]byte, error)
- func (*Limit) ProtoMessage()
- func (m *Limit) Reset()
- func (m *Limit) String() string
- func (msg *Limit) UnmarshalJSON(b []byte) error
- func (limit *Limit) Validate() error
- func (m *Limit) XXX_DiscardUnknown()
- func (m *Limit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Limit) XXX_Merge(src proto.Message)
- func (m *Limit) XXX_Size() int
- func (m *Limit) XXX_Unmarshal(b []byte) error
- type LimitIDs
- func (*LimitIDs) Descriptor() ([]byte, []int)
- func (m *LimitIDs) GetLimitIds() []string
- func (msg *LimitIDs) MarshalJSON() ([]byte, error)
- func (*LimitIDs) ProtoMessage()
- func (m *LimitIDs) Reset()
- func (m *LimitIDs) String() string
- func (msg *LimitIDs) UnmarshalJSON(b []byte) error
- func (m *LimitIDs) XXX_DiscardUnknown()
- func (m *LimitIDs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LimitIDs) XXX_Merge(src proto.Message)
- func (m *LimitIDs) XXX_Size() int
- func (m *LimitIDs) XXX_Unmarshal(b []byte) error
- type LimitIDsByKey
- func (*LimitIDsByKey) Descriptor() ([]byte, []int)
- func (m *LimitIDsByKey) GetKey() string
- func (m *LimitIDsByKey) GetLimitIds() []string
- func (msg *LimitIDsByKey) MarshalJSON() ([]byte, error)
- func (*LimitIDsByKey) ProtoMessage()
- func (m *LimitIDsByKey) Reset()
- func (m *LimitIDsByKey) String() string
- func (msg *LimitIDsByKey) UnmarshalJSON(b []byte) error
- func (m *LimitIDsByKey) XXX_DiscardUnknown()
- func (m *LimitIDsByKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LimitIDsByKey) XXX_Merge(src proto.Message)
- func (m *LimitIDsByKey) XXX_Size() int
- func (m *LimitIDsByKey) XXX_Unmarshal(b []byte) error
- type LimitIDsByKeys
- func (*LimitIDsByKeys) Descriptor() ([]byte, []int)
- func (m *LimitIDsByKeys) GetLimitIdsByKeys() []*LimitIDsByKey
- func (msg *LimitIDsByKeys) MarshalJSON() ([]byte, error)
- func (*LimitIDsByKeys) ProtoMessage()
- func (m *LimitIDsByKeys) Reset()
- func (m *LimitIDsByKeys) String() string
- func (msg *LimitIDsByKeys) UnmarshalJSON(b []byte) error
- func (m *LimitIDsByKeys) XXX_DiscardUnknown()
- func (m *LimitIDsByKeys) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LimitIDsByKeys) XXX_Merge(src proto.Message)
- func (m *LimitIDsByKeys) XXX_Size() int
- func (m *LimitIDsByKeys) XXX_Unmarshal(b []byte) error
- type LimitType
- type Limits
- func (*Limits) Descriptor() ([]byte, []int)
- func (m *Limits) GetLimits() []*Limit
- func (msg *Limits) MarshalJSON() ([]byte, error)
- func (*Limits) ProtoMessage()
- func (m *Limits) Reset()
- func (m *Limits) String() string
- func (msg *Limits) UnmarshalJSON(b []byte) error
- func (m *Limits) XXX_DiscardUnknown()
- func (m *Limits) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Limits) XXX_Merge(src proto.Message)
- func (m *Limits) XXX_Size() int
- func (m *Limits) XXX_Unmarshal(b []byte) error
- type LimitsByKey
- func (*LimitsByKey) Descriptor() ([]byte, []int)
- func (m *LimitsByKey) GetKey() string
- func (m *LimitsByKey) GetLimits() []*Limit
- func (msg *LimitsByKey) MarshalJSON() ([]byte, error)
- func (*LimitsByKey) ProtoMessage()
- func (m *LimitsByKey) Reset()
- func (m *LimitsByKey) String() string
- func (msg *LimitsByKey) UnmarshalJSON(b []byte) error
- func (m *LimitsByKey) XXX_DiscardUnknown()
- func (m *LimitsByKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LimitsByKey) XXX_Merge(src proto.Message)
- func (m *LimitsByKey) XXX_Size() int
- func (m *LimitsByKey) XXX_Unmarshal(b []byte) error
- type OsirisClient
- type OsirisServer
- type PeriodBucketType
- type ResourcesWithRequest
- func (*ResourcesWithRequest) Descriptor() ([]byte, []int)
- func (m *ResourcesWithRequest) GetRequestId() string
- func (m *ResourcesWithRequest) GetResources() map[string]int64
- func (msg *ResourcesWithRequest) MarshalJSON() ([]byte, error)
- func (*ResourcesWithRequest) ProtoMessage()
- func (m *ResourcesWithRequest) Reset()
- func (m *ResourcesWithRequest) String() string
- func (msg *ResourcesWithRequest) UnmarshalJSON(b []byte) error
- func (m *ResourcesWithRequest) XXX_DiscardUnknown()
- func (m *ResourcesWithRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ResourcesWithRequest) XXX_Merge(src proto.Message)
- func (m *ResourcesWithRequest) XXX_Size() int
- func (m *ResourcesWithRequest) XXX_Unmarshal(b []byte) error
- type State
- func (*State) Descriptor() ([]byte, []int)
- func (m *State) GetAllowed() *wrappers.BoolValue
- func (m *State) GetFullyAvailableAt() *timestamp.Timestamp
- func (m *State) GetLimit() *Limit
- func (m *State) GetNextAvailableAt() *timestamp.Timestamp
- func (m *State) GetRemaining() *wrappers.Int64Value
- func (m *State) GetUsed() *wrappers.Int64Value
- func (msg *State) MarshalJSON() ([]byte, error)
- func (*State) ProtoMessage()
- func (m *State) Reset()
- func (m *State) String() string
- func (msg *State) UnmarshalJSON(b []byte) error
- func (m *State) XXX_DiscardUnknown()
- func (m *State) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *State) XXX_Merge(src proto.Message)
- func (m *State) XXX_Size() int
- func (m *State) XXX_Unmarshal(b []byte) error
- type StatesByKey
- func (*StatesByKey) Descriptor() ([]byte, []int)
- func (m *StatesByKey) GetAllowed() *wrappers.BoolValue
- func (m *StatesByKey) GetKey() string
- func (m *StatesByKey) GetStates() []*State
- func (msg *StatesByKey) MarshalJSON() ([]byte, error)
- func (*StatesByKey) ProtoMessage()
- func (m *StatesByKey) Reset()
- func (m *StatesByKey) String() string
- func (msg *StatesByKey) UnmarshalJSON(b []byte) error
- func (m *StatesByKey) XXX_DiscardUnknown()
- func (m *StatesByKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *StatesByKey) XXX_Merge(src proto.Message)
- func (m *StatesByKey) XXX_Size() int
- func (m *StatesByKey) XXX_Unmarshal(b []byte) error
- type StatesByKeysWithRequest
- func (*StatesByKeysWithRequest) Descriptor() ([]byte, []int)
- func (m *StatesByKeysWithRequest) GetAllowed() *wrappers.BoolValue
- func (m *StatesByKeysWithRequest) GetRequestId() string
- func (m *StatesByKeysWithRequest) GetStatesByKeys() []*StatesByKey
- func (msg *StatesByKeysWithRequest) MarshalJSON() ([]byte, error)
- func (*StatesByKeysWithRequest) ProtoMessage()
- func (m *StatesByKeysWithRequest) Reset()
- func (m *StatesByKeysWithRequest) String() string
- func (msg *StatesByKeysWithRequest) UnmarshalJSON(b []byte) error
- func (m *StatesByKeysWithRequest) XXX_DiscardUnknown()
- func (m *StatesByKeysWithRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *StatesByKeysWithRequest) XXX_Merge(src proto.Message)
- func (m *StatesByKeysWithRequest) XXX_Size() int
- func (m *StatesByKeysWithRequest) XXX_Unmarshal(b []byte) error
- type UnimplementedOsirisServer
- func (*UnimplementedOsirisServer) CheckStates(ctx context.Context, req *LimitIDsByKeys) (*StatesByKeysWithRequest, error)
- func (*UnimplementedOsirisServer) FinishRequest(ctx context.Context, req *ResourcesWithRequest) (*empty.Empty, error)
- func (*UnimplementedOsirisServer) GetLimits(ctx context.Context, req *LimitIDs) (*Limits, error)
- func (*UnimplementedOsirisServer) GetLimitsAll(ctx context.Context, req *empty.Empty) (*Limits, error)
- func (*UnimplementedOsirisServer) PeekStates(ctx context.Context, req *LimitIDsByKeys) (*StatesByKeysWithRequest, error)
- func (*UnimplementedOsirisServer) RemoveLimits(ctx context.Context, req *LimitIDs) (*empty.Empty, error)
- func (*UnimplementedOsirisServer) RemoveLimitsAll(ctx context.Context, req *empty.Empty) (*empty.Empty, error)
- func (*UnimplementedOsirisServer) SetLimits(ctx context.Context, req *Limits) (*empty.Empty, error)
Constants ¶
This section is empty.
Variables ¶
var LimitType_name = map[int32]string{
0: "LIMIT_TYPE_NONE",
1: "CONCURRENT",
2: "THROTTLE",
3: "QUOTA",
}
var LimitType_value = map[string]int32{
"LIMIT_TYPE_NONE": 0,
"CONCURRENT": 1,
"THROTTLE": 2,
"QUOTA": 3,
}
var PeriodBucketType_name = map[int32]string{
0: "PERIOD_BUCKET_NONE",
1: "SECOND",
2: "MINUTE",
3: "HOUR",
4: "DAY",
5: "MONTH",
6: "YEAR",
}
var PeriodBucketType_value = map[string]int32{
"PERIOD_BUCKET_NONE": 0,
"SECOND": 1,
"MINUTE": 2,
"HOUR": 3,
"DAY": 4,
"MONTH": 5,
"YEAR": 6,
}
Functions ¶
func RegisterOsirisServer ¶
func RegisterOsirisServer(s *grpc.Server, srv OsirisServer)
func ValidateLimit ¶
ValidateLimit will validate a given Limit.
func ValidateLimits ¶
func ValidateLimits(limits *LimitsByKey) error
ValidateLimits will validate a given set of Limits.
Types ¶
type Limit ¶
type Limit struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Type LimitType `protobuf:"varint,2,opt,name=type,proto3,enum=schema.LimitType" json:"type,omitempty"` Limit *wrappers.Int64Value `protobuf:"bytes,3,opt,name=limit,proto3" json:"limit,omitempty"` Expires *wrappers.Int64Value `protobuf:"bytes,4,opt,name=expires,proto3" json:"expires,omitempty"` Refresh *wrappers.Int64Value `protobuf:"bytes,5,opt,name=refresh,proto3" json:"refresh,omitempty"` Rate *wrappers.Int64Value `protobuf:"bytes,6,opt,name=rate,proto3" json:"rate,omitempty"` MaxBurst *wrappers.Int64Value `protobuf:"bytes,7,opt,name=max_burst,proto3" json:"max_burst,omitempty"` PeriodBucket PeriodBucketType `protobuf:"varint,8,opt,name=period_bucket,proto3,enum=schema.PeriodBucketType" json:"period_bucket,omitempty"` Resource *wrappers.StringValue `protobuf:"bytes,9,opt,name=resource,proto3" json:"resource,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Limit) Descriptor ¶
func (*Limit) GetExpires ¶
func (m *Limit) GetExpires() *wrappers.Int64Value
func (*Limit) GetLimit ¶
func (m *Limit) GetLimit() *wrappers.Int64Value
func (*Limit) GetMaxBurst ¶
func (m *Limit) GetMaxBurst() *wrappers.Int64Value
func (*Limit) GetPeriodBucket ¶
func (m *Limit) GetPeriodBucket() PeriodBucketType
func (*Limit) GetRate ¶
func (m *Limit) GetRate() *wrappers.Int64Value
func (*Limit) GetRefresh ¶
func (m *Limit) GetRefresh() *wrappers.Int64Value
func (*Limit) GetResource ¶
func (m *Limit) GetResource() *wrappers.StringValue
func (*Limit) MarshalJSON ¶
MarshalJSON implements json.Marshaler
func (*Limit) ProtoMessage ¶
func (*Limit) ProtoMessage()
func (*Limit) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler
func (*Limit) XXX_DiscardUnknown ¶
func (m *Limit) XXX_DiscardUnknown()
func (*Limit) XXX_Marshal ¶
func (*Limit) XXX_Unmarshal ¶
type LimitIDs ¶
type LimitIDs struct { LimitIds []string `protobuf:"bytes,1,rep,name=limit_ids,proto3" json:"limit_ids,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*LimitIDs) Descriptor ¶
func (*LimitIDs) GetLimitIds ¶
func (*LimitIDs) MarshalJSON ¶
MarshalJSON implements json.Marshaler
func (*LimitIDs) ProtoMessage ¶
func (*LimitIDs) ProtoMessage()
func (*LimitIDs) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler
func (*LimitIDs) XXX_DiscardUnknown ¶
func (m *LimitIDs) XXX_DiscardUnknown()
func (*LimitIDs) XXX_Marshal ¶
func (*LimitIDs) XXX_Unmarshal ¶
type LimitIDsByKey ¶
type LimitIDsByKey struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` LimitIds []string `protobuf:"bytes,2,rep,name=limit_ids,proto3" json:"limit_ids,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*LimitIDsByKey) Descriptor ¶
func (*LimitIDsByKey) Descriptor() ([]byte, []int)
func (*LimitIDsByKey) GetKey ¶
func (m *LimitIDsByKey) GetKey() string
func (*LimitIDsByKey) GetLimitIds ¶
func (m *LimitIDsByKey) GetLimitIds() []string
func (*LimitIDsByKey) MarshalJSON ¶
func (msg *LimitIDsByKey) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler
func (*LimitIDsByKey) ProtoMessage ¶
func (*LimitIDsByKey) ProtoMessage()
func (*LimitIDsByKey) Reset ¶
func (m *LimitIDsByKey) Reset()
func (*LimitIDsByKey) String ¶
func (m *LimitIDsByKey) String() string
func (*LimitIDsByKey) UnmarshalJSON ¶
func (msg *LimitIDsByKey) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler
func (*LimitIDsByKey) XXX_DiscardUnknown ¶
func (m *LimitIDsByKey) XXX_DiscardUnknown()
func (*LimitIDsByKey) XXX_Marshal ¶
func (m *LimitIDsByKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LimitIDsByKey) XXX_Merge ¶
func (m *LimitIDsByKey) XXX_Merge(src proto.Message)
func (*LimitIDsByKey) XXX_Size ¶
func (m *LimitIDsByKey) XXX_Size() int
func (*LimitIDsByKey) XXX_Unmarshal ¶
func (m *LimitIDsByKey) XXX_Unmarshal(b []byte) error
type LimitIDsByKeys ¶
type LimitIDsByKeys struct { LimitIdsByKeys []*LimitIDsByKey `protobuf:"bytes,1,rep,name=limit_ids_by_keys,proto3" json:"limit_ids_by_keys,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*LimitIDsByKeys) Descriptor ¶
func (*LimitIDsByKeys) Descriptor() ([]byte, []int)
func (*LimitIDsByKeys) GetLimitIdsByKeys ¶
func (m *LimitIDsByKeys) GetLimitIdsByKeys() []*LimitIDsByKey
func (*LimitIDsByKeys) MarshalJSON ¶
func (msg *LimitIDsByKeys) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler
func (*LimitIDsByKeys) ProtoMessage ¶
func (*LimitIDsByKeys) ProtoMessage()
func (*LimitIDsByKeys) Reset ¶
func (m *LimitIDsByKeys) Reset()
func (*LimitIDsByKeys) String ¶
func (m *LimitIDsByKeys) String() string
func (*LimitIDsByKeys) UnmarshalJSON ¶
func (msg *LimitIDsByKeys) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler
func (*LimitIDsByKeys) XXX_DiscardUnknown ¶
func (m *LimitIDsByKeys) XXX_DiscardUnknown()
func (*LimitIDsByKeys) XXX_Marshal ¶
func (m *LimitIDsByKeys) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LimitIDsByKeys) XXX_Merge ¶
func (m *LimitIDsByKeys) XXX_Merge(src proto.Message)
func (*LimitIDsByKeys) XXX_Size ¶
func (m *LimitIDsByKeys) XXX_Size() int
func (*LimitIDsByKeys) XXX_Unmarshal ¶
func (m *LimitIDsByKeys) XXX_Unmarshal(b []byte) error
type Limits ¶
type Limits struct { Limits []*Limit `protobuf:"bytes,1,rep,name=limits,proto3" json:"limits,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Limits) Descriptor ¶
func (*Limits) MarshalJSON ¶
MarshalJSON implements json.Marshaler
func (*Limits) ProtoMessage ¶
func (*Limits) ProtoMessage()
func (*Limits) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler
func (*Limits) XXX_DiscardUnknown ¶
func (m *Limits) XXX_DiscardUnknown()
func (*Limits) XXX_Marshal ¶
func (*Limits) XXX_Unmarshal ¶
type LimitsByKey ¶
type LimitsByKey struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Limits []*Limit `protobuf:"bytes,2,rep,name=limits,proto3" json:"limits,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func KeyAndLimitIDsToLimitsByKey ¶
func KeyAndLimitIDsToLimitsByKey(key string, limitIDs []string) *LimitsByKey
KeyAndLimitIDsToLimitsByKey converts a key and limit IDs to a LimitsByKey.
func KeysAndLimitIDsToLimitsByKeys ¶
func KeysAndLimitIDsToLimitsByKeys(limitIDsByKey map[string][]string) []*LimitsByKey
KeysAndLimitIDsToLimitsByKeys converts a map of keys and limit IDs to a slice of LimitsByKeys.
func (*LimitsByKey) Descriptor ¶
func (*LimitsByKey) Descriptor() ([]byte, []int)
func (*LimitsByKey) GetKey ¶
func (m *LimitsByKey) GetKey() string
func (*LimitsByKey) GetLimits ¶
func (m *LimitsByKey) GetLimits() []*Limit
func (*LimitsByKey) MarshalJSON ¶
func (msg *LimitsByKey) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler
func (*LimitsByKey) ProtoMessage ¶
func (*LimitsByKey) ProtoMessage()
func (*LimitsByKey) Reset ¶
func (m *LimitsByKey) Reset()
func (*LimitsByKey) String ¶
func (m *LimitsByKey) String() string
func (*LimitsByKey) UnmarshalJSON ¶
func (msg *LimitsByKey) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler
func (*LimitsByKey) XXX_DiscardUnknown ¶
func (m *LimitsByKey) XXX_DiscardUnknown()
func (*LimitsByKey) XXX_Marshal ¶
func (m *LimitsByKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LimitsByKey) XXX_Merge ¶
func (m *LimitsByKey) XXX_Merge(src proto.Message)
func (*LimitsByKey) XXX_Size ¶
func (m *LimitsByKey) XXX_Size() int
func (*LimitsByKey) XXX_Unmarshal ¶
func (m *LimitsByKey) XXX_Unmarshal(b []byte) error
type OsirisClient ¶
type OsirisClient interface { SetLimits(ctx context.Context, in *Limits, opts ...grpc.CallOption) (*empty.Empty, error) GetLimits(ctx context.Context, in *LimitIDs, opts ...grpc.CallOption) (*Limits, error) GetLimitsAll(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*Limits, error) RemoveLimits(ctx context.Context, in *LimitIDs, opts ...grpc.CallOption) (*empty.Empty, error) RemoveLimitsAll(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error) PeekStates(ctx context.Context, in *LimitIDsByKeys, opts ...grpc.CallOption) (*StatesByKeysWithRequest, error) CheckStates(ctx context.Context, in *LimitIDsByKeys, opts ...grpc.CallOption) (*StatesByKeysWithRequest, error) FinishRequest(ctx context.Context, in *ResourcesWithRequest, opts ...grpc.CallOption) (*empty.Empty, error) }
OsirisClient is the client API for Osiris service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewOsirisClient ¶
func NewOsirisClient(cc grpc.ClientConnInterface) OsirisClient
type OsirisServer ¶
type OsirisServer interface { SetLimits(context.Context, *Limits) (*empty.Empty, error) GetLimits(context.Context, *LimitIDs) (*Limits, error) GetLimitsAll(context.Context, *empty.Empty) (*Limits, error) RemoveLimits(context.Context, *LimitIDs) (*empty.Empty, error) RemoveLimitsAll(context.Context, *empty.Empty) (*empty.Empty, error) PeekStates(context.Context, *LimitIDsByKeys) (*StatesByKeysWithRequest, error) CheckStates(context.Context, *LimitIDsByKeys) (*StatesByKeysWithRequest, error) FinishRequest(context.Context, *ResourcesWithRequest) (*empty.Empty, error) }
OsirisServer is the server API for Osiris service.
type PeriodBucketType ¶
type PeriodBucketType int32
const ( PeriodBucketType_PERIOD_BUCKET_NONE PeriodBucketType = 0 PeriodBucketType_SECOND PeriodBucketType = 1 PeriodBucketType_MINUTE PeriodBucketType = 2 PeriodBucketType_HOUR PeriodBucketType = 3 PeriodBucketType_DAY PeriodBucketType = 4 PeriodBucketType_MONTH PeriodBucketType = 5 PeriodBucketType_YEAR PeriodBucketType = 6 )
func (PeriodBucketType) EnumDescriptor ¶
func (PeriodBucketType) EnumDescriptor() ([]byte, []int)
func (PeriodBucketType) String ¶
func (x PeriodBucketType) String() string
type ResourcesWithRequest ¶
type ResourcesWithRequest struct { RequestId string `protobuf:"bytes,1,opt,name=request_id,proto3" json:"request_id,omitempty"` Resources map[string]int64 `` /* 160-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ResourcesWithRequest) Descriptor ¶
func (*ResourcesWithRequest) Descriptor() ([]byte, []int)
func (*ResourcesWithRequest) GetRequestId ¶
func (m *ResourcesWithRequest) GetRequestId() string
func (*ResourcesWithRequest) GetResources ¶
func (m *ResourcesWithRequest) GetResources() map[string]int64
func (*ResourcesWithRequest) MarshalJSON ¶
func (msg *ResourcesWithRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler
func (*ResourcesWithRequest) ProtoMessage ¶
func (*ResourcesWithRequest) ProtoMessage()
func (*ResourcesWithRequest) Reset ¶
func (m *ResourcesWithRequest) Reset()
func (*ResourcesWithRequest) String ¶
func (m *ResourcesWithRequest) String() string
func (*ResourcesWithRequest) UnmarshalJSON ¶
func (msg *ResourcesWithRequest) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler
func (*ResourcesWithRequest) XXX_DiscardUnknown ¶
func (m *ResourcesWithRequest) XXX_DiscardUnknown()
func (*ResourcesWithRequest) XXX_Marshal ¶
func (m *ResourcesWithRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ResourcesWithRequest) XXX_Merge ¶
func (m *ResourcesWithRequest) XXX_Merge(src proto.Message)
func (*ResourcesWithRequest) XXX_Size ¶
func (m *ResourcesWithRequest) XXX_Size() int
func (*ResourcesWithRequest) XXX_Unmarshal ¶
func (m *ResourcesWithRequest) XXX_Unmarshal(b []byte) error
type State ¶
type State struct { Allowed *wrappers.BoolValue `protobuf:"bytes,1,opt,name=allowed,proto3" json:"allowed,omitempty"` Limit *Limit `protobuf:"bytes,2,opt,name=limit,proto3" json:"limit,omitempty"` Used *wrappers.Int64Value `protobuf:"bytes,3,opt,name=used,proto3" json:"used,omitempty"` Remaining *wrappers.Int64Value `protobuf:"bytes,4,opt,name=remaining,proto3" json:"remaining,omitempty"` NextAvailableAt *timestamp.Timestamp `protobuf:"bytes,5,opt,name=next_available_at,proto3" json:"next_available_at,omitempty"` FullyAvailableAt *timestamp.Timestamp `protobuf:"bytes,6,opt,name=fully_available_at,proto3" json:"fully_available_at,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*State) Descriptor ¶
func (*State) GetAllowed ¶
func (*State) GetFullyAvailableAt ¶
func (*State) GetNextAvailableAt ¶
func (*State) GetRemaining ¶
func (m *State) GetRemaining() *wrappers.Int64Value
func (*State) GetUsed ¶
func (m *State) GetUsed() *wrappers.Int64Value
func (*State) MarshalJSON ¶
MarshalJSON implements json.Marshaler
func (*State) ProtoMessage ¶
func (*State) ProtoMessage()
func (*State) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler
func (*State) XXX_DiscardUnknown ¶
func (m *State) XXX_DiscardUnknown()
func (*State) XXX_Marshal ¶
func (*State) XXX_Unmarshal ¶
type StatesByKey ¶
type StatesByKey struct { Allowed *wrappers.BoolValue `protobuf:"bytes,1,opt,name=allowed,proto3" json:"allowed,omitempty"` Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` States []*State `protobuf:"bytes,3,rep,name=states,proto3" json:"states,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*StatesByKey) Descriptor ¶
func (*StatesByKey) Descriptor() ([]byte, []int)
func (*StatesByKey) GetAllowed ¶
func (m *StatesByKey) GetAllowed() *wrappers.BoolValue
func (*StatesByKey) GetKey ¶
func (m *StatesByKey) GetKey() string
func (*StatesByKey) GetStates ¶
func (m *StatesByKey) GetStates() []*State
func (*StatesByKey) MarshalJSON ¶
func (msg *StatesByKey) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler
func (*StatesByKey) ProtoMessage ¶
func (*StatesByKey) ProtoMessage()
func (*StatesByKey) Reset ¶
func (m *StatesByKey) Reset()
func (*StatesByKey) String ¶
func (m *StatesByKey) String() string
func (*StatesByKey) UnmarshalJSON ¶
func (msg *StatesByKey) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler
func (*StatesByKey) XXX_DiscardUnknown ¶
func (m *StatesByKey) XXX_DiscardUnknown()
func (*StatesByKey) XXX_Marshal ¶
func (m *StatesByKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*StatesByKey) XXX_Merge ¶
func (m *StatesByKey) XXX_Merge(src proto.Message)
func (*StatesByKey) XXX_Size ¶
func (m *StatesByKey) XXX_Size() int
func (*StatesByKey) XXX_Unmarshal ¶
func (m *StatesByKey) XXX_Unmarshal(b []byte) error
type StatesByKeysWithRequest ¶
type StatesByKeysWithRequest struct { Allowed *wrappers.BoolValue `protobuf:"bytes,1,opt,name=allowed,proto3" json:"allowed,omitempty"` RequestId string `protobuf:"bytes,2,opt,name=request_id,proto3" json:"request_id,omitempty"` StatesByKeys []*StatesByKey `protobuf:"bytes,3,rep,name=states_by_keys,proto3" json:"states_by_keys,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*StatesByKeysWithRequest) Descriptor ¶
func (*StatesByKeysWithRequest) Descriptor() ([]byte, []int)
func (*StatesByKeysWithRequest) GetAllowed ¶
func (m *StatesByKeysWithRequest) GetAllowed() *wrappers.BoolValue
func (*StatesByKeysWithRequest) GetRequestId ¶
func (m *StatesByKeysWithRequest) GetRequestId() string
func (*StatesByKeysWithRequest) GetStatesByKeys ¶
func (m *StatesByKeysWithRequest) GetStatesByKeys() []*StatesByKey
func (*StatesByKeysWithRequest) MarshalJSON ¶
func (msg *StatesByKeysWithRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler
func (*StatesByKeysWithRequest) ProtoMessage ¶
func (*StatesByKeysWithRequest) ProtoMessage()
func (*StatesByKeysWithRequest) Reset ¶
func (m *StatesByKeysWithRequest) Reset()
func (*StatesByKeysWithRequest) String ¶
func (m *StatesByKeysWithRequest) String() string
func (*StatesByKeysWithRequest) UnmarshalJSON ¶
func (msg *StatesByKeysWithRequest) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler
func (*StatesByKeysWithRequest) XXX_DiscardUnknown ¶
func (m *StatesByKeysWithRequest) XXX_DiscardUnknown()
func (*StatesByKeysWithRequest) XXX_Marshal ¶
func (m *StatesByKeysWithRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*StatesByKeysWithRequest) XXX_Merge ¶
func (m *StatesByKeysWithRequest) XXX_Merge(src proto.Message)
func (*StatesByKeysWithRequest) XXX_Size ¶
func (m *StatesByKeysWithRequest) XXX_Size() int
func (*StatesByKeysWithRequest) XXX_Unmarshal ¶
func (m *StatesByKeysWithRequest) XXX_Unmarshal(b []byte) error
type UnimplementedOsirisServer ¶
type UnimplementedOsirisServer struct { }
UnimplementedOsirisServer can be embedded to have forward compatible implementations.
func (*UnimplementedOsirisServer) CheckStates ¶
func (*UnimplementedOsirisServer) CheckStates(ctx context.Context, req *LimitIDsByKeys) (*StatesByKeysWithRequest, error)
func (*UnimplementedOsirisServer) FinishRequest ¶
func (*UnimplementedOsirisServer) FinishRequest(ctx context.Context, req *ResourcesWithRequest) (*empty.Empty, error)
func (*UnimplementedOsirisServer) GetLimitsAll ¶
func (*UnimplementedOsirisServer) PeekStates ¶
func (*UnimplementedOsirisServer) PeekStates(ctx context.Context, req *LimitIDsByKeys) (*StatesByKeysWithRequest, error)