Files
go-grpc/dev/dev.pb.go

370 lines
13 KiB
Go

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.1
// protoc v3.21.12
// source: dev.proto
package dev
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type APIValidationRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Service string `protobuf:"bytes,1,opt,name=Service,proto3" json:"Service,omitempty"`
Permission string `protobuf:"bytes,2,opt,name=Permission,proto3" json:"Permission,omitempty"`
Key string `protobuf:"bytes,3,opt,name=Key,proto3" json:"Key,omitempty"`
IP string `protobuf:"bytes,4,opt,name=IP,proto3" json:"IP,omitempty"`
Resource string `protobuf:"bytes,5,opt,name=Resource,proto3" json:"Resource,omitempty"`
}
func (x *APIValidationRequest) Reset() {
*x = APIValidationRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_dev_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *APIValidationRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*APIValidationRequest) ProtoMessage() {}
func (x *APIValidationRequest) ProtoReflect() protoreflect.Message {
mi := &file_dev_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use APIValidationRequest.ProtoReflect.Descriptor instead.
func (*APIValidationRequest) Descriptor() ([]byte, []int) {
return file_dev_proto_rawDescGZIP(), []int{0}
}
func (x *APIValidationRequest) GetService() string {
if x != nil {
return x.Service
}
return ""
}
func (x *APIValidationRequest) GetPermission() string {
if x != nil {
return x.Permission
}
return ""
}
func (x *APIValidationRequest) GetKey() string {
if x != nil {
return x.Key
}
return ""
}
func (x *APIValidationRequest) GetIP() string {
if x != nil {
return x.IP
}
return ""
}
func (x *APIValidationRequest) GetResource() string {
if x != nil {
return x.Resource
}
return ""
}
type APIValidationResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Response
Valid bool `protobuf:"varint,1,opt,name=Valid,proto3" json:"Valid,omitempty"`
ErrorMessage string `protobuf:"bytes,2,opt,name=ErrorMessage,proto3" json:"ErrorMessage,omitempty"`
StatusCode int32 `protobuf:"varint,3,opt,name=StatusCode,proto3" json:"StatusCode,omitempty"`
// Remaining limits
RemainingBurst uint64 `protobuf:"varint,4,opt,name=RemainingBurst,proto3" json:"RemainingBurst,omitempty"`
RemainingDaily uint64 `protobuf:"varint,5,opt,name=RemainingDaily,proto3" json:"RemainingDaily,omitempty"`
RemainingMonthly uint64 `protobuf:"varint,6,opt,name=RemainingMonthly,proto3" json:"RemainingMonthly,omitempty"`
// Quota
BurstLimit uint64 `protobuf:"varint,7,opt,name=BurstLimit,proto3" json:"BurstLimit,omitempty"`
BurstDurationSeconds uint64 `protobuf:"varint,8,opt,name=BurstDurationSeconds,proto3" json:"BurstDurationSeconds,omitempty"`
DailyLimit uint64 `protobuf:"varint,9,opt,name=DailyLimit,proto3" json:"DailyLimit,omitempty"`
MonthlyLimit uint64 `protobuf:"varint,10,opt,name=MonthlyLimit,proto3" json:"MonthlyLimit,omitempty"`
// Owner info
UserID uint64 `protobuf:"varint,11,opt,name=UserID,proto3" json:"UserID,omitempty"`
Application string `protobuf:"bytes,12,opt,name=Application,proto3" json:"Application,omitempty"`
}
func (x *APIValidationResponse) Reset() {
*x = APIValidationResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_dev_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *APIValidationResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*APIValidationResponse) ProtoMessage() {}
func (x *APIValidationResponse) ProtoReflect() protoreflect.Message {
mi := &file_dev_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use APIValidationResponse.ProtoReflect.Descriptor instead.
func (*APIValidationResponse) Descriptor() ([]byte, []int) {
return file_dev_proto_rawDescGZIP(), []int{1}
}
func (x *APIValidationResponse) GetValid() bool {
if x != nil {
return x.Valid
}
return false
}
func (x *APIValidationResponse) GetErrorMessage() string {
if x != nil {
return x.ErrorMessage
}
return ""
}
func (x *APIValidationResponse) GetStatusCode() int32 {
if x != nil {
return x.StatusCode
}
return 0
}
func (x *APIValidationResponse) GetRemainingBurst() uint64 {
if x != nil {
return x.RemainingBurst
}
return 0
}
func (x *APIValidationResponse) GetRemainingDaily() uint64 {
if x != nil {
return x.RemainingDaily
}
return 0
}
func (x *APIValidationResponse) GetRemainingMonthly() uint64 {
if x != nil {
return x.RemainingMonthly
}
return 0
}
func (x *APIValidationResponse) GetBurstLimit() uint64 {
if x != nil {
return x.BurstLimit
}
return 0
}
func (x *APIValidationResponse) GetBurstDurationSeconds() uint64 {
if x != nil {
return x.BurstDurationSeconds
}
return 0
}
func (x *APIValidationResponse) GetDailyLimit() uint64 {
if x != nil {
return x.DailyLimit
}
return 0
}
func (x *APIValidationResponse) GetMonthlyLimit() uint64 {
if x != nil {
return x.MonthlyLimit
}
return 0
}
func (x *APIValidationResponse) GetUserID() uint64 {
if x != nil {
return x.UserID
}
return 0
}
func (x *APIValidationResponse) GetApplication() string {
if x != nil {
return x.Application
}
return ""
}
var File_dev_proto protoreflect.FileDescriptor
var file_dev_proto_rawDesc = []byte{
0x0a, 0x09, 0x64, 0x65, 0x76, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x64, 0x65, 0x76,
0x22, 0x8e, 0x01, 0x0a, 0x14, 0x41, 0x50, 0x49, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x53, 0x65, 0x72,
0x76, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x53, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f,
0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73,
0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
0x52, 0x03, 0x4b, 0x65, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x50, 0x18, 0x04, 0x20, 0x01, 0x28,
0x09, 0x52, 0x02, 0x49, 0x50, 0x12, 0x1a, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
0x65, 0x22, 0xbf, 0x03, 0x0a, 0x15, 0x41, 0x50, 0x49, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x56,
0x61, 0x6c, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x56, 0x61, 0x6c, 0x69,
0x64, 0x12, 0x22, 0x0a, 0x0c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43,
0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x75,
0x73, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x52, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69,
0x6e, 0x67, 0x42, 0x75, 0x72, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x52,
0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x72, 0x73, 0x74, 0x12, 0x26, 0x0a,
0x0e, 0x52, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x44, 0x61, 0x69, 0x6c, 0x79, 0x18,
0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x52, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67,
0x44, 0x61, 0x69, 0x6c, 0x79, 0x12, 0x2a, 0x0a, 0x10, 0x52, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69,
0x6e, 0x67, 0x4d, 0x6f, 0x6e, 0x74, 0x68, 0x6c, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52,
0x10, 0x52, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x6e, 0x74, 0x68, 0x6c,
0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x42, 0x75, 0x72, 0x73, 0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x18,
0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x42, 0x75, 0x72, 0x73, 0x74, 0x4c, 0x69, 0x6d, 0x69,
0x74, 0x12, 0x32, 0x0a, 0x14, 0x42, 0x75, 0x72, 0x73, 0x74, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52,
0x14, 0x42, 0x75, 0x72, 0x73, 0x74, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65,
0x63, 0x6f, 0x6e, 0x64, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x44, 0x61, 0x69, 0x6c, 0x79, 0x4c, 0x69,
0x6d, 0x69, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x44, 0x61, 0x69, 0x6c, 0x79,
0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x4d, 0x6f, 0x6e, 0x74, 0x68, 0x6c, 0x79,
0x4c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x4d, 0x6f, 0x6e,
0x74, 0x68, 0x6c, 0x79, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x55, 0x73, 0x65,
0x72, 0x49, 0x44, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49,
0x44, 0x12, 0x20, 0x0a, 0x0b, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x32, 0x4f, 0x0a, 0x0a, 0x44, 0x65, 0x76, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
0x65, 0x12, 0x41, 0x0a, 0x08, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x12, 0x19, 0x2e,
0x64, 0x65, 0x76, 0x2e, 0x41, 0x50, 0x49, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x41,
0x50, 0x49, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x42, 0x26, 0x5a, 0x24, 0x67, 0x69, 0x74, 0x2e, 0x69, 0x74, 0x7a, 0x61,
0x6e, 0x61, 0x2e, 0x6d, 0x65, 0x2f, 0x73, 0x74, 0x72, 0x61, 0x66, 0x65, 0x73, 0x6e, 0x65, 0x74,
0x2f, 0x67, 0x6f, 0x2d, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x64, 0x65, 0x76, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
}
var (
file_dev_proto_rawDescOnce sync.Once
file_dev_proto_rawDescData = file_dev_proto_rawDesc
)
func file_dev_proto_rawDescGZIP() []byte {
file_dev_proto_rawDescOnce.Do(func() {
file_dev_proto_rawDescData = protoimpl.X.CompressGZIP(file_dev_proto_rawDescData)
})
return file_dev_proto_rawDescData
}
var file_dev_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_dev_proto_goTypes = []interface{}{
(*APIValidationRequest)(nil), // 0: dev.APIValidationRequest
(*APIValidationResponse)(nil), // 1: dev.APIValidationResponse
}
var file_dev_proto_depIdxs = []int32{
0, // 0: dev.DevService.Validate:input_type -> dev.APIValidationRequest
1, // 1: dev.DevService.Validate:output_type -> dev.APIValidationResponse
1, // [1:2] is the sub-list for method output_type
0, // [0:1] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_dev_proto_init() }
func file_dev_proto_init() {
if File_dev_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_dev_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*APIValidationRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_dev_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*APIValidationResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_dev_proto_rawDesc,
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_dev_proto_goTypes,
DependencyIndexes: file_dev_proto_depIdxs,
MessageInfos: file_dev_proto_msgTypes,
}.Build()
File_dev_proto = out.File
file_dev_proto_rawDesc = nil
file_dev_proto_goTypes = nil
file_dev_proto_depIdxs = nil
}