Documentation ¶
Index ¶
- Variables
- func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
- type AddUserRequest
- type GetUserRequest
- type ListUsersRequest
- type UnimplementedUserServiceServer
- func (UnimplementedUserServiceServer) AddUser(context.Context, *AddUserRequest) (*User, error)
- func (UnimplementedUserServiceServer) GetUser(context.Context, *GetUserRequest) (*User, error)
- func (UnimplementedUserServiceServer) ListUsers(*ListUsersRequest, UserService_ListUsersServer) error
- func (UnimplementedUserServiceServer) UpdateUser(context.Context, *UpdateUserRequest) (*User, error)
- type UnsafeUserServiceServer
- type UpdateUserRequest
- func (*UpdateUserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateUserRequest) GetUpdateMask() *fieldmaskpb.FieldMask
- func (x *UpdateUserRequest) GetUser() *User
- func (*UpdateUserRequest) ProtoMessage()
- func (x *UpdateUserRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateUserRequest) Reset()
- func (x *UpdateUserRequest) String() string
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetCreateTime() *timestamppb.Timestamp
- func (x *User) GetEmail() string
- func (x *User) GetId() string
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
- type UserServiceClient
- type UserServiceServer
- type UserService_ListUsersClient
- type UserService_ListUsersServer
Constants ¶
This section is empty.
Variables ¶
var File_users_v1_users_proto protoreflect.FileDescriptor
var UserService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "users.v1.UserService", HandlerType: (*UserServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "AddUser", Handler: _UserService_AddUser_Handler, }, { MethodName: "GetUser", Handler: _UserService_GetUser_Handler, }, { MethodName: "UpdateUser", Handler: _UserService_UpdateUser_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "ListUsers", Handler: _UserService_ListUsers_Handler, ServerStreams: true, }, }, Metadata: "users/v1/users.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 AddUserRequest ¶
type AddUserRequest struct { Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` // contains filtered or unexported fields }
func (*AddUserRequest) Descriptor
deprecated
func (*AddUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use AddUserRequest.ProtoReflect.Descriptor instead.
func (*AddUserRequest) GetEmail ¶
func (x *AddUserRequest) GetEmail() string
func (*AddUserRequest) ProtoMessage ¶
func (*AddUserRequest) ProtoMessage()
func (*AddUserRequest) ProtoReflect ¶
func (x *AddUserRequest) ProtoReflect() protoreflect.Message
func (*AddUserRequest) Reset ¶
func (x *AddUserRequest) Reset()
func (*AddUserRequest) String ¶
func (x *AddUserRequest) String() string
type GetUserRequest ¶
type GetUserRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*GetUserRequest) Descriptor
deprecated
func (*GetUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetUserRequest.ProtoReflect.Descriptor instead.
func (*GetUserRequest) GetId ¶
func (x *GetUserRequest) GetId() string
func (*GetUserRequest) ProtoMessage ¶
func (*GetUserRequest) ProtoMessage()
func (*GetUserRequest) ProtoReflect ¶
func (x *GetUserRequest) ProtoReflect() protoreflect.Message
func (*GetUserRequest) Reset ¶
func (x *GetUserRequest) Reset()
func (*GetUserRequest) String ¶
func (x *GetUserRequest) String() string
type ListUsersRequest ¶
type ListUsersRequest struct {
// contains filtered or unexported fields
}
func (*ListUsersRequest) Descriptor
deprecated
func (*ListUsersRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListUsersRequest.ProtoReflect.Descriptor instead.
func (*ListUsersRequest) ProtoMessage ¶
func (*ListUsersRequest) ProtoMessage()
func (*ListUsersRequest) ProtoReflect ¶
func (x *ListUsersRequest) ProtoReflect() protoreflect.Message
func (*ListUsersRequest) Reset ¶
func (x *ListUsersRequest) Reset()
func (*ListUsersRequest) String ¶
func (x *ListUsersRequest) String() string
type UnimplementedUserServiceServer ¶
type UnimplementedUserServiceServer struct { }
UnimplementedUserServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedUserServiceServer) AddUser ¶
func (UnimplementedUserServiceServer) AddUser(context.Context, *AddUserRequest) (*User, error)
func (UnimplementedUserServiceServer) GetUser ¶
func (UnimplementedUserServiceServer) GetUser(context.Context, *GetUserRequest) (*User, error)
func (UnimplementedUserServiceServer) ListUsers ¶
func (UnimplementedUserServiceServer) ListUsers(*ListUsersRequest, UserService_ListUsersServer) error
func (UnimplementedUserServiceServer) UpdateUser ¶
func (UnimplementedUserServiceServer) UpdateUser(context.Context, *UpdateUserRequest) (*User, 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 UpdateUserRequest ¶
type UpdateUserRequest struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` // contains filtered or unexported fields }
func (*UpdateUserRequest) Descriptor
deprecated
func (*UpdateUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateUserRequest.ProtoReflect.Descriptor instead.
func (*UpdateUserRequest) GetUpdateMask ¶
func (x *UpdateUserRequest) GetUpdateMask() *fieldmaskpb.FieldMask
func (*UpdateUserRequest) GetUser ¶
func (x *UpdateUserRequest) GetUser() *User
func (*UpdateUserRequest) ProtoMessage ¶
func (*UpdateUserRequest) ProtoMessage()
func (*UpdateUserRequest) ProtoReflect ¶
func (x *UpdateUserRequest) ProtoReflect() protoreflect.Message
func (*UpdateUserRequest) Reset ¶
func (x *UpdateUserRequest) Reset()
func (*UpdateUserRequest) String ¶
func (x *UpdateUserRequest) String() string
type User ¶
type User struct { // Id uniquely identifies a user. Output only. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` // Output only. CreateTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) GetCreateTime ¶
func (x *User) GetCreateTime() *timestamppb.Timestamp
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
type UserServiceClient ¶
type UserServiceClient interface { AddUser(ctx context.Context, in *AddUserRequest, opts ...grpc.CallOption) (*User, error) GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*User, error) ListUsers(ctx context.Context, in *ListUsersRequest, opts ...grpc.CallOption) (UserService_ListUsersClient, error) UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*User, 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 { AddUser(context.Context, *AddUserRequest) (*User, error) GetUser(context.Context, *GetUserRequest) (*User, error) ListUsers(*ListUsersRequest, UserService_ListUsersServer) error UpdateUser(context.Context, *UpdateUserRequest) (*User, error) }
UserServiceServer is the server API for UserService service. All implementations should embed UnimplementedUserServiceServer for forward compatibility
type UserService_ListUsersClient ¶
type UserService_ListUsersClient interface { Recv() (*User, error) grpc.ClientStream }
type UserService_ListUsersServer ¶
type UserService_ListUsersServer interface { Send(*User) error grpc.ServerStream }