Documentation ¶
Index ¶
- Variables
- func NewUsageEndpoints() []*api.Endpoint
- func RegisterUsageHandler(s server.Server, hdlr UsageHandler, opts ...server.HandlerOption) error
- type APIRankItem
- func (*APIRankItem) Descriptor() ([]byte, []int)deprecated
- func (x *APIRankItem) GetApiDisplayName() string
- func (x *APIRankItem) GetApiName() string
- func (x *APIRankItem) GetPopularity() int32
- func (x *APIRankItem) GetPosition() int32
- func (x *APIRankItem) GetTopUsers() []*APIRankUserItem
- func (*APIRankItem) ProtoMessage()
- func (x *APIRankItem) ProtoReflect() protoreflect.Message
- func (x *APIRankItem) Reset()
- func (x *APIRankItem) String() string
- type APIRankUserItem
- func (*APIRankUserItem) Descriptor() ([]byte, []int)deprecated
- func (x *APIRankUserItem) GetPosition() int32
- func (x *APIRankUserItem) GetUserName() string
- func (*APIRankUserItem) ProtoMessage()
- func (x *APIRankUserItem) ProtoReflect() protoreflect.Message
- func (x *APIRankUserItem) Reset()
- func (x *APIRankUserItem) String() string
- type DeleteCustomerRequest
- func (*DeleteCustomerRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteCustomerRequest) GetId() string
- func (*DeleteCustomerRequest) ProtoMessage()
- func (x *DeleteCustomerRequest) ProtoReflect() protoreflect.Message
- func (x *DeleteCustomerRequest) Reset()
- func (x *DeleteCustomerRequest) String() string
- type DeleteCustomerResponse
- type Event
- func (*Event) Descriptor() ([]byte, []int)deprecated
- func (x *Event) GetCreated() int64
- func (x *Event) GetId() string
- func (x *Event) GetRecord() *structpb.Struct
- func (x *Event) GetTable() string
- func (*Event) ProtoMessage()
- func (x *Event) ProtoReflect() protoreflect.Message
- func (x *Event) Reset()
- func (x *Event) String() string
- type ListAPIRanksRequest
- type ListAPIRanksResponse
- func (*ListAPIRanksResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListAPIRanksResponse) GetGlobalTopUsers() []*APIRankUserItem
- func (x *ListAPIRanksResponse) GetRanks() []*APIRankItem
- func (*ListAPIRanksResponse) ProtoMessage()
- func (x *ListAPIRanksResponse) ProtoReflect() protoreflect.Message
- func (x *ListAPIRanksResponse) Reset()
- func (x *ListAPIRanksResponse) String() string
- type ListEventsRequest
- type ListEventsResponse
- func (*ListEventsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListEventsResponse) GetEvents() []*Event
- func (*ListEventsResponse) ProtoMessage()
- func (x *ListEventsResponse) ProtoReflect() protoreflect.Message
- func (x *ListEventsResponse) Reset()
- func (x *ListEventsResponse) String() string
- type ReadMonthlyRequest
- func (*ReadMonthlyRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ReadMonthlyRequest) GetCustomerId() string
- func (x *ReadMonthlyRequest) GetEndpoints() []string
- func (*ReadMonthlyRequest) ProtoMessage()
- func (x *ReadMonthlyRequest) ProtoReflect() protoreflect.Message
- func (x *ReadMonthlyRequest) Reset()
- func (x *ReadMonthlyRequest) String() string
- type ReadMonthlyResponse
- func (*ReadMonthlyResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ReadMonthlyResponse) GetCapUsage() map[string]int64
- func (x *ReadMonthlyResponse) GetCaps() map[string]int64
- func (x *ReadMonthlyResponse) GetQuotas() map[string]int64
- func (x *ReadMonthlyResponse) GetRequests() map[string]int64
- func (*ReadMonthlyResponse) ProtoMessage()
- func (x *ReadMonthlyResponse) ProtoReflect() protoreflect.Message
- func (x *ReadMonthlyResponse) Reset()
- func (x *ReadMonthlyResponse) String() string
- type ReadMonthlyTotalRequest
- func (*ReadMonthlyTotalRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ReadMonthlyTotalRequest) GetCustomerId() string
- func (x *ReadMonthlyTotalRequest) GetDetail() bool
- func (*ReadMonthlyTotalRequest) ProtoMessage()
- func (x *ReadMonthlyTotalRequest) ProtoReflect() protoreflect.Message
- func (x *ReadMonthlyTotalRequest) Reset()
- func (x *ReadMonthlyTotalRequest) String() string
- type ReadMonthlyTotalResponse
- func (*ReadMonthlyTotalResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ReadMonthlyTotalResponse) GetEndpointRequests() map[string]int64
- func (x *ReadMonthlyTotalResponse) GetRequests() int64
- func (*ReadMonthlyTotalResponse) ProtoMessage()
- func (x *ReadMonthlyTotalResponse) ProtoReflect() protoreflect.Message
- func (x *ReadMonthlyTotalResponse) Reset()
- func (x *ReadMonthlyTotalResponse) String() string
- type ReadRequest
- func (*ReadRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ReadRequest) GetCustomerId() string
- func (x *ReadRequest) GetDetail() bool
- func (*ReadRequest) ProtoMessage()
- func (x *ReadRequest) ProtoReflect() protoreflect.Message
- func (x *ReadRequest) Reset()
- func (x *ReadRequest) String() string
- type ReadResponse
- func (*ReadResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ReadResponse) GetQuotaRemaining() int64
- func (x *ReadResponse) GetUsage() map[string]*UsageHistory
- func (*ReadResponse) ProtoMessage()
- func (x *ReadResponse) ProtoReflect() protoreflect.Message
- func (x *ReadResponse) Reset()
- func (x *ReadResponse) String() string
- type SaveEventRequest
- type SaveEventResponse
- type SweepRequest
- type SweepResponse
- type UsageHandler
- type UsageHistory
- func (*UsageHistory) Descriptor() ([]byte, []int)deprecated
- func (x *UsageHistory) GetApiName() string
- func (x *UsageHistory) GetRecords() []*UsageRecord
- func (*UsageHistory) ProtoMessage()
- func (x *UsageHistory) ProtoReflect() protoreflect.Message
- func (x *UsageHistory) Reset()
- func (x *UsageHistory) String() string
- type UsageRecord
- type UsageService
Constants ¶
This section is empty.
Variables ¶
var File_proto_usage_proto protoreflect.FileDescriptor
Functions ¶
func NewUsageEndpoints ¶
func RegisterUsageHandler ¶
func RegisterUsageHandler(s server.Server, hdlr UsageHandler, opts ...server.HandlerOption) error
Types ¶
type APIRankItem ¶
type APIRankItem struct { ApiName string `protobuf:"bytes,1,opt,name=api_name,json=apiName,proto3" json:"api_name,omitempty"` Position int32 `protobuf:"varint,2,opt,name=position,proto3" json:"position,omitempty"` TopUsers []*APIRankUserItem `protobuf:"bytes,3,rep,name=top_users,json=topUsers,proto3" json:"top_users,omitempty"` // popularity is a 1-10 rating of how much usage this API is getting Popularity int32 `protobuf:"varint,4,opt,name=popularity,proto3" json:"popularity,omitempty"` ApiDisplayName string `protobuf:"bytes,5,opt,name=api_display_name,json=apiDisplayName,proto3" json:"api_display_name,omitempty"` // contains filtered or unexported fields }
func (*APIRankItem) Descriptor
deprecated
func (*APIRankItem) Descriptor() ([]byte, []int)
Deprecated: Use APIRankItem.ProtoReflect.Descriptor instead.
func (*APIRankItem) GetApiDisplayName ¶
func (x *APIRankItem) GetApiDisplayName() string
func (*APIRankItem) GetApiName ¶
func (x *APIRankItem) GetApiName() string
func (*APIRankItem) GetPopularity ¶
func (x *APIRankItem) GetPopularity() int32
func (*APIRankItem) GetPosition ¶
func (x *APIRankItem) GetPosition() int32
func (*APIRankItem) GetTopUsers ¶
func (x *APIRankItem) GetTopUsers() []*APIRankUserItem
func (*APIRankItem) ProtoMessage ¶
func (*APIRankItem) ProtoMessage()
func (*APIRankItem) ProtoReflect ¶
func (x *APIRankItem) ProtoReflect() protoreflect.Message
func (*APIRankItem) Reset ¶
func (x *APIRankItem) Reset()
func (*APIRankItem) String ¶
func (x *APIRankItem) String() string
type APIRankUserItem ¶
type APIRankUserItem struct { UserName string `protobuf:"bytes,1,opt,name=user_name,json=userName,proto3" json:"user_name,omitempty"` Position int32 `protobuf:"varint,2,opt,name=position,proto3" json:"position,omitempty"` // contains filtered or unexported fields }
func (*APIRankUserItem) Descriptor
deprecated
func (*APIRankUserItem) Descriptor() ([]byte, []int)
Deprecated: Use APIRankUserItem.ProtoReflect.Descriptor instead.
func (*APIRankUserItem) GetPosition ¶
func (x *APIRankUserItem) GetPosition() int32
func (*APIRankUserItem) GetUserName ¶
func (x *APIRankUserItem) GetUserName() string
func (*APIRankUserItem) ProtoMessage ¶
func (*APIRankUserItem) ProtoMessage()
func (*APIRankUserItem) ProtoReflect ¶
func (x *APIRankUserItem) ProtoReflect() protoreflect.Message
func (*APIRankUserItem) Reset ¶
func (x *APIRankUserItem) Reset()
func (*APIRankUserItem) String ¶
func (x *APIRankUserItem) String() string
type DeleteCustomerRequest ¶
type DeleteCustomerRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*DeleteCustomerRequest) Descriptor
deprecated
func (*DeleteCustomerRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteCustomerRequest.ProtoReflect.Descriptor instead.
func (*DeleteCustomerRequest) GetId ¶
func (x *DeleteCustomerRequest) GetId() string
func (*DeleteCustomerRequest) ProtoMessage ¶
func (*DeleteCustomerRequest) ProtoMessage()
func (*DeleteCustomerRequest) ProtoReflect ¶
func (x *DeleteCustomerRequest) ProtoReflect() protoreflect.Message
func (*DeleteCustomerRequest) Reset ¶
func (x *DeleteCustomerRequest) Reset()
func (*DeleteCustomerRequest) String ¶
func (x *DeleteCustomerRequest) String() string
type DeleteCustomerResponse ¶
type DeleteCustomerResponse struct {
// contains filtered or unexported fields
}
func (*DeleteCustomerResponse) Descriptor
deprecated
func (*DeleteCustomerResponse) Descriptor() ([]byte, []int)
Deprecated: Use DeleteCustomerResponse.ProtoReflect.Descriptor instead.
func (*DeleteCustomerResponse) ProtoMessage ¶
func (*DeleteCustomerResponse) ProtoMessage()
func (*DeleteCustomerResponse) ProtoReflect ¶
func (x *DeleteCustomerResponse) ProtoReflect() protoreflect.Message
func (*DeleteCustomerResponse) Reset ¶
func (x *DeleteCustomerResponse) Reset()
func (*DeleteCustomerResponse) String ¶
func (x *DeleteCustomerResponse) String() string
type Event ¶
type Event struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Table string `protobuf:"bytes,2,opt,name=table,proto3" json:"table,omitempty"` Created int64 `protobuf:"varint,3,opt,name=created,proto3" json:"created,omitempty"` Record *structpb.Struct `protobuf:"bytes,4,opt,name=record,proto3" json:"record,omitempty"` // contains filtered or unexported fields }
func (*Event) Descriptor
deprecated
func (*Event) GetCreated ¶
func (*Event) ProtoMessage ¶
func (*Event) ProtoMessage()
func (*Event) ProtoReflect ¶
func (x *Event) ProtoReflect() protoreflect.Message
type ListAPIRanksRequest ¶
type ListAPIRanksRequest struct {
// contains filtered or unexported fields
}
func (*ListAPIRanksRequest) Descriptor
deprecated
func (*ListAPIRanksRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListAPIRanksRequest.ProtoReflect.Descriptor instead.
func (*ListAPIRanksRequest) ProtoMessage ¶
func (*ListAPIRanksRequest) ProtoMessage()
func (*ListAPIRanksRequest) ProtoReflect ¶
func (x *ListAPIRanksRequest) ProtoReflect() protoreflect.Message
func (*ListAPIRanksRequest) Reset ¶
func (x *ListAPIRanksRequest) Reset()
func (*ListAPIRanksRequest) String ¶
func (x *ListAPIRanksRequest) String() string
type ListAPIRanksResponse ¶
type ListAPIRanksResponse struct { Ranks []*APIRankItem `protobuf:"bytes,1,rep,name=ranks,proto3" json:"ranks,omitempty"` GlobalTopUsers []*APIRankUserItem `protobuf:"bytes,3,rep,name=global_top_users,json=globalTopUsers,proto3" json:"global_top_users,omitempty"` // contains filtered or unexported fields }
func (*ListAPIRanksResponse) Descriptor
deprecated
func (*ListAPIRanksResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListAPIRanksResponse.ProtoReflect.Descriptor instead.
func (*ListAPIRanksResponse) GetGlobalTopUsers ¶
func (x *ListAPIRanksResponse) GetGlobalTopUsers() []*APIRankUserItem
func (*ListAPIRanksResponse) GetRanks ¶
func (x *ListAPIRanksResponse) GetRanks() []*APIRankItem
func (*ListAPIRanksResponse) ProtoMessage ¶
func (*ListAPIRanksResponse) ProtoMessage()
func (*ListAPIRanksResponse) ProtoReflect ¶
func (x *ListAPIRanksResponse) ProtoReflect() protoreflect.Message
func (*ListAPIRanksResponse) Reset ¶
func (x *ListAPIRanksResponse) Reset()
func (*ListAPIRanksResponse) String ¶
func (x *ListAPIRanksResponse) String() string
type ListEventsRequest ¶
type ListEventsRequest struct { Table string `protobuf:"bytes,1,opt,name=table,proto3" json:"table,omitempty"` // contains filtered or unexported fields }
Will return the last 20 events. No paging currently
func (*ListEventsRequest) Descriptor
deprecated
func (*ListEventsRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListEventsRequest.ProtoReflect.Descriptor instead.
func (*ListEventsRequest) GetTable ¶
func (x *ListEventsRequest) GetTable() string
func (*ListEventsRequest) ProtoMessage ¶
func (*ListEventsRequest) ProtoMessage()
func (*ListEventsRequest) ProtoReflect ¶
func (x *ListEventsRequest) ProtoReflect() protoreflect.Message
func (*ListEventsRequest) Reset ¶
func (x *ListEventsRequest) Reset()
func (*ListEventsRequest) String ¶
func (x *ListEventsRequest) String() string
type ListEventsResponse ¶
type ListEventsResponse struct { Events []*Event `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"` // contains filtered or unexported fields }
func (*ListEventsResponse) Descriptor
deprecated
func (*ListEventsResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListEventsResponse.ProtoReflect.Descriptor instead.
func (*ListEventsResponse) GetEvents ¶
func (x *ListEventsResponse) GetEvents() []*Event
func (*ListEventsResponse) ProtoMessage ¶
func (*ListEventsResponse) ProtoMessage()
func (*ListEventsResponse) ProtoReflect ¶
func (x *ListEventsResponse) ProtoReflect() protoreflect.Message
func (*ListEventsResponse) Reset ¶
func (x *ListEventsResponse) Reset()
func (*ListEventsResponse) String ¶
func (x *ListEventsResponse) String() string
type ReadMonthlyRequest ¶
type ReadMonthlyRequest struct { CustomerId string `protobuf:"bytes,1,opt,name=customer_id,json=customerId,proto3" json:"customer_id,omitempty"` Endpoints []string `protobuf:"bytes,2,rep,name=endpoints,proto3" json:"endpoints,omitempty"` // contains filtered or unexported fields }
func (*ReadMonthlyRequest) Descriptor
deprecated
func (*ReadMonthlyRequest) Descriptor() ([]byte, []int)
Deprecated: Use ReadMonthlyRequest.ProtoReflect.Descriptor instead.
func (*ReadMonthlyRequest) GetCustomerId ¶
func (x *ReadMonthlyRequest) GetCustomerId() string
func (*ReadMonthlyRequest) GetEndpoints ¶
func (x *ReadMonthlyRequest) GetEndpoints() []string
func (*ReadMonthlyRequest) ProtoMessage ¶
func (*ReadMonthlyRequest) ProtoMessage()
func (*ReadMonthlyRequest) ProtoReflect ¶
func (x *ReadMonthlyRequest) ProtoReflect() protoreflect.Message
func (*ReadMonthlyRequest) Reset ¶
func (x *ReadMonthlyRequest) Reset()
func (*ReadMonthlyRequest) String ¶
func (x *ReadMonthlyRequest) String() string
type ReadMonthlyResponse ¶
type ReadMonthlyResponse struct { Requests map[string]int64 `` // actual number of requests for each endpoint /* 158-byte string literal not displayed */ Quotas map[string]int64 `` // how many requests they can do in a month for each endpoint /* 154-byte string literal not displayed */ Caps map[string]int64 `` // usage caps for each endpoint /* 150-byte string literal not displayed */ CapUsage map[string]int64 `` // how much of the usage cap has been used per endpoint /* 174-byte string literal not displayed */ // contains filtered or unexported fields }
func (*ReadMonthlyResponse) Descriptor
deprecated
func (*ReadMonthlyResponse) Descriptor() ([]byte, []int)
Deprecated: Use ReadMonthlyResponse.ProtoReflect.Descriptor instead.
func (*ReadMonthlyResponse) GetCapUsage ¶
func (x *ReadMonthlyResponse) GetCapUsage() map[string]int64
func (*ReadMonthlyResponse) GetCaps ¶
func (x *ReadMonthlyResponse) GetCaps() map[string]int64
func (*ReadMonthlyResponse) GetQuotas ¶
func (x *ReadMonthlyResponse) GetQuotas() map[string]int64
func (*ReadMonthlyResponse) GetRequests ¶
func (x *ReadMonthlyResponse) GetRequests() map[string]int64
func (*ReadMonthlyResponse) ProtoMessage ¶
func (*ReadMonthlyResponse) ProtoMessage()
func (*ReadMonthlyResponse) ProtoReflect ¶
func (x *ReadMonthlyResponse) ProtoReflect() protoreflect.Message
func (*ReadMonthlyResponse) Reset ¶
func (x *ReadMonthlyResponse) Reset()
func (*ReadMonthlyResponse) String ¶
func (x *ReadMonthlyResponse) String() string
type ReadMonthlyTotalRequest ¶
type ReadMonthlyTotalRequest struct { CustomerId string `protobuf:"bytes,1,opt,name=customer_id,json=customerId,proto3" json:"customer_id,omitempty"` Detail bool `protobuf:"varint,2,opt,name=detail,proto3" json:"detail,omitempty"` // do we want the endpoint breakdown // contains filtered or unexported fields }
func (*ReadMonthlyTotalRequest) Descriptor
deprecated
func (*ReadMonthlyTotalRequest) Descriptor() ([]byte, []int)
Deprecated: Use ReadMonthlyTotalRequest.ProtoReflect.Descriptor instead.
func (*ReadMonthlyTotalRequest) GetCustomerId ¶
func (x *ReadMonthlyTotalRequest) GetCustomerId() string
func (*ReadMonthlyTotalRequest) GetDetail ¶
func (x *ReadMonthlyTotalRequest) GetDetail() bool
func (*ReadMonthlyTotalRequest) ProtoMessage ¶
func (*ReadMonthlyTotalRequest) ProtoMessage()
func (*ReadMonthlyTotalRequest) ProtoReflect ¶
func (x *ReadMonthlyTotalRequest) ProtoReflect() protoreflect.Message
func (*ReadMonthlyTotalRequest) Reset ¶
func (x *ReadMonthlyTotalRequest) Reset()
func (*ReadMonthlyTotalRequest) String ¶
func (x *ReadMonthlyTotalRequest) String() string
type ReadMonthlyTotalResponse ¶
type ReadMonthlyTotalResponse struct { Requests int64 `protobuf:"varint,1,opt,name=requests,proto3" json:"requests,omitempty"` // total requests in the month EndpointRequests map[string]int64 `` // requests for each endpoint in the month /* 198-byte string literal not displayed */ // contains filtered or unexported fields }
func (*ReadMonthlyTotalResponse) Descriptor
deprecated
func (*ReadMonthlyTotalResponse) Descriptor() ([]byte, []int)
Deprecated: Use ReadMonthlyTotalResponse.ProtoReflect.Descriptor instead.
func (*ReadMonthlyTotalResponse) GetEndpointRequests ¶
func (x *ReadMonthlyTotalResponse) GetEndpointRequests() map[string]int64
func (*ReadMonthlyTotalResponse) GetRequests ¶
func (x *ReadMonthlyTotalResponse) GetRequests() int64
func (*ReadMonthlyTotalResponse) ProtoMessage ¶
func (*ReadMonthlyTotalResponse) ProtoMessage()
func (*ReadMonthlyTotalResponse) ProtoReflect ¶
func (x *ReadMonthlyTotalResponse) ProtoReflect() protoreflect.Message
func (*ReadMonthlyTotalResponse) Reset ¶
func (x *ReadMonthlyTotalResponse) Reset()
func (*ReadMonthlyTotalResponse) String ¶
func (x *ReadMonthlyTotalResponse) String() string
type ReadRequest ¶
type ReadRequest struct { CustomerId string `protobuf:"bytes,1,opt,name=customer_id,json=customerId,proto3" json:"customer_id,omitempty"` Detail bool `protobuf:"varint,2,opt,name=detail,proto3" json:"detail,omitempty"` // contains filtered or unexported fields }
func (*ReadRequest) Descriptor
deprecated
func (*ReadRequest) Descriptor() ([]byte, []int)
Deprecated: Use ReadRequest.ProtoReflect.Descriptor instead.
func (*ReadRequest) GetCustomerId ¶
func (x *ReadRequest) GetCustomerId() string
func (*ReadRequest) GetDetail ¶
func (x *ReadRequest) GetDetail() bool
func (*ReadRequest) ProtoMessage ¶
func (*ReadRequest) ProtoMessage()
func (*ReadRequest) ProtoReflect ¶
func (x *ReadRequest) ProtoReflect() protoreflect.Message
func (*ReadRequest) Reset ¶
func (x *ReadRequest) Reset()
func (*ReadRequest) String ¶
func (x *ReadRequest) String() string
type ReadResponse ¶
type ReadResponse struct { Usage map[string]*UsageHistory `` /* 151-byte string literal not displayed */ QuotaRemaining int64 `protobuf:"varint,2,opt,name=quota_remaining,json=quotaRemaining,proto3" json:"quota_remaining,omitempty"` // contains filtered or unexported fields }
func (*ReadResponse) Descriptor
deprecated
func (*ReadResponse) Descriptor() ([]byte, []int)
Deprecated: Use ReadResponse.ProtoReflect.Descriptor instead.
func (*ReadResponse) GetQuotaRemaining ¶
func (x *ReadResponse) GetQuotaRemaining() int64
func (*ReadResponse) GetUsage ¶
func (x *ReadResponse) GetUsage() map[string]*UsageHistory
func (*ReadResponse) ProtoMessage ¶
func (*ReadResponse) ProtoMessage()
func (*ReadResponse) ProtoReflect ¶
func (x *ReadResponse) ProtoReflect() protoreflect.Message
func (*ReadResponse) Reset ¶
func (x *ReadResponse) Reset()
func (*ReadResponse) String ¶
func (x *ReadResponse) String() string
type SaveEventRequest ¶
type SaveEventRequest struct { Event *Event `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"` // contains filtered or unexported fields }
Event is anything that we might want to record. "api-calls", "api-visits", etc. "Table" can be anything.
func (*SaveEventRequest) Descriptor
deprecated
func (*SaveEventRequest) Descriptor() ([]byte, []int)
Deprecated: Use SaveEventRequest.ProtoReflect.Descriptor instead.
func (*SaveEventRequest) GetEvent ¶
func (x *SaveEventRequest) GetEvent() *Event
func (*SaveEventRequest) ProtoMessage ¶
func (*SaveEventRequest) ProtoMessage()
func (*SaveEventRequest) ProtoReflect ¶
func (x *SaveEventRequest) ProtoReflect() protoreflect.Message
func (*SaveEventRequest) Reset ¶
func (x *SaveEventRequest) Reset()
func (*SaveEventRequest) String ¶
func (x *SaveEventRequest) String() string
type SaveEventResponse ¶
type SaveEventResponse struct {
// contains filtered or unexported fields
}
func (*SaveEventResponse) Descriptor
deprecated
func (*SaveEventResponse) Descriptor() ([]byte, []int)
Deprecated: Use SaveEventResponse.ProtoReflect.Descriptor instead.
func (*SaveEventResponse) ProtoMessage ¶
func (*SaveEventResponse) ProtoMessage()
func (*SaveEventResponse) ProtoReflect ¶
func (x *SaveEventResponse) ProtoReflect() protoreflect.Message
func (*SaveEventResponse) Reset ¶
func (x *SaveEventResponse) Reset()
func (*SaveEventResponse) String ¶
func (x *SaveEventResponse) String() string
type SweepRequest ¶
type SweepRequest struct {
// contains filtered or unexported fields
}
func (*SweepRequest) Descriptor
deprecated
func (*SweepRequest) Descriptor() ([]byte, []int)
Deprecated: Use SweepRequest.ProtoReflect.Descriptor instead.
func (*SweepRequest) ProtoMessage ¶
func (*SweepRequest) ProtoMessage()
func (*SweepRequest) ProtoReflect ¶
func (x *SweepRequest) ProtoReflect() protoreflect.Message
func (*SweepRequest) Reset ¶
func (x *SweepRequest) Reset()
func (*SweepRequest) String ¶
func (x *SweepRequest) String() string
type SweepResponse ¶
type SweepResponse struct {
// contains filtered or unexported fields
}
func (*SweepResponse) Descriptor
deprecated
func (*SweepResponse) Descriptor() ([]byte, []int)
Deprecated: Use SweepResponse.ProtoReflect.Descriptor instead.
func (*SweepResponse) ProtoMessage ¶
func (*SweepResponse) ProtoMessage()
func (*SweepResponse) ProtoReflect ¶
func (x *SweepResponse) ProtoReflect() protoreflect.Message
func (*SweepResponse) Reset ¶
func (x *SweepResponse) Reset()
func (*SweepResponse) String ¶
func (x *SweepResponse) String() string
type UsageHandler ¶
type UsageHandler interface { // Returns the usage across all APIs historically, detail response includes at endpoint level. Powers the UI Read(context.Context, *ReadRequest, *ReadResponse) error Sweep(context.Context, *SweepRequest, *SweepResponse) error DeleteCustomer(context.Context, *DeleteCustomerRequest, *DeleteCustomerResponse) error SaveEvent(context.Context, *SaveEventRequest, *SaveEventResponse) error ListEvents(context.Context, *ListEventsRequest, *ListEventsResponse) error // Returns the ranking of top 10 users for each API ListAPIRanks(context.Context, *ListAPIRanksRequest, *ListAPIRanksResponse) error // Returns the usage for this month. Detail response breaks down across all endpoints ReadMonthlyTotal(context.Context, *ReadMonthlyTotalRequest, *ReadMonthlyTotalResponse) error // Returns monthly usage per specified endpoints, used by V1 api ReadMonthly(context.Context, *ReadMonthlyRequest, *ReadMonthlyResponse) error }
type UsageHistory ¶
type UsageHistory struct { ApiName string `protobuf:"bytes,1,opt,name=api_name,json=apiName,proto3" json:"api_name,omitempty"` Records []*UsageRecord `protobuf:"bytes,2,rep,name=records,proto3" json:"records,omitempty"` // contains filtered or unexported fields }
func (*UsageHistory) Descriptor
deprecated
func (*UsageHistory) Descriptor() ([]byte, []int)
Deprecated: Use UsageHistory.ProtoReflect.Descriptor instead.
func (*UsageHistory) GetApiName ¶
func (x *UsageHistory) GetApiName() string
func (*UsageHistory) GetRecords ¶
func (x *UsageHistory) GetRecords() []*UsageRecord
func (*UsageHistory) ProtoMessage ¶
func (*UsageHistory) ProtoMessage()
func (*UsageHistory) ProtoReflect ¶
func (x *UsageHistory) ProtoReflect() protoreflect.Message
func (*UsageHistory) Reset ¶
func (x *UsageHistory) Reset()
func (*UsageHistory) String ¶
func (x *UsageHistory) String() string
type UsageRecord ¶
type UsageRecord struct { Date int64 `protobuf:"varint,1,opt,name=date,proto3" json:"date,omitempty"` Requests int64 `protobuf:"varint,2,opt,name=requests,proto3" json:"requests,omitempty"` // contains filtered or unexported fields }
func (*UsageRecord) Descriptor
deprecated
func (*UsageRecord) Descriptor() ([]byte, []int)
Deprecated: Use UsageRecord.ProtoReflect.Descriptor instead.
func (*UsageRecord) GetDate ¶
func (x *UsageRecord) GetDate() int64
func (*UsageRecord) GetRequests ¶
func (x *UsageRecord) GetRequests() int64
func (*UsageRecord) ProtoMessage ¶
func (*UsageRecord) ProtoMessage()
func (*UsageRecord) ProtoReflect ¶
func (x *UsageRecord) ProtoReflect() protoreflect.Message
func (*UsageRecord) Reset ¶
func (x *UsageRecord) Reset()
func (*UsageRecord) String ¶
func (x *UsageRecord) String() string
type UsageService ¶
type UsageService interface { // Returns the usage across all APIs historically, detail response includes at endpoint level. Powers the UI Read(ctx context.Context, in *ReadRequest, opts ...client.CallOption) (*ReadResponse, error) Sweep(ctx context.Context, in *SweepRequest, opts ...client.CallOption) (*SweepResponse, error) DeleteCustomer(ctx context.Context, in *DeleteCustomerRequest, opts ...client.CallOption) (*DeleteCustomerResponse, error) SaveEvent(ctx context.Context, in *SaveEventRequest, opts ...client.CallOption) (*SaveEventResponse, error) ListEvents(ctx context.Context, in *ListEventsRequest, opts ...client.CallOption) (*ListEventsResponse, error) // Returns the ranking of top 10 users for each API ListAPIRanks(ctx context.Context, in *ListAPIRanksRequest, opts ...client.CallOption) (*ListAPIRanksResponse, error) // Returns the usage for this month. Detail response breaks down across all endpoints ReadMonthlyTotal(ctx context.Context, in *ReadMonthlyTotalRequest, opts ...client.CallOption) (*ReadMonthlyTotalResponse, error) // Returns monthly usage per specified endpoints, used by V1 api ReadMonthly(ctx context.Context, in *ReadMonthlyRequest, opts ...client.CallOption) (*ReadMonthlyResponse, error) }
func NewUsageService ¶
func NewUsageService(name string, c client.Client) UsageService