...

Source file src/github.com/grpc-ecosystem/grpc-gateway/examples/internal/proto/examplepb/use_go_template.pb.go

Documentation: github.com/grpc-ecosystem/grpc-gateway/examples/internal/proto/examplepb

     1  // Code generated by protoc-gen-go. DO NOT EDIT.
     2  // source: examples/internal/proto/examplepb/use_go_template.proto
     3  
     4  package examplepb
     5  
     6  import (
     7  	context "context"
     8  	fmt "fmt"
     9  	proto "github.com/golang/protobuf/proto"
    10  	_ "google.golang.org/genproto/googleapis/api/annotations"
    11  	grpc "google.golang.org/grpc"
    12  	codes "google.golang.org/grpc/codes"
    13  	status "google.golang.org/grpc/status"
    14  	math "math"
    15  )
    16  
    17  // Reference imports to suppress errors if they are not otherwise used.
    18  var _ = proto.Marshal
    19  var _ = fmt.Errorf
    20  var _ = math.Inf
    21  
    22  // This is a compile-time assertion to ensure that this generated file
    23  // is compatible with the proto package it is being compiled against.
    24  // A compilation error at this line likely means your copy of the
    25  // proto package needs to be updated.
    26  const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
    27  
    28  type LoginRequest struct {
    29  	// The entered username
    30  	Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
    31  	// The entered password
    32  	Password             string   `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
    33  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
    34  	XXX_unrecognized     []byte   `json:"-"`
    35  	XXX_sizecache        int32    `json:"-"`
    36  }
    37  
    38  func (m *LoginRequest) Reset()         { *m = LoginRequest{} }
    39  func (m *LoginRequest) String() string { return proto.CompactTextString(m) }
    40  func (*LoginRequest) ProtoMessage()    {}
    41  func (*LoginRequest) Descriptor() ([]byte, []int) {
    42  	return fileDescriptor_ed0d8910d38fbb31, []int{0}
    43  }
    44  
    45  func (m *LoginRequest) XXX_Unmarshal(b []byte) error {
    46  	return xxx_messageInfo_LoginRequest.Unmarshal(m, b)
    47  }
    48  func (m *LoginRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    49  	return xxx_messageInfo_LoginRequest.Marshal(b, m, deterministic)
    50  }
    51  func (m *LoginRequest) XXX_Merge(src proto.Message) {
    52  	xxx_messageInfo_LoginRequest.Merge(m, src)
    53  }
    54  func (m *LoginRequest) XXX_Size() int {
    55  	return xxx_messageInfo_LoginRequest.Size(m)
    56  }
    57  func (m *LoginRequest) XXX_DiscardUnknown() {
    58  	xxx_messageInfo_LoginRequest.DiscardUnknown(m)
    59  }
    60  
    61  var xxx_messageInfo_LoginRequest proto.InternalMessageInfo
    62  
    63  func (m *LoginRequest) GetUsername() string {
    64  	if m != nil {
    65  		return m.Username
    66  	}
    67  	return ""
    68  }
    69  
    70  func (m *LoginRequest) GetPassword() string {
    71  	if m != nil {
    72  		return m.Password
    73  	}
    74  	return ""
    75  }
    76  
    77  type LoginReply struct {
    78  	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
    79  	// Whether you have access or not
    80  	Access               bool     `protobuf:"varint,2,opt,name=access,proto3" json:"access,omitempty"`
    81  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
    82  	XXX_unrecognized     []byte   `json:"-"`
    83  	XXX_sizecache        int32    `json:"-"`
    84  }
    85  
    86  func (m *LoginReply) Reset()         { *m = LoginReply{} }
    87  func (m *LoginReply) String() string { return proto.CompactTextString(m) }
    88  func (*LoginReply) ProtoMessage()    {}
    89  func (*LoginReply) Descriptor() ([]byte, []int) {
    90  	return fileDescriptor_ed0d8910d38fbb31, []int{1}
    91  }
    92  
    93  func (m *LoginReply) XXX_Unmarshal(b []byte) error {
    94  	return xxx_messageInfo_LoginReply.Unmarshal(m, b)
    95  }
    96  func (m *LoginReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    97  	return xxx_messageInfo_LoginReply.Marshal(b, m, deterministic)
    98  }
    99  func (m *LoginReply) XXX_Merge(src proto.Message) {
   100  	xxx_messageInfo_LoginReply.Merge(m, src)
   101  }
   102  func (m *LoginReply) XXX_Size() int {
   103  	return xxx_messageInfo_LoginReply.Size(m)
   104  }
   105  func (m *LoginReply) XXX_DiscardUnknown() {
   106  	xxx_messageInfo_LoginReply.DiscardUnknown(m)
   107  }
   108  
   109  var xxx_messageInfo_LoginReply proto.InternalMessageInfo
   110  
   111  func (m *LoginReply) GetMessage() string {
   112  	if m != nil {
   113  		return m.Message
   114  	}
   115  	return ""
   116  }
   117  
   118  func (m *LoginReply) GetAccess() bool {
   119  	if m != nil {
   120  		return m.Access
   121  	}
   122  	return false
   123  }
   124  
   125  type LogoutRequest struct {
   126  	// The time the logout was registered
   127  	Timeoflogout string `protobuf:"bytes,1,opt,name=timeoflogout,proto3" json:"timeoflogout,omitempty"`
   128  	// This is the title
   129  	//
   130  	// This is the "Description" of field test
   131  	// you can use as many newlines as you want
   132  	//
   133  	//
   134  	// it will still format the same in the table
   135  	Test int32 `protobuf:"varint,2,opt,name=test,proto3" json:"test,omitempty"`
   136  	// This is an array
   137  	//
   138  	// It displays that using [] infront of the type
   139  	Stringarray          []string `protobuf:"bytes,3,rep,name=stringarray,proto3" json:"stringarray,omitempty"`
   140  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
   141  	XXX_unrecognized     []byte   `json:"-"`
   142  	XXX_sizecache        int32    `json:"-"`
   143  }
   144  
   145  func (m *LogoutRequest) Reset()         { *m = LogoutRequest{} }
   146  func (m *LogoutRequest) String() string { return proto.CompactTextString(m) }
   147  func (*LogoutRequest) ProtoMessage()    {}
   148  func (*LogoutRequest) Descriptor() ([]byte, []int) {
   149  	return fileDescriptor_ed0d8910d38fbb31, []int{2}
   150  }
   151  
   152  func (m *LogoutRequest) XXX_Unmarshal(b []byte) error {
   153  	return xxx_messageInfo_LogoutRequest.Unmarshal(m, b)
   154  }
   155  func (m *LogoutRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   156  	return xxx_messageInfo_LogoutRequest.Marshal(b, m, deterministic)
   157  }
   158  func (m *LogoutRequest) XXX_Merge(src proto.Message) {
   159  	xxx_messageInfo_LogoutRequest.Merge(m, src)
   160  }
   161  func (m *LogoutRequest) XXX_Size() int {
   162  	return xxx_messageInfo_LogoutRequest.Size(m)
   163  }
   164  func (m *LogoutRequest) XXX_DiscardUnknown() {
   165  	xxx_messageInfo_LogoutRequest.DiscardUnknown(m)
   166  }
   167  
   168  var xxx_messageInfo_LogoutRequest proto.InternalMessageInfo
   169  
   170  func (m *LogoutRequest) GetTimeoflogout() string {
   171  	if m != nil {
   172  		return m.Timeoflogout
   173  	}
   174  	return ""
   175  }
   176  
   177  func (m *LogoutRequest) GetTest() int32 {
   178  	if m != nil {
   179  		return m.Test
   180  	}
   181  	return 0
   182  }
   183  
   184  func (m *LogoutRequest) GetStringarray() []string {
   185  	if m != nil {
   186  		return m.Stringarray
   187  	}
   188  	return nil
   189  }
   190  
   191  type LogoutReply struct {
   192  	// Message that tells you whether your
   193  	// logout was succesful or not
   194  	Message              string   `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
   195  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
   196  	XXX_unrecognized     []byte   `json:"-"`
   197  	XXX_sizecache        int32    `json:"-"`
   198  }
   199  
   200  func (m *LogoutReply) Reset()         { *m = LogoutReply{} }
   201  func (m *LogoutReply) String() string { return proto.CompactTextString(m) }
   202  func (*LogoutReply) ProtoMessage()    {}
   203  func (*LogoutReply) Descriptor() ([]byte, []int) {
   204  	return fileDescriptor_ed0d8910d38fbb31, []int{3}
   205  }
   206  
   207  func (m *LogoutReply) XXX_Unmarshal(b []byte) error {
   208  	return xxx_messageInfo_LogoutReply.Unmarshal(m, b)
   209  }
   210  func (m *LogoutReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   211  	return xxx_messageInfo_LogoutReply.Marshal(b, m, deterministic)
   212  }
   213  func (m *LogoutReply) XXX_Merge(src proto.Message) {
   214  	xxx_messageInfo_LogoutReply.Merge(m, src)
   215  }
   216  func (m *LogoutReply) XXX_Size() int {
   217  	return xxx_messageInfo_LogoutReply.Size(m)
   218  }
   219  func (m *LogoutReply) XXX_DiscardUnknown() {
   220  	xxx_messageInfo_LogoutReply.DiscardUnknown(m)
   221  }
   222  
   223  var xxx_messageInfo_LogoutReply proto.InternalMessageInfo
   224  
   225  func (m *LogoutReply) GetMessage() string {
   226  	if m != nil {
   227  		return m.Message
   228  	}
   229  	return ""
   230  }
   231  
   232  func init() {
   233  	proto.RegisterType((*LoginRequest)(nil), "grpc.gateway.examples.internal.examplepb.LoginRequest")
   234  	proto.RegisterType((*LoginReply)(nil), "grpc.gateway.examples.internal.examplepb.LoginReply")
   235  	proto.RegisterType((*LogoutRequest)(nil), "grpc.gateway.examples.internal.examplepb.LogoutRequest")
   236  	proto.RegisterType((*LogoutReply)(nil), "grpc.gateway.examples.internal.examplepb.LogoutReply")
   237  }
   238  
   239  func init() {
   240  	proto.RegisterFile("examples/internal/proto/examplepb/use_go_template.proto", fileDescriptor_ed0d8910d38fbb31)
   241  }
   242  
   243  var fileDescriptor_ed0d8910d38fbb31 = []byte{
   244  	// 373 bytes of a gzipped FileDescriptorProto
   245  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0xbd, 0x8e, 0x1a, 0x31,
   246  	0x14, 0x85, 0x35, 0x10, 0x08, 0x18, 0x52, 0xc4, 0x05, 0x19, 0x8d, 0x88, 0x84, 0xdc, 0x04, 0x51,
   247  	0x8c, 0x95, 0x5f, 0x24, 0x8a, 0x14, 0x29, 0x52, 0x51, 0x4d, 0xba, 0x34, 0xc8, 0x4c, 0x6e, 0x2c,
   248  	0x4b, 0x9e, 0xb1, 0x63, 0x7b, 0x20, 0xd3, 0xee, 0x2b, 0x50, 0xec, 0xdb, 0xec, 0x4b, 0xec, 0x2b,
   249  	0xec, 0x83, 0xac, 0xc6, 0x8c, 0x59, 0x76, 0x8b, 0xd5, 0xd2, 0xcd, 0x3d, 0x57, 0xe7, 0x9b, 0xe3,
   250  	0xa3, 0x8b, 0x96, 0xf0, 0x9f, 0x15, 0x5a, 0x82, 0xa5, 0xa2, 0x74, 0x60, 0x4a, 0x26, 0xa9, 0x36,
   251  	0xca, 0x29, 0xda, 0xea, 0x7a, 0x4b, 0x2b, 0x0b, 0x1b, 0xae, 0x36, 0x0e, 0x0a, 0x2d, 0x99, 0x83,
   252  	0xd4, 0xef, 0xf1, 0x9c, 0x1b, 0x9d, 0xa7, 0x9c, 0x39, 0xd8, 0xb3, 0x3a, 0x0d, 0x94, 0x34, 0x50,
   253  	0xd2, 0x93, 0x3f, 0x99, 0x72, 0xa5, 0xb8, 0x04, 0xca, 0xb4, 0xa0, 0xac, 0x2c, 0x95, 0x63, 0x4e,
   254  	0xa8, 0xd2, 0x1e, 0x39, 0xe4, 0x27, 0x1a, 0xaf, 0x15, 0x17, 0x65, 0x06, 0xff, 0x2a, 0xb0, 0x0e,
   255  	0x27, 0x68, 0x50, 0xd9, 0x06, 0x51, 0x40, 0x1c, 0xcd, 0xa2, 0xf9, 0x30, 0x3b, 0xcd, 0xcd, 0x4e,
   256  	0x33, 0x6b, 0xf7, 0xca, 0xfc, 0x89, 0x3b, 0xc7, 0x5d, 0x98, 0xc9, 0x77, 0x84, 0x5a, 0x8e, 0x96,
   257  	0x35, 0x8e, 0xd1, 0xeb, 0x02, 0xac, 0x65, 0x3c, 0x40, 0xc2, 0x88, 0x27, 0xa8, 0xcf, 0xf2, 0x1c,
   258  	0xac, 0xf5, 0x84, 0x41, 0xd6, 0x4e, 0x44, 0xa0, 0x37, 0x6b, 0xc5, 0x55, 0xe5, 0x42, 0x10, 0x82,
   259  	0xc6, 0x4e, 0x14, 0xa0, 0xfe, 0x4a, 0x2f, 0xb7, 0x9c, 0x47, 0x1a, 0xc6, 0xe8, 0x95, 0x03, 0xeb,
   260  	0x3c, 0xaa, 0x97, 0xf9, 0x6f, 0x3c, 0x43, 0x23, 0xeb, 0x8c, 0x28, 0x39, 0x33, 0x86, 0xd5, 0x71,
   261  	0x77, 0xd6, 0x9d, 0x0f, 0xb3, 0x73, 0x89, 0x7c, 0x40, 0xa3, 0xf0, 0xab, 0x67, 0xb3, 0x7e, 0xba,
   262  	0xe9, 0xb4, 0xe5, 0xfc, 0x02, 0xb3, 0x13, 0x39, 0xe0, 0x43, 0x84, 0x7a, 0x5e, 0xc0, 0xdf, 0xd2,
   263  	0x97, 0xf6, 0x9f, 0x9e, 0xd7, 0x9b, 0x7c, 0xb9, 0xd8, 0xa7, 0x65, 0x4d, 0xa6, 0x57, 0xb7, 0x77,
   264  	0x87, 0xce, 0x84, 0xbc, 0xa5, 0xbb, 0x8f, 0xe1, 0x32, 0xa8, 0x6c, 0xf6, 0xab, 0x68, 0x81, 0xaf,
   265  	0x23, 0xd4, 0x3f, 0x3e, 0x08, 0x2f, 0x2f, 0xc2, 0x3f, 0xb4, 0x9d, 0x7c, 0xbd, 0xdc, 0xd8, 0x04,
   266  	0x7b, 0xef, 0x83, 0xbd, 0x23, 0xf8, 0x49, 0x30, 0x55, 0xb9, 0x55, 0xb4, 0xf8, 0x31, 0xfa, 0x3d,
   267  	0x3c, 0xf9, 0xb6, 0x7d, 0x7f, 0x70, 0x9f, 0xef, 0x03, 0x00, 0x00, 0xff, 0xff, 0x2d, 0xc0, 0x42,
   268  	0xdb, 0xf3, 0x02, 0x00, 0x00,
   269  }
   270  
   271  // Reference imports to suppress errors if they are not otherwise used.
   272  var _ context.Context
   273  var _ grpc.ClientConnInterface
   274  
   275  // This is a compile-time assertion to ensure that this generated file
   276  // is compatible with the grpc package it is being compiled against.
   277  const _ = grpc.SupportPackageIsVersion6
   278  
   279  // LoginServiceClient is the client API for LoginService service.
   280  //
   281  // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
   282  type LoginServiceClient interface {
   283  	// Login
   284  	//
   285  	// {{.MethodDescriptorProto.Name}} is a call with the method(s) {{$first := true}}{{range .Bindings}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{.HTTPMethod}}{{end}} within the "{{.Service.Name}}" service.
   286  	// It takes in "{{.RequestType.Name}}" and returns a "{{.ResponseType.Name}}".
   287  	//
   288  	// ## {{.RequestType.Name}}
   289  	// | Field ID    | Name      | Type                                                       | Description                  |
   290  	// | ----------- | --------- | ---------------------------------------------------------  | ---------------------------- | {{range .RequestType.Fields}}
   291  	// | {{.Number}} | {{.Name}} | {{if eq .Label.String "LABEL_REPEATED"}}[]{{end}}{{.Type}} | {{fieldcomments .Message .}} | {{end}}
   292  	//
   293  	// ## {{.ResponseType.Name}}
   294  	// | Field ID    | Name      | Type                                                       | Description                  |
   295  	// | ----------- | --------- | ---------------------------------------------------------- | ---------------------------- | {{range .ResponseType.Fields}}
   296  	// | {{.Number}} | {{.Name}} | {{if eq .Label.String "LABEL_REPEATED"}}[]{{end}}{{.Type}} | {{fieldcomments .Message .}} | {{end}}
   297  	Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginReply, error)
   298  	// Logout
   299  	//
   300  	// {{.MethodDescriptorProto.Name}} is a call with the method(s) {{$first := true}}{{range .Bindings}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{.HTTPMethod}}{{end}} within the "{{.Service.Name}}" service.
   301  	// It takes in "{{.RequestType.Name}}" and returns a "{{.ResponseType.Name}}".
   302  	//
   303  	// ## {{.RequestType.Name}}
   304  	// | Field ID    | Name      | Type                                                       | Description                  |
   305  	// | ----------- | --------- | ---------------------------------------------------------  | ---------------------------- | {{range .RequestType.Fields}}
   306  	// | {{.Number}} | {{.Name}} | {{if eq .Label.String "LABEL_REPEATED"}}[]{{end}}{{.Type}} | {{fieldcomments .Message .}} | {{end}}
   307  	//
   308  	// ## {{.ResponseType.Name}}
   309  	// | Field ID    | Name      | Type                                                       | Description                  |
   310  	// | ----------- | --------- | ---------------------------------------------------------- | ---------------------------- | {{range .ResponseType.Fields}}
   311  	// | {{.Number}} | {{.Name}} | {{if eq .Label.String "LABEL_REPEATED"}}[]{{end}}{{.Type}} | {{fieldcomments .Message .}} | {{end}}
   312  	Logout(ctx context.Context, in *LogoutRequest, opts ...grpc.CallOption) (*LogoutReply, error)
   313  }
   314  
   315  type loginServiceClient struct {
   316  	cc grpc.ClientConnInterface
   317  }
   318  
   319  func NewLoginServiceClient(cc grpc.ClientConnInterface) LoginServiceClient {
   320  	return &loginServiceClient{cc}
   321  }
   322  
   323  func (c *loginServiceClient) Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginReply, error) {
   324  	out := new(LoginReply)
   325  	err := c.cc.Invoke(ctx, "/grpc.gateway.examples.internal.examplepb.LoginService/Login", in, out, opts...)
   326  	if err != nil {
   327  		return nil, err
   328  	}
   329  	return out, nil
   330  }
   331  
   332  func (c *loginServiceClient) Logout(ctx context.Context, in *LogoutRequest, opts ...grpc.CallOption) (*LogoutReply, error) {
   333  	out := new(LogoutReply)
   334  	err := c.cc.Invoke(ctx, "/grpc.gateway.examples.internal.examplepb.LoginService/Logout", in, out, opts...)
   335  	if err != nil {
   336  		return nil, err
   337  	}
   338  	return out, nil
   339  }
   340  
   341  // LoginServiceServer is the server API for LoginService service.
   342  type LoginServiceServer interface {
   343  	// Login
   344  	//
   345  	// {{.MethodDescriptorProto.Name}} is a call with the method(s) {{$first := true}}{{range .Bindings}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{.HTTPMethod}}{{end}} within the "{{.Service.Name}}" service.
   346  	// It takes in "{{.RequestType.Name}}" and returns a "{{.ResponseType.Name}}".
   347  	//
   348  	// ## {{.RequestType.Name}}
   349  	// | Field ID    | Name      | Type                                                       | Description                  |
   350  	// | ----------- | --------- | ---------------------------------------------------------  | ---------------------------- | {{range .RequestType.Fields}}
   351  	// | {{.Number}} | {{.Name}} | {{if eq .Label.String "LABEL_REPEATED"}}[]{{end}}{{.Type}} | {{fieldcomments .Message .}} | {{end}}
   352  	//
   353  	// ## {{.ResponseType.Name}}
   354  	// | Field ID    | Name      | Type                                                       | Description                  |
   355  	// | ----------- | --------- | ---------------------------------------------------------- | ---------------------------- | {{range .ResponseType.Fields}}
   356  	// | {{.Number}} | {{.Name}} | {{if eq .Label.String "LABEL_REPEATED"}}[]{{end}}{{.Type}} | {{fieldcomments .Message .}} | {{end}}
   357  	Login(context.Context, *LoginRequest) (*LoginReply, error)
   358  	// Logout
   359  	//
   360  	// {{.MethodDescriptorProto.Name}} is a call with the method(s) {{$first := true}}{{range .Bindings}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{.HTTPMethod}}{{end}} within the "{{.Service.Name}}" service.
   361  	// It takes in "{{.RequestType.Name}}" and returns a "{{.ResponseType.Name}}".
   362  	//
   363  	// ## {{.RequestType.Name}}
   364  	// | Field ID    | Name      | Type                                                       | Description                  |
   365  	// | ----------- | --------- | ---------------------------------------------------------  | ---------------------------- | {{range .RequestType.Fields}}
   366  	// | {{.Number}} | {{.Name}} | {{if eq .Label.String "LABEL_REPEATED"}}[]{{end}}{{.Type}} | {{fieldcomments .Message .}} | {{end}}
   367  	//
   368  	// ## {{.ResponseType.Name}}
   369  	// | Field ID    | Name      | Type                                                       | Description                  |
   370  	// | ----------- | --------- | ---------------------------------------------------------- | ---------------------------- | {{range .ResponseType.Fields}}
   371  	// | {{.Number}} | {{.Name}} | {{if eq .Label.String "LABEL_REPEATED"}}[]{{end}}{{.Type}} | {{fieldcomments .Message .}} | {{end}}
   372  	Logout(context.Context, *LogoutRequest) (*LogoutReply, error)
   373  }
   374  
   375  // UnimplementedLoginServiceServer can be embedded to have forward compatible implementations.
   376  type UnimplementedLoginServiceServer struct {
   377  }
   378  
   379  func (*UnimplementedLoginServiceServer) Login(ctx context.Context, req *LoginRequest) (*LoginReply, error) {
   380  	return nil, status.Errorf(codes.Unimplemented, "method Login not implemented")
   381  }
   382  func (*UnimplementedLoginServiceServer) Logout(ctx context.Context, req *LogoutRequest) (*LogoutReply, error) {
   383  	return nil, status.Errorf(codes.Unimplemented, "method Logout not implemented")
   384  }
   385  
   386  func RegisterLoginServiceServer(s *grpc.Server, srv LoginServiceServer) {
   387  	s.RegisterService(&_LoginService_serviceDesc, srv)
   388  }
   389  
   390  func _LoginService_Login_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   391  	in := new(LoginRequest)
   392  	if err := dec(in); err != nil {
   393  		return nil, err
   394  	}
   395  	if interceptor == nil {
   396  		return srv.(LoginServiceServer).Login(ctx, in)
   397  	}
   398  	info := &grpc.UnaryServerInfo{
   399  		Server:     srv,
   400  		FullMethod: "/grpc.gateway.examples.internal.examplepb.LoginService/Login",
   401  	}
   402  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   403  		return srv.(LoginServiceServer).Login(ctx, req.(*LoginRequest))
   404  	}
   405  	return interceptor(ctx, in, info, handler)
   406  }
   407  
   408  func _LoginService_Logout_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   409  	in := new(LogoutRequest)
   410  	if err := dec(in); err != nil {
   411  		return nil, err
   412  	}
   413  	if interceptor == nil {
   414  		return srv.(LoginServiceServer).Logout(ctx, in)
   415  	}
   416  	info := &grpc.UnaryServerInfo{
   417  		Server:     srv,
   418  		FullMethod: "/grpc.gateway.examples.internal.examplepb.LoginService/Logout",
   419  	}
   420  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   421  		return srv.(LoginServiceServer).Logout(ctx, req.(*LogoutRequest))
   422  	}
   423  	return interceptor(ctx, in, info, handler)
   424  }
   425  
   426  var _LoginService_serviceDesc = grpc.ServiceDesc{
   427  	ServiceName: "grpc.gateway.examples.internal.examplepb.LoginService",
   428  	HandlerType: (*LoginServiceServer)(nil),
   429  	Methods: []grpc.MethodDesc{
   430  		{
   431  			MethodName: "Login",
   432  			Handler:    _LoginService_Login_Handler,
   433  		},
   434  		{
   435  			MethodName: "Logout",
   436  			Handler:    _LoginService_Logout_Handler,
   437  		},
   438  	},
   439  	Streams:  []grpc.StreamDesc{},
   440  	Metadata: "examples/internal/proto/examplepb/use_go_template.proto",
   441  }
   442  

View as plain text