Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterUsersServer(s grpc.ServiceRegistrar, srv UsersServer)
- type ListUserIn
- type ListUserOut
- func (*ListUserOut) Descriptor() ([]byte, []int)deprecated
- func (x *ListUserOut) GetStatus() ListUserOut_Status
- func (x *ListUserOut) GetUsers() []*User
- func (*ListUserOut) ProtoMessage()
- func (x *ListUserOut) ProtoReflect() protoreflect.Message
- func (x *ListUserOut) Reset()
- func (x *ListUserOut) String() string
- type ListUserOut_Status
- func (ListUserOut_Status) Descriptor() protoreflect.EnumDescriptor
- func (x ListUserOut_Status) Enum() *ListUserOut_Status
- func (ListUserOut_Status) EnumDescriptor() ([]byte, []int)deprecated
- func (x ListUserOut_Status) Number() protoreflect.EnumNumber
- func (x ListUserOut_Status) String() string
- func (ListUserOut_Status) Type() protoreflect.EnumType
- type UnimplementedUsersServer
- type UnsafeUsersServer
- type User
- type UsersClient
- type UsersServer
Constants ¶
const (
Users_ListUser_FullMethodName = "/users.Users/ListUser"
)
Variables ¶
var ( ListUserOut_Status_name = map[int32]string{ 0: "OK", 2: "NOT_FOUND", } ListUserOut_Status_value = map[string]int32{ "OK": 0, "NOT_FOUND": 2, } )
Enum value maps for ListUserOut_Status.
var File_resources_protos_users_proto protoreflect.FileDescriptor
var Users_ServiceDesc = grpc.ServiceDesc{ ServiceName: "users.Users", HandlerType: (*UsersServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ListUser", Handler: _Users_ListUser_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "resources/protos/users.proto", }
Users_ServiceDesc is the grpc.ServiceDesc for Users service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterUsersServer ¶
func RegisterUsersServer(s grpc.ServiceRegistrar, srv UsersServer)
Types ¶
type ListUserIn ¶
type ListUserIn struct { Q int64 `protobuf:"varint,1,opt,name=q,proto3" json:"q,omitempty"` // contains filtered or unexported fields }
func (*ListUserIn) Descriptor
deprecated
func (*ListUserIn) Descriptor() ([]byte, []int)
Deprecated: Use ListUserIn.ProtoReflect.Descriptor instead.
func (*ListUserIn) GetQ ¶
func (x *ListUserIn) GetQ() int64
func (*ListUserIn) ProtoMessage ¶
func (*ListUserIn) ProtoMessage()
func (*ListUserIn) ProtoReflect ¶
func (x *ListUserIn) ProtoReflect() protoreflect.Message
func (*ListUserIn) Reset ¶
func (x *ListUserIn) Reset()
func (*ListUserIn) String ¶
func (x *ListUserIn) String() string
type ListUserOut ¶
type ListUserOut struct { Status ListUserOut_Status `protobuf:"varint,1,opt,name=status,proto3,enum=users.ListUserOut_Status" json:"status,omitempty"` Users []*User `protobuf:"bytes,2,rep,name=users,proto3" json:"users,omitempty"` // contains filtered or unexported fields }
func (*ListUserOut) Descriptor
deprecated
func (*ListUserOut) Descriptor() ([]byte, []int)
Deprecated: Use ListUserOut.ProtoReflect.Descriptor instead.
func (*ListUserOut) GetStatus ¶
func (x *ListUserOut) GetStatus() ListUserOut_Status
func (*ListUserOut) GetUsers ¶
func (x *ListUserOut) GetUsers() []*User
func (*ListUserOut) ProtoMessage ¶
func (*ListUserOut) ProtoMessage()
func (*ListUserOut) ProtoReflect ¶
func (x *ListUserOut) ProtoReflect() protoreflect.Message
func (*ListUserOut) Reset ¶
func (x *ListUserOut) Reset()
func (*ListUserOut) String ¶
func (x *ListUserOut) String() string
type ListUserOut_Status ¶
type ListUserOut_Status int32
const ( ListUserOut_OK ListUserOut_Status = 0 ListUserOut_NOT_FOUND ListUserOut_Status = 2 )
func (ListUserOut_Status) Descriptor ¶
func (ListUserOut_Status) Descriptor() protoreflect.EnumDescriptor
func (ListUserOut_Status) Enum ¶
func (x ListUserOut_Status) Enum() *ListUserOut_Status
func (ListUserOut_Status) EnumDescriptor
deprecated
func (ListUserOut_Status) EnumDescriptor() ([]byte, []int)
Deprecated: Use ListUserOut_Status.Descriptor instead.
func (ListUserOut_Status) Number ¶
func (x ListUserOut_Status) Number() protoreflect.EnumNumber
func (ListUserOut_Status) String ¶
func (x ListUserOut_Status) String() string
func (ListUserOut_Status) Type ¶
func (ListUserOut_Status) Type() protoreflect.EnumType
type UnimplementedUsersServer ¶
type UnimplementedUsersServer struct { }
UnimplementedUsersServer must be embedded to have forward compatible implementations.
func (UnimplementedUsersServer) ListUser ¶
func (UnimplementedUsersServer) ListUser(context.Context, *ListUserIn) (*ListUserOut, error)
type UnsafeUsersServer ¶
type UnsafeUsersServer interface {
// contains filtered or unexported methods
}
UnsafeUsersServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UsersServer will result in compilation errors.
type User ¶
type User struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
type UsersClient ¶
type UsersClient interface {
ListUser(ctx context.Context, in *ListUserIn, opts ...grpc.CallOption) (*ListUserOut, error)
}
UsersClient is the client API for Users 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.
func NewUsersClient ¶
func NewUsersClient(cc grpc.ClientConnInterface) UsersClient
type UsersServer ¶
type UsersServer interface { ListUser(context.Context, *ListUserIn) (*ListUserOut, error) // contains filtered or unexported methods }
UsersServer is the server API for Users service. All implementations must embed UnimplementedUsersServer for forward compatibility