github.com/micro/go-micro/examples@v0.0.0-20210105173217-bf4ab679e18b/booking/srv/auth/proto/auth.pb.go (about)

     1  // Code generated by protoc-gen-go. DO NOT EDIT.
     2  // source: github.com/micro/go-micro/examples/booking/srv/auth/proto/auth.proto
     3  
     4  /*
     5  Package auth is a generated protocol buffer package.
     6  
     7  It is generated from these files:
     8  	github.com/micro/go-micro/examples/booking/srv/auth/proto/auth.proto
     9  
    10  It has these top-level messages:
    11  	Request
    12  	Result
    13  	Customer
    14  */
    15  package auth
    16  
    17  import proto "github.com/golang/protobuf/proto"
    18  import fmt "fmt"
    19  import math "math"
    20  
    21  import (
    22  	context "golang.org/x/net/context"
    23  	grpc "google.golang.org/grpc"
    24  )
    25  
    26  // Reference imports to suppress errors if they are not otherwise used.
    27  var _ = proto.Marshal
    28  var _ = fmt.Errorf
    29  var _ = math.Inf
    30  
    31  // This is a compile-time assertion to ensure that this generated file
    32  // is compatible with the proto package it is being compiled against.
    33  // A compilation error at this line likely means your copy of the
    34  // proto package needs to be updated.
    35  const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
    36  
    37  type Request struct {
    38  	AuthToken string `protobuf:"bytes,1,opt,name=authToken" json:"authToken,omitempty"`
    39  }
    40  
    41  func (m *Request) Reset()                    { *m = Request{} }
    42  func (m *Request) String() string            { return proto.CompactTextString(m) }
    43  func (*Request) ProtoMessage()               {}
    44  func (*Request) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
    45  
    46  func (m *Request) GetAuthToken() string {
    47  	if m != nil {
    48  		return m.AuthToken
    49  	}
    50  	return ""
    51  }
    52  
    53  type Result struct {
    54  	Customer *Customer `protobuf:"bytes,1,opt,name=customer" json:"customer,omitempty"`
    55  }
    56  
    57  func (m *Result) Reset()                    { *m = Result{} }
    58  func (m *Result) String() string            { return proto.CompactTextString(m) }
    59  func (*Result) ProtoMessage()               {}
    60  func (*Result) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
    61  
    62  func (m *Result) GetCustomer() *Customer {
    63  	if m != nil {
    64  		return m.Customer
    65  	}
    66  	return nil
    67  }
    68  
    69  type Customer struct {
    70  	Id        int32  `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
    71  	AuthToken string `protobuf:"bytes,2,opt,name=authToken" json:"authToken,omitempty"`
    72  }
    73  
    74  func (m *Customer) Reset()                    { *m = Customer{} }
    75  func (m *Customer) String() string            { return proto.CompactTextString(m) }
    76  func (*Customer) ProtoMessage()               {}
    77  func (*Customer) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
    78  
    79  func (m *Customer) GetId() int32 {
    80  	if m != nil {
    81  		return m.Id
    82  	}
    83  	return 0
    84  }
    85  
    86  func (m *Customer) GetAuthToken() string {
    87  	if m != nil {
    88  		return m.AuthToken
    89  	}
    90  	return ""
    91  }
    92  
    93  func init() {
    94  	proto.RegisterType((*Request)(nil), "auth.Request")
    95  	proto.RegisterType((*Result)(nil), "auth.Result")
    96  	proto.RegisterType((*Customer)(nil), "auth.Customer")
    97  }
    98  
    99  // Reference imports to suppress errors if they are not otherwise used.
   100  var _ context.Context
   101  var _ grpc.ClientConn
   102  
   103  // This is a compile-time assertion to ensure that this generated file
   104  // is compatible with the grpc package it is being compiled against.
   105  const _ = grpc.SupportPackageIsVersion4
   106  
   107  // Client API for Auth service
   108  
   109  type AuthClient interface {
   110  	VerifyToken(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Result, error)
   111  }
   112  
   113  type authClient struct {
   114  	cc *grpc.ClientConn
   115  }
   116  
   117  func NewAuthClient(cc *grpc.ClientConn) AuthClient {
   118  	return &authClient{cc}
   119  }
   120  
   121  func (c *authClient) VerifyToken(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Result, error) {
   122  	out := new(Result)
   123  	err := grpc.Invoke(ctx, "/auth.Auth/VerifyToken", in, out, c.cc, opts...)
   124  	if err != nil {
   125  		return nil, err
   126  	}
   127  	return out, nil
   128  }
   129  
   130  // Server API for Auth service
   131  
   132  type AuthServer interface {
   133  	VerifyToken(context.Context, *Request) (*Result, error)
   134  }
   135  
   136  func RegisterAuthServer(s *grpc.Server, srv AuthServer) {
   137  	s.RegisterService(&_Auth_serviceDesc, srv)
   138  }
   139  
   140  func _Auth_VerifyToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   141  	in := new(Request)
   142  	if err := dec(in); err != nil {
   143  		return nil, err
   144  	}
   145  	if interceptor == nil {
   146  		return srv.(AuthServer).VerifyToken(ctx, in)
   147  	}
   148  	info := &grpc.UnaryServerInfo{
   149  		Server:     srv,
   150  		FullMethod: "/auth.Auth/VerifyToken",
   151  	}
   152  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   153  		return srv.(AuthServer).VerifyToken(ctx, req.(*Request))
   154  	}
   155  	return interceptor(ctx, in, info, handler)
   156  }
   157  
   158  var _Auth_serviceDesc = grpc.ServiceDesc{
   159  	ServiceName: "auth.Auth",
   160  	HandlerType: (*AuthServer)(nil),
   161  	Methods: []grpc.MethodDesc{
   162  		{
   163  			MethodName: "VerifyToken",
   164  			Handler:    _Auth_VerifyToken_Handler,
   165  		},
   166  	},
   167  	Streams:  []grpc.StreamDesc{},
   168  	Metadata: "github.com/micro/go-micro/examples/booking/srv/auth/proto/auth.proto",
   169  }
   170  
   171  func init() {
   172  	proto.RegisterFile("github.com/micro/go-micro/examples/booking/srv/auth/proto/auth.proto", fileDescriptor0)
   173  }
   174  
   175  var fileDescriptor0 = []byte{
   176  	// 213 bytes of a gzipped FileDescriptorProto
   177  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xb2, 0x4e, 0xcf, 0x2c, 0xc9,
   178  	0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0xcf, 0xcd, 0x4c, 0x2e, 0xca, 0xd7, 0x4f, 0xad, 0x48,
   179  	0xcc, 0x2d, 0xc8, 0x49, 0x2d, 0xd6, 0x4f, 0xca, 0xcf, 0xcf, 0xce, 0xcc, 0x4b, 0xd7, 0x2f, 0x2e,
   180  	0x2a, 0xd3, 0x4f, 0x2c, 0x2d, 0xc9, 0xd0, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x07, 0x33, 0xf5, 0xc0,
   181  	0x4c, 0x21, 0x16, 0x10, 0x5b, 0x49, 0x9d, 0x8b, 0x3d, 0x28, 0xb5, 0xb0, 0x34, 0xb5, 0xb8, 0x44,
   182  	0x48, 0x86, 0x8b, 0x13, 0x24, 0x14, 0x92, 0x9f, 0x9d, 0x9a, 0x27, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1,
   183  	0x19, 0x84, 0x10, 0x50, 0x32, 0xe1, 0x62, 0x0b, 0x4a, 0x2d, 0x2e, 0xcd, 0x29, 0x11, 0xd2, 0xe2,
   184  	0xe2, 0x48, 0x2e, 0x2d, 0x2e, 0xc9, 0xcf, 0x4d, 0x2d, 0x02, 0x2b, 0xe3, 0x36, 0xe2, 0xd3, 0x03,
   185  	0x9b, 0xeb, 0x0c, 0x15, 0x0d, 0x82, 0xcb, 0x2b, 0x59, 0x70, 0x71, 0xc0, 0x44, 0x85, 0xf8, 0xb8,
   186  	0x98, 0x32, 0x53, 0xc0, 0x3a, 0x58, 0x83, 0x98, 0x32, 0x53, 0x50, 0xed, 0x63, 0x42, 0xb3, 0xcf,
   187  	0xc8, 0x84, 0x8b, 0xc5, 0xb1, 0xb4, 0x24, 0x43, 0x48, 0x87, 0x8b, 0x3b, 0x2c, 0xb5, 0x28, 0x33,
   188  	0xad, 0x12, 0x2c, 0x2c, 0xc4, 0x0b, 0xb1, 0x0a, 0xea, 0x66, 0x29, 0x1e, 0x18, 0x17, 0xe4, 0x32,
   189  	0x25, 0x86, 0x24, 0x36, 0xb0, 0xdf, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xd7, 0x57, 0xa9,
   190  	0xd9, 0x1a, 0x01, 0x00, 0x00,
   191  }