Autogenerated update for ad8e4ebacf...82ca9f2b0c
This commit is contained in:
329
dev/dev.pb.go
Normal file
329
dev/dev.pb.go
Normal file
@@ -0,0 +1,329 @@
|
|||||||
|
// 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"`
|
||||||
|
}
|
||||||
|
|
||||||
|
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 ""
|
||||||
|
}
|
||||||
|
|
||||||
|
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"`
|
||||||
|
}
|
||||||
|
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
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, 0x62, 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, 0x22, 0x85, 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, 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
|
||||||
|
}
|
||||||
105
dev/dev_grpc.pb.go
Normal file
105
dev/dev_grpc.pb.go
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||||
|
// versions:
|
||||||
|
// - protoc-gen-go-grpc v1.2.0
|
||||||
|
// - protoc v3.21.12
|
||||||
|
// source: dev.proto
|
||||||
|
|
||||||
|
package dev
|
||||||
|
|
||||||
|
import (
|
||||||
|
context "context"
|
||||||
|
grpc "google.golang.org/grpc"
|
||||||
|
codes "google.golang.org/grpc/codes"
|
||||||
|
status "google.golang.org/grpc/status"
|
||||||
|
)
|
||||||
|
|
||||||
|
// This is a compile-time assertion to ensure that this generated file
|
||||||
|
// is compatible with the grpc package it is being compiled against.
|
||||||
|
// Requires gRPC-Go v1.32.0 or later.
|
||||||
|
const _ = grpc.SupportPackageIsVersion7
|
||||||
|
|
||||||
|
// DevServiceClient is the client API for DevService 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 DevServiceClient interface {
|
||||||
|
Validate(ctx context.Context, in *APIValidationRequest, opts ...grpc.CallOption) (*APIValidationResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
|
type devServiceClient struct {
|
||||||
|
cc grpc.ClientConnInterface
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewDevServiceClient(cc grpc.ClientConnInterface) DevServiceClient {
|
||||||
|
return &devServiceClient{cc}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *devServiceClient) Validate(ctx context.Context, in *APIValidationRequest, opts ...grpc.CallOption) (*APIValidationResponse, error) {
|
||||||
|
out := new(APIValidationResponse)
|
||||||
|
err := c.cc.Invoke(ctx, "/dev.DevService/Validate", in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// DevServiceServer is the server API for DevService service.
|
||||||
|
// All implementations must embed UnimplementedDevServiceServer
|
||||||
|
// for forward compatibility
|
||||||
|
type DevServiceServer interface {
|
||||||
|
Validate(context.Context, *APIValidationRequest) (*APIValidationResponse, error)
|
||||||
|
mustEmbedUnimplementedDevServiceServer()
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnimplementedDevServiceServer must be embedded to have forward compatible implementations.
|
||||||
|
type UnimplementedDevServiceServer struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func (UnimplementedDevServiceServer) Validate(context.Context, *APIValidationRequest) (*APIValidationResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method Validate not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedDevServiceServer) mustEmbedUnimplementedDevServiceServer() {}
|
||||||
|
|
||||||
|
// UnsafeDevServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||||
|
// Use of this interface is not recommended, as added methods to DevServiceServer will
|
||||||
|
// result in compilation errors.
|
||||||
|
type UnsafeDevServiceServer interface {
|
||||||
|
mustEmbedUnimplementedDevServiceServer()
|
||||||
|
}
|
||||||
|
|
||||||
|
func RegisterDevServiceServer(s grpc.ServiceRegistrar, srv DevServiceServer) {
|
||||||
|
s.RegisterService(&DevService_ServiceDesc, srv)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _DevService_Validate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(APIValidationRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(DevServiceServer).Validate(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: "/dev.DevService/Validate",
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(DevServiceServer).Validate(ctx, req.(*APIValidationRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
// DevService_ServiceDesc is the grpc.ServiceDesc for DevService service.
|
||||||
|
// It's only intended for direct use with grpc.RegisterService,
|
||||||
|
// and not to be introspected or modified (even as a copy)
|
||||||
|
var DevService_ServiceDesc = grpc.ServiceDesc{
|
||||||
|
ServiceName: "dev.DevService",
|
||||||
|
HandlerType: (*DevServiceServer)(nil),
|
||||||
|
Methods: []grpc.MethodDesc{
|
||||||
|
{
|
||||||
|
MethodName: "Validate",
|
||||||
|
Handler: _DevService_Validate_Handler,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Streams: []grpc.StreamDesc{},
|
||||||
|
Metadata: "dev.proto",
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user