401 lines
13 KiB
Go
401 lines
13 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// versions:
|
|
// protoc-gen-go v1.25.0
|
|
// protoc v3.11.4
|
|
// source: mop-auth-check.proto
|
|
|
|
package pb
|
|
|
|
import (
|
|
context "context"
|
|
proto "github.com/golang/protobuf/proto"
|
|
grpc "google.golang.org/grpc"
|
|
codes "google.golang.org/grpc/codes"
|
|
status "google.golang.org/grpc/status"
|
|
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)
|
|
)
|
|
|
|
// This is a compile-time assertion that a sufficiently up-to-date version
|
|
// of the legacy proto package is being used.
|
|
const _ = proto.ProtoPackageIsVersion4
|
|
|
|
//接口一
|
|
type CheckAuthReq struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
UserId string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId"`
|
|
ServiceName string `protobuf:"bytes,2,opt,name=serviceName,proto3" json:"serviceName"`
|
|
RelativePath string `protobuf:"bytes,3,opt,name=relativePath,proto3" json:"relativePath"`
|
|
}
|
|
|
|
func (x *CheckAuthReq) Reset() {
|
|
*x = CheckAuthReq{}
|
|
if protoimpl.UnsafeEnabled {
|
|
mi := &file_mop_auth_check_proto_msgTypes[0]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
}
|
|
|
|
func (x *CheckAuthReq) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*CheckAuthReq) ProtoMessage() {}
|
|
|
|
func (x *CheckAuthReq) ProtoReflect() protoreflect.Message {
|
|
mi := &file_mop_auth_check_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 CheckAuthReq.ProtoReflect.Descriptor instead.
|
|
func (*CheckAuthReq) Descriptor() ([]byte, []int) {
|
|
return file_mop_auth_check_proto_rawDescGZIP(), []int{0}
|
|
}
|
|
|
|
func (x *CheckAuthReq) GetUserId() string {
|
|
if x != nil {
|
|
return x.UserId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *CheckAuthReq) GetServiceName() string {
|
|
if x != nil {
|
|
return x.ServiceName
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *CheckAuthReq) GetRelativePath() string {
|
|
if x != nil {
|
|
return x.RelativePath
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type CheckAuthRsp struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
Result *CommonResult `protobuf:"bytes,1,opt,name=result,proto3" json:"result"`
|
|
Data *CheckAuthRsp_DATA `protobuf:"bytes,2,opt,name=data,proto3" json:"data"`
|
|
}
|
|
|
|
func (x *CheckAuthRsp) Reset() {
|
|
*x = CheckAuthRsp{}
|
|
if protoimpl.UnsafeEnabled {
|
|
mi := &file_mop_auth_check_proto_msgTypes[1]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
}
|
|
|
|
func (x *CheckAuthRsp) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*CheckAuthRsp) ProtoMessage() {}
|
|
|
|
func (x *CheckAuthRsp) ProtoReflect() protoreflect.Message {
|
|
mi := &file_mop_auth_check_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 CheckAuthRsp.ProtoReflect.Descriptor instead.
|
|
func (*CheckAuthRsp) Descriptor() ([]byte, []int) {
|
|
return file_mop_auth_check_proto_rawDescGZIP(), []int{1}
|
|
}
|
|
|
|
func (x *CheckAuthRsp) GetResult() *CommonResult {
|
|
if x != nil {
|
|
return x.Result
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *CheckAuthRsp) GetData() *CheckAuthRsp_DATA {
|
|
if x != nil {
|
|
return x.Data
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type CheckAuthRsp_DATA struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
HasAuthor bool `protobuf:"varint,1,opt,name=hasAuthor,proto3" json:"hasAuthor"`
|
|
}
|
|
|
|
func (x *CheckAuthRsp_DATA) Reset() {
|
|
*x = CheckAuthRsp_DATA{}
|
|
if protoimpl.UnsafeEnabled {
|
|
mi := &file_mop_auth_check_proto_msgTypes[2]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
}
|
|
|
|
func (x *CheckAuthRsp_DATA) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*CheckAuthRsp_DATA) ProtoMessage() {}
|
|
|
|
func (x *CheckAuthRsp_DATA) ProtoReflect() protoreflect.Message {
|
|
mi := &file_mop_auth_check_proto_msgTypes[2]
|
|
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 CheckAuthRsp_DATA.ProtoReflect.Descriptor instead.
|
|
func (*CheckAuthRsp_DATA) Descriptor() ([]byte, []int) {
|
|
return file_mop_auth_check_proto_rawDescGZIP(), []int{1, 0}
|
|
}
|
|
|
|
func (x *CheckAuthRsp_DATA) GetHasAuthor() bool {
|
|
if x != nil {
|
|
return x.HasAuthor
|
|
}
|
|
return false
|
|
}
|
|
|
|
var File_mop_auth_check_proto protoreflect.FileDescriptor
|
|
|
|
var file_mop_auth_check_proto_rawDesc = []byte{
|
|
0x0a, 0x14, 0x6d, 0x6f, 0x70, 0x2d, 0x61, 0x75, 0x74, 0x68, 0x2d, 0x63, 0x68, 0x65, 0x63, 0x6b,
|
|
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x0c, 0x63, 0x6f, 0x6d, 0x6d,
|
|
0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x6c, 0x0a, 0x0c, 0x43, 0x68, 0x65, 0x63,
|
|
0x6b, 0x41, 0x75, 0x74, 0x68, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72,
|
|
0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64,
|
|
0x12, 0x20, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18,
|
|
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61,
|
|
0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x50, 0x61,
|
|
0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69,
|
|
0x76, 0x65, 0x50, 0x61, 0x74, 0x68, 0x22, 0x89, 0x01, 0x0a, 0x0c, 0x43, 0x68, 0x65, 0x63, 0x6b,
|
|
0x41, 0x75, 0x74, 0x68, 0x52, 0x73, 0x70, 0x12, 0x28, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c,
|
|
0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6d,
|
|
0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c,
|
|
0x74, 0x12, 0x29, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
|
0x15, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x41, 0x75, 0x74, 0x68, 0x52, 0x73,
|
|
0x70, 0x2e, 0x44, 0x41, 0x54, 0x41, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x24, 0x0a, 0x04,
|
|
0x44, 0x41, 0x54, 0x41, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x61, 0x73, 0x41, 0x75, 0x74, 0x68, 0x6f,
|
|
0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x68, 0x61, 0x73, 0x41, 0x75, 0x74, 0x68,
|
|
0x6f, 0x72, 0x32, 0x44, 0x0a, 0x0c, 0x4d, 0x6f, 0x70, 0x41, 0x75, 0x74, 0x68, 0x43, 0x68, 0x65,
|
|
0x63, 0x6b, 0x12, 0x34, 0x0a, 0x0c, 0x6d, 0x6f, 0x70, 0x41, 0x75, 0x74, 0x68, 0x43, 0x68, 0x65,
|
|
0x63, 0x6b, 0x12, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x41, 0x75, 0x74,
|
|
0x68, 0x52, 0x65, 0x71, 0x1a, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x41,
|
|
0x75, 0x74, 0x68, 0x52, 0x73, 0x70, 0x22, 0x00, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62,
|
|
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
|
}
|
|
|
|
var (
|
|
file_mop_auth_check_proto_rawDescOnce sync.Once
|
|
file_mop_auth_check_proto_rawDescData = file_mop_auth_check_proto_rawDesc
|
|
)
|
|
|
|
func file_mop_auth_check_proto_rawDescGZIP() []byte {
|
|
file_mop_auth_check_proto_rawDescOnce.Do(func() {
|
|
file_mop_auth_check_proto_rawDescData = protoimpl.X.CompressGZIP(file_mop_auth_check_proto_rawDescData)
|
|
})
|
|
return file_mop_auth_check_proto_rawDescData
|
|
}
|
|
|
|
var file_mop_auth_check_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
|
var file_mop_auth_check_proto_goTypes = []interface{}{
|
|
(*CheckAuthReq)(nil), // 0: pb.CheckAuthReq
|
|
(*CheckAuthRsp)(nil), // 1: pb.CheckAuthRsp
|
|
(*CheckAuthRsp_DATA)(nil), // 2: pb.CheckAuthRsp.DATA
|
|
(*CommonResult)(nil), // 3: pb.CommonResult
|
|
}
|
|
var file_mop_auth_check_proto_depIdxs = []int32{
|
|
3, // 0: pb.CheckAuthRsp.result:type_name -> pb.CommonResult
|
|
2, // 1: pb.CheckAuthRsp.data:type_name -> pb.CheckAuthRsp.DATA
|
|
0, // 2: pb.MopAuthCheck.mopAuthCheck:input_type -> pb.CheckAuthReq
|
|
1, // 3: pb.MopAuthCheck.mopAuthCheck:output_type -> pb.CheckAuthRsp
|
|
3, // [3:4] is the sub-list for method output_type
|
|
2, // [2:3] is the sub-list for method input_type
|
|
2, // [2:2] is the sub-list for extension type_name
|
|
2, // [2:2] is the sub-list for extension extendee
|
|
0, // [0:2] is the sub-list for field type_name
|
|
}
|
|
|
|
func init() { file_mop_auth_check_proto_init() }
|
|
func file_mop_auth_check_proto_init() {
|
|
if File_mop_auth_check_proto != nil {
|
|
return
|
|
}
|
|
file_common_proto_init()
|
|
if !protoimpl.UnsafeEnabled {
|
|
file_mop_auth_check_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
|
switch v := v.(*CheckAuthReq); i {
|
|
case 0:
|
|
return &v.state
|
|
case 1:
|
|
return &v.sizeCache
|
|
case 2:
|
|
return &v.unknownFields
|
|
default:
|
|
return nil
|
|
}
|
|
}
|
|
file_mop_auth_check_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
|
switch v := v.(*CheckAuthRsp); i {
|
|
case 0:
|
|
return &v.state
|
|
case 1:
|
|
return &v.sizeCache
|
|
case 2:
|
|
return &v.unknownFields
|
|
default:
|
|
return nil
|
|
}
|
|
}
|
|
file_mop_auth_check_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
|
switch v := v.(*CheckAuthRsp_DATA); 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_mop_auth_check_proto_rawDesc,
|
|
NumEnums: 0,
|
|
NumMessages: 3,
|
|
NumExtensions: 0,
|
|
NumServices: 1,
|
|
},
|
|
GoTypes: file_mop_auth_check_proto_goTypes,
|
|
DependencyIndexes: file_mop_auth_check_proto_depIdxs,
|
|
MessageInfos: file_mop_auth_check_proto_msgTypes,
|
|
}.Build()
|
|
File_mop_auth_check_proto = out.File
|
|
file_mop_auth_check_proto_rawDesc = nil
|
|
file_mop_auth_check_proto_goTypes = nil
|
|
file_mop_auth_check_proto_depIdxs = nil
|
|
}
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ context.Context
|
|
var _ grpc.ClientConnInterface
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the grpc package it is being compiled against.
|
|
const _ = grpc.SupportPackageIsVersion6
|
|
|
|
// MopAuthCheckClient is the client API for MopAuthCheck service.
|
|
//
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
|
type MopAuthCheckClient interface {
|
|
MopAuthCheck(ctx context.Context, in *CheckAuthReq, opts ...grpc.CallOption) (*CheckAuthRsp, error)
|
|
}
|
|
|
|
type mopAuthCheckClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewMopAuthCheckClient(cc grpc.ClientConnInterface) MopAuthCheckClient {
|
|
return &mopAuthCheckClient{cc}
|
|
}
|
|
|
|
func (c *mopAuthCheckClient) MopAuthCheck(ctx context.Context, in *CheckAuthReq, opts ...grpc.CallOption) (*CheckAuthRsp, error) {
|
|
out := new(CheckAuthRsp)
|
|
err := c.cc.Invoke(ctx, "/pb.MopAuthCheck/mopAuthCheck", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// MopAuthCheckServer is the server API for MopAuthCheck service.
|
|
type MopAuthCheckServer interface {
|
|
MopAuthCheck(context.Context, *CheckAuthReq) (*CheckAuthRsp, error)
|
|
}
|
|
|
|
// UnimplementedMopAuthCheckServer can be embedded to have forward compatible implementations.
|
|
type UnimplementedMopAuthCheckServer struct {
|
|
}
|
|
|
|
func (*UnimplementedMopAuthCheckServer) MopAuthCheck(context.Context, *CheckAuthReq) (*CheckAuthRsp, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method MopAuthCheck not implemented")
|
|
}
|
|
|
|
func RegisterMopAuthCheckServer(s *grpc.Server, srv MopAuthCheckServer) {
|
|
s.RegisterService(&_MopAuthCheck_serviceDesc, srv)
|
|
}
|
|
|
|
func _MopAuthCheck_MopAuthCheck_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CheckAuthReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(MopAuthCheckServer).MopAuthCheck(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/pb.MopAuthCheck/MopAuthCheck",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(MopAuthCheckServer).MopAuthCheck(ctx, req.(*CheckAuthReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
var _MopAuthCheck_serviceDesc = grpc.ServiceDesc{
|
|
ServiceName: "pb.MopAuthCheck",
|
|
HandlerType: (*MopAuthCheckServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "mopAuthCheck",
|
|
Handler: _MopAuthCheck_MopAuthCheck_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "mop-auth-check.proto",
|
|
}
|