Documentation ¶
Index ¶
- Variables
- func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
- type ListUserResponse
- func (*ListUserResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListUserResponse) GetError() string
- func (x *ListUserResponse) GetUsers() []*User
- func (*ListUserResponse) ProtoMessage()
- func (x *ListUserResponse) ProtoReflect() protoreflect.Message
- func (x *ListUserResponse) Reset()
- func (x *ListUserResponse) String() string
- type UnimplementedUserServiceServer
- func (UnimplementedUserServiceServer) Create(context.Context, *UserRequest) (*UserResponse, error)
- func (UnimplementedUserServiceServer) Delete(context.Context, *UserRequest) (*UserResponse, error)
- func (UnimplementedUserServiceServer) Get(context.Context, *UserRequest) (*UserResponse, error)
- func (UnimplementedUserServiceServer) List(context.Context, *emptypb.Empty) (*ListUserResponse, error)
- func (UnimplementedUserServiceServer) Update(context.Context, *UserRequest) (*UserResponse, error)
- type UnsafeUserServiceServer
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetCreatedAt() *timestamppb.Timestamp
- func (x *User) GetId() int64
- func (x *User) GetLastLogin() *timestamppb.Timestamp
- func (x *User) GetLogin() string
- func (x *User) GetModifiedAt() *timestamppb.Timestamp
- func (x *User) GetName() string
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
- type UserRequest
- func (*UserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UserRequest) GetId() int64
- func (x *UserRequest) GetLogin() string
- func (x *UserRequest) GetName() string
- func (x *UserRequest) GetPassword() string
- func (*UserRequest) ProtoMessage()
- func (x *UserRequest) ProtoReflect() protoreflect.Message
- func (x *UserRequest) Reset()
- func (x *UserRequest) String() string
- type UserResponse
- func (*UserResponse) Descriptor() ([]byte, []int)deprecated
- func (x *UserResponse) GetError() string
- func (x *UserResponse) GetUser() *User
- func (*UserResponse) ProtoMessage()
- func (x *UserResponse) ProtoReflect() protoreflect.Message
- func (x *UserResponse) Reset()
- func (x *UserResponse) String() string
- type UserServiceClient
- type UserServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_user_proto protoreflect.FileDescriptor
var UserService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "v1.UserService", HandlerType: (*UserServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Create", Handler: _UserService_Create_Handler, }, { MethodName: "Update", Handler: _UserService_Update_Handler, }, { MethodName: "Delete", Handler: _UserService_Delete_Handler, }, { MethodName: "Get", Handler: _UserService_Get_Handler, }, { MethodName: "List", Handler: _UserService_List_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "user.proto", }
UserService_ServiceDesc is the grpc.ServiceDesc for UserService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterUserServiceServer ¶
func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
Types ¶
type ListUserResponse ¶
type ListUserResponse struct { Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` Users []*User `protobuf:"bytes,2,rep,name=users,proto3" json:"users,omitempty"` // contains filtered or unexported fields }
func (*ListUserResponse) Descriptor
deprecated
func (*ListUserResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListUserResponse.ProtoReflect.Descriptor instead.
func (*ListUserResponse) GetError ¶
func (x *ListUserResponse) GetError() string
func (*ListUserResponse) GetUsers ¶
func (x *ListUserResponse) GetUsers() []*User
func (*ListUserResponse) ProtoMessage ¶
func (*ListUserResponse) ProtoMessage()
func (*ListUserResponse) ProtoReflect ¶
func (x *ListUserResponse) ProtoReflect() protoreflect.Message
func (*ListUserResponse) Reset ¶
func (x *ListUserResponse) Reset()
func (*ListUserResponse) String ¶
func (x *ListUserResponse) String() string
type UnimplementedUserServiceServer ¶
type UnimplementedUserServiceServer struct { }
UnimplementedUserServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedUserServiceServer) Create ¶
func (UnimplementedUserServiceServer) Create(context.Context, *UserRequest) (*UserResponse, error)
func (UnimplementedUserServiceServer) Delete ¶
func (UnimplementedUserServiceServer) Delete(context.Context, *UserRequest) (*UserResponse, error)
func (UnimplementedUserServiceServer) Get ¶
func (UnimplementedUserServiceServer) Get(context.Context, *UserRequest) (*UserResponse, error)
func (UnimplementedUserServiceServer) List ¶
func (UnimplementedUserServiceServer) List(context.Context, *emptypb.Empty) (*ListUserResponse, error)
func (UnimplementedUserServiceServer) Update ¶
func (UnimplementedUserServiceServer) Update(context.Context, *UserRequest) (*UserResponse, error)
type UnsafeUserServiceServer ¶
type UnsafeUserServiceServer interface {
// contains filtered or unexported methods
}
UnsafeUserServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UserServiceServer 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"` Login string `protobuf:"bytes,3,opt,name=login,proto3" json:"login,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` ModifiedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=modified_at,json=modifiedAt,proto3" json:"modified_at,omitempty"` LastLogin *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=last_login,json=lastLogin,proto3" json:"last_login,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) GetCreatedAt ¶
func (x *User) GetCreatedAt() *timestamppb.Timestamp
func (*User) GetLastLogin ¶
func (x *User) GetLastLogin() *timestamppb.Timestamp
func (*User) GetModifiedAt ¶
func (x *User) GetModifiedAt() *timestamppb.Timestamp
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
type UserRequest ¶
type UserRequest 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"` Login string `protobuf:"bytes,3,opt,name=login,proto3" json:"login,omitempty"` Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
func (*UserRequest) Descriptor
deprecated
func (*UserRequest) Descriptor() ([]byte, []int)
Deprecated: Use UserRequest.ProtoReflect.Descriptor instead.
func (*UserRequest) GetId ¶
func (x *UserRequest) GetId() int64
func (*UserRequest) GetLogin ¶
func (x *UserRequest) GetLogin() string
func (*UserRequest) GetName ¶
func (x *UserRequest) GetName() string
func (*UserRequest) GetPassword ¶
func (x *UserRequest) GetPassword() string
func (*UserRequest) ProtoMessage ¶
func (*UserRequest) ProtoMessage()
func (*UserRequest) ProtoReflect ¶
func (x *UserRequest) ProtoReflect() protoreflect.Message
func (*UserRequest) Reset ¶
func (x *UserRequest) Reset()
func (*UserRequest) String ¶
func (x *UserRequest) String() string
type UserResponse ¶
type UserResponse struct { Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` User *User `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*UserResponse) Descriptor
deprecated
func (*UserResponse) Descriptor() ([]byte, []int)
Deprecated: Use UserResponse.ProtoReflect.Descriptor instead.
func (*UserResponse) GetError ¶
func (x *UserResponse) GetError() string
func (*UserResponse) GetUser ¶
func (x *UserResponse) GetUser() *User
func (*UserResponse) ProtoMessage ¶
func (*UserResponse) ProtoMessage()
func (*UserResponse) ProtoReflect ¶
func (x *UserResponse) ProtoReflect() protoreflect.Message
func (*UserResponse) Reset ¶
func (x *UserResponse) Reset()
func (*UserResponse) String ¶
func (x *UserResponse) String() string
type UserServiceClient ¶
type UserServiceClient interface { Create(ctx context.Context, in *UserRequest, opts ...grpc.CallOption) (*UserResponse, error) Update(ctx context.Context, in *UserRequest, opts ...grpc.CallOption) (*UserResponse, error) Delete(ctx context.Context, in *UserRequest, opts ...grpc.CallOption) (*UserResponse, error) Get(ctx context.Context, in *UserRequest, opts ...grpc.CallOption) (*UserResponse, error) List(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListUserResponse, error) }
UserServiceClient is the client API for UserService 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 NewUserServiceClient ¶
func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient
type UserServiceServer ¶
type UserServiceServer interface { Create(context.Context, *UserRequest) (*UserResponse, error) Update(context.Context, *UserRequest) (*UserResponse, error) Delete(context.Context, *UserRequest) (*UserResponse, error) Get(context.Context, *UserRequest) (*UserResponse, error) List(context.Context, *emptypb.Empty) (*ListUserResponse, error) // contains filtered or unexported methods }
UserServiceServer is the server API for UserService service. All implementations must embed UnimplementedUserServiceServer for forward compatibility