Documentation
¶
Index ¶
- Variables
- func RegisterUserServiceServer(s *grpc.Server, srv UserServiceServer)
- type CreateUserRequest
- func (*CreateUserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateUserRequest) GetBio() string
- func (x *CreateUserRequest) GetName() string
- func (x *CreateUserRequest) GetUsername() string
- func (*CreateUserRequest) ProtoMessage()
- func (x *CreateUserRequest) ProtoReflect() protoreflect.Message
- func (x *CreateUserRequest) Reset()
- func (x *CreateUserRequest) String() string
- type DeleteUserRequest
- type DeleteUserResponse
- type GetUserByIdRequest
- type GetUserByIdResponse
- func (*GetUserByIdResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetUserByIdResponse) GetData() *User
- func (*GetUserByIdResponse) ProtoMessage()
- func (x *GetUserByIdResponse) ProtoReflect() protoreflect.Message
- func (x *GetUserByIdResponse) Reset()
- func (x *GetUserByIdResponse) String() string
- type GetUsersRequest
- func (*GetUsersRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetUsersRequest) GetLimit() int32
- func (x *GetUsersRequest) GetOffset() int32
- func (*GetUsersRequest) ProtoMessage()
- func (x *GetUsersRequest) ProtoReflect() protoreflect.Message
- func (x *GetUsersRequest) Reset()
- func (x *GetUsersRequest) String() string
- type GetUsersResponse
- type UnimplementedUserServiceServer
- func (*UnimplementedUserServiceServer) CreateUser(context.Context, *CreateUserRequest) (*User, error)
- func (*UnimplementedUserServiceServer) DeleteUser(context.Context, *DeleteUserRequest) (*DeleteUserResponse, error)
- func (*UnimplementedUserServiceServer) GetUserById(context.Context, *GetUserByIdRequest) (*GetUserByIdResponse, error)
- func (*UnimplementedUserServiceServer) GetUsers(context.Context, *GetUsersRequest) (*GetUsersResponse, error)
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetBio() string
- func (x *User) GetId() int32
- func (x *User) GetName() string
- func (x *User) GetUsername() string
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
- type UserServiceClient
- type UserServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_pb_user_proto protoreflect.FileDescriptor
Functions ¶
func RegisterUserServiceServer ¶
func RegisterUserServiceServer(s *grpc.Server, srv UserServiceServer)
Types ¶
type CreateUserRequest ¶
type CreateUserRequest struct {
Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Bio string `protobuf:"bytes,3,opt,name=bio,proto3" json:"bio,omitempty"`
// contains filtered or unexported fields
}
func (*CreateUserRequest) Descriptor
deprecated
func (*CreateUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateUserRequest.ProtoReflect.Descriptor instead.
func (*CreateUserRequest) GetBio ¶
func (x *CreateUserRequest) GetBio() string
func (*CreateUserRequest) GetName ¶
func (x *CreateUserRequest) GetName() string
func (*CreateUserRequest) GetUsername ¶
func (x *CreateUserRequest) GetUsername() string
func (*CreateUserRequest) ProtoMessage ¶
func (*CreateUserRequest) ProtoMessage()
func (*CreateUserRequest) ProtoReflect ¶
func (x *CreateUserRequest) ProtoReflect() protoreflect.Message
func (*CreateUserRequest) Reset ¶
func (x *CreateUserRequest) Reset()
func (*CreateUserRequest) String ¶
func (x *CreateUserRequest) String() string
type DeleteUserRequest ¶
type DeleteUserRequest struct {
Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
// contains filtered or unexported fields
}
func (*DeleteUserRequest) Descriptor
deprecated
func (*DeleteUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteUserRequest.ProtoReflect.Descriptor instead.
func (*DeleteUserRequest) GetId ¶
func (x *DeleteUserRequest) GetId() int32
func (*DeleteUserRequest) ProtoMessage ¶
func (*DeleteUserRequest) ProtoMessage()
func (*DeleteUserRequest) ProtoReflect ¶
func (x *DeleteUserRequest) ProtoReflect() protoreflect.Message
func (*DeleteUserRequest) Reset ¶
func (x *DeleteUserRequest) Reset()
func (*DeleteUserRequest) String ¶
func (x *DeleteUserRequest) String() string
type DeleteUserResponse ¶
type DeleteUserResponse struct {
User *User `protobuf:"bytes,1,opt,name=user,proto3,oneof" json:"user,omitempty"`
// contains filtered or unexported fields
}
func (*DeleteUserResponse) Descriptor
deprecated
func (*DeleteUserResponse) Descriptor() ([]byte, []int)
Deprecated: Use DeleteUserResponse.ProtoReflect.Descriptor instead.
func (*DeleteUserResponse) GetUser ¶
func (x *DeleteUserResponse) GetUser() *User
func (*DeleteUserResponse) ProtoMessage ¶
func (*DeleteUserResponse) ProtoMessage()
func (*DeleteUserResponse) ProtoReflect ¶
func (x *DeleteUserResponse) ProtoReflect() protoreflect.Message
func (*DeleteUserResponse) Reset ¶
func (x *DeleteUserResponse) Reset()
func (*DeleteUserResponse) String ¶
func (x *DeleteUserResponse) String() string
type GetUserByIdRequest ¶
type GetUserByIdRequest struct {
Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
// contains filtered or unexported fields
}
func (*GetUserByIdRequest) Descriptor
deprecated
func (*GetUserByIdRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetUserByIdRequest.ProtoReflect.Descriptor instead.
func (*GetUserByIdRequest) GetId ¶
func (x *GetUserByIdRequest) GetId() int32
func (*GetUserByIdRequest) ProtoMessage ¶
func (*GetUserByIdRequest) ProtoMessage()
func (*GetUserByIdRequest) ProtoReflect ¶
func (x *GetUserByIdRequest) ProtoReflect() protoreflect.Message
func (*GetUserByIdRequest) Reset ¶
func (x *GetUserByIdRequest) Reset()
func (*GetUserByIdRequest) String ¶
func (x *GetUserByIdRequest) String() string
type GetUserByIdResponse ¶
type GetUserByIdResponse struct {
Data *User `protobuf:"bytes,1,opt,name=data,proto3,oneof" json:"data,omitempty"`
// contains filtered or unexported fields
}
func (*GetUserByIdResponse) Descriptor
deprecated
func (*GetUserByIdResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetUserByIdResponse.ProtoReflect.Descriptor instead.
func (*GetUserByIdResponse) GetData ¶
func (x *GetUserByIdResponse) GetData() *User
func (*GetUserByIdResponse) ProtoMessage ¶
func (*GetUserByIdResponse) ProtoMessage()
func (*GetUserByIdResponse) ProtoReflect ¶
func (x *GetUserByIdResponse) ProtoReflect() protoreflect.Message
func (*GetUserByIdResponse) Reset ¶
func (x *GetUserByIdResponse) Reset()
func (*GetUserByIdResponse) String ¶
func (x *GetUserByIdResponse) String() string
type GetUsersRequest ¶
type GetUsersRequest struct {
Offset *int32 `protobuf:"varint,1,opt,name=offset,proto3,oneof" json:"offset,omitempty"`
Limit *int32 `protobuf:"varint,2,opt,name=limit,proto3,oneof" json:"limit,omitempty"`
// contains filtered or unexported fields
}
func (*GetUsersRequest) Descriptor
deprecated
func (*GetUsersRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetUsersRequest.ProtoReflect.Descriptor instead.
func (*GetUsersRequest) GetLimit ¶
func (x *GetUsersRequest) GetLimit() int32
func (*GetUsersRequest) GetOffset ¶
func (x *GetUsersRequest) GetOffset() int32
func (*GetUsersRequest) ProtoMessage ¶
func (*GetUsersRequest) ProtoMessage()
func (*GetUsersRequest) ProtoReflect ¶
func (x *GetUsersRequest) ProtoReflect() protoreflect.Message
func (*GetUsersRequest) Reset ¶
func (x *GetUsersRequest) Reset()
func (*GetUsersRequest) String ¶
func (x *GetUsersRequest) String() string
type GetUsersResponse ¶
type GetUsersResponse struct {
Data []*User `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"`
// contains filtered or unexported fields
}
func (*GetUsersResponse) Descriptor
deprecated
func (*GetUsersResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetUsersResponse.ProtoReflect.Descriptor instead.
func (*GetUsersResponse) GetData ¶
func (x *GetUsersResponse) GetData() []*User
func (*GetUsersResponse) ProtoMessage ¶
func (*GetUsersResponse) ProtoMessage()
func (*GetUsersResponse) ProtoReflect ¶
func (x *GetUsersResponse) ProtoReflect() protoreflect.Message
func (*GetUsersResponse) Reset ¶
func (x *GetUsersResponse) Reset()
func (*GetUsersResponse) String ¶
func (x *GetUsersResponse) String() string
type UnimplementedUserServiceServer ¶
type UnimplementedUserServiceServer struct {
}
UnimplementedUserServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedUserServiceServer) CreateUser ¶
func (*UnimplementedUserServiceServer) CreateUser(context.Context, *CreateUserRequest) (*User, error)
func (*UnimplementedUserServiceServer) DeleteUser ¶
func (*UnimplementedUserServiceServer) DeleteUser(context.Context, *DeleteUserRequest) (*DeleteUserResponse, error)
func (*UnimplementedUserServiceServer) GetUserById ¶
func (*UnimplementedUserServiceServer) GetUserById(context.Context, *GetUserByIdRequest) (*GetUserByIdResponse, error)
func (*UnimplementedUserServiceServer) GetUsers ¶
func (*UnimplementedUserServiceServer) GetUsers(context.Context, *GetUsersRequest) (*GetUsersResponse, error)
type User ¶
type User struct {
Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
Bio string `protobuf:"bytes,4,opt,name=bio,proto3" json:"bio,omitempty"`
// contains filtered or unexported fields
}
func (*User) Descriptor
deprecated
func (*User) GetUsername ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
type UserServiceClient ¶
type UserServiceClient interface {
CreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*User, error)
GetUsers(ctx context.Context, in *GetUsersRequest, opts ...grpc.CallOption) (*GetUsersResponse, error)
GetUserById(ctx context.Context, in *GetUserByIdRequest, opts ...grpc.CallOption) (*GetUserByIdResponse, error)
DeleteUser(ctx context.Context, in *DeleteUserRequest, opts ...grpc.CallOption) (*DeleteUserResponse, error)
}
UserServiceClient is the client API for UserService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewUserServiceClient ¶
func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient
type UserServiceServer ¶
type UserServiceServer interface {
CreateUser(context.Context, *CreateUserRequest) (*User, error)
GetUsers(context.Context, *GetUsersRequest) (*GetUsersResponse, error)
GetUserById(context.Context, *GetUserByIdRequest) (*GetUserByIdResponse, error)
DeleteUser(context.Context, *DeleteUserRequest) (*DeleteUserResponse, error)
}
UserServiceServer is the server API for UserService service.