Documentation ¶
Index ¶
- Variables
- func RegisterTeamServer(s grpc.ServiceRegistrar, srv TeamServer)
- type CreateReply
- func (*CreateReply) Descriptor() ([]byte, []int)deprecated
- func (x *CreateReply) GetCode() string
- func (x *CreateReply) GetErr() *common.CommonResponse
- func (*CreateReply) ProtoMessage()
- func (x *CreateReply) ProtoReflect() protoreflect.Message
- func (x *CreateReply) Reset()
- func (x *CreateReply) String() string
- type CreateRequest
- type GetReply
- type GetRequest
- type JoinReply
- type JoinRequest
- type LeaveReply
- type LeaveRequest
- type Server
- func (s Server) Create(ctx context.Context, req *CreateRequest) (*CreateReply, error)
- func (s Server) Get(ctx context.Context, req *GetRequest) (*GetReply, error)
- func (s Server) Join(ctx context.Context, req *JoinRequest) (*JoinReply, error)
- func (s Server) Leave(ctx context.Context, req *LeaveRequest) (*LeaveReply, error)
- func (s Server) Transfer(ctx context.Context, req *TransferRequest) (*TransferReply, error)
- type TeamClient
- type TeamInfo
- func (*TeamInfo) Descriptor() ([]byte, []int)deprecated
- func (x *TeamInfo) GetCode() string
- func (x *TeamInfo) GetGender() string
- func (x *TeamInfo) GetId() uint64
- func (x *TeamInfo) GetMembers() []*user.UserInfo
- func (x *TeamInfo) GetOwner() *user.UserInfo
- func (*TeamInfo) ProtoMessage()
- func (x *TeamInfo) ProtoReflect() protoreflect.Message
- func (x *TeamInfo) Reset()
- func (x *TeamInfo) String() string
- type TeamServer
- type TransferReply
- type TransferRequest
- func (*TransferRequest) Descriptor() ([]byte, []int)deprecated
- func (x *TransferRequest) GetNewOwnerId() uint64
- func (x *TransferRequest) GetOldOwnerId() uint64
- func (*TransferRequest) ProtoMessage()
- func (x *TransferRequest) ProtoReflect() protoreflect.Message
- func (x *TransferRequest) Reset()
- func (x *TransferRequest) String() string
- type UnimplementedTeamServer
- func (UnimplementedTeamServer) Create(context.Context, *CreateRequest) (*CreateReply, error)
- func (UnimplementedTeamServer) Get(context.Context, *GetRequest) (*GetReply, error)
- func (UnimplementedTeamServer) Join(context.Context, *JoinRequest) (*JoinReply, error)
- func (UnimplementedTeamServer) Leave(context.Context, *LeaveRequest) (*LeaveReply, error)
- func (UnimplementedTeamServer) Transfer(context.Context, *TransferRequest) (*TransferReply, error)
- type UnsafeTeamServer
Constants ¶
This section is empty.
Variables ¶
var File_team_proto protoreflect.FileDescriptor
var Team_ServiceDesc = grpc.ServiceDesc{ ServiceName: "team.Team", HandlerType: (*TeamServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Create", Handler: _Team_Create_Handler, }, { MethodName: "Get", Handler: _Team_Get_Handler, }, { MethodName: "Join", Handler: _Team_Join_Handler, }, { MethodName: "Leave", Handler: _Team_Leave_Handler, }, { MethodName: "Transfer", Handler: _Team_Transfer_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "team.proto", }
Team_ServiceDesc is the grpc.ServiceDesc for Team service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterTeamServer ¶
func RegisterTeamServer(s grpc.ServiceRegistrar, srv TeamServer)
Types ¶
type CreateReply ¶
type CreateReply struct { Err *common.CommonResponse `protobuf:"bytes,1,opt,name=err,proto3" json:"err,omitempty"` Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` // contains filtered or unexported fields }
func (*CreateReply) Descriptor
deprecated
func (*CreateReply) Descriptor() ([]byte, []int)
Deprecated: Use CreateReply.ProtoReflect.Descriptor instead.
func (*CreateReply) GetCode ¶
func (x *CreateReply) GetCode() string
func (*CreateReply) GetErr ¶
func (x *CreateReply) GetErr() *common.CommonResponse
func (*CreateReply) ProtoMessage ¶
func (*CreateReply) ProtoMessage()
func (*CreateReply) ProtoReflect ¶
func (x *CreateReply) ProtoReflect() protoreflect.Message
func (*CreateReply) Reset ¶
func (x *CreateReply) Reset()
func (*CreateReply) String ¶
func (x *CreateReply) String() string
type CreateRequest ¶
type CreateRequest struct { UserId uint64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` // contains filtered or unexported fields }
func (*CreateRequest) Descriptor
deprecated
func (*CreateRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead.
func (*CreateRequest) GetUserId ¶
func (x *CreateRequest) GetUserId() uint64
func (*CreateRequest) ProtoMessage ¶
func (*CreateRequest) ProtoMessage()
func (*CreateRequest) ProtoReflect ¶
func (x *CreateRequest) ProtoReflect() protoreflect.Message
func (*CreateRequest) Reset ¶
func (x *CreateRequest) Reset()
func (*CreateRequest) String ¶
func (x *CreateRequest) String() string
type GetReply ¶
type GetReply struct { Err *common.CommonResponse `protobuf:"bytes,1,opt,name=err,proto3" json:"err,omitempty"` Team *TeamInfo `protobuf:"bytes,2,opt,name=team,proto3" json:"team,omitempty"` // contains filtered or unexported fields }
func (*GetReply) Descriptor
deprecated
func (*GetReply) GetErr ¶
func (x *GetReply) GetErr() *common.CommonResponse
func (*GetReply) ProtoMessage ¶
func (*GetReply) ProtoMessage()
func (*GetReply) ProtoReflect ¶
func (x *GetReply) ProtoReflect() protoreflect.Message
type GetRequest ¶
type GetRequest struct { UserId uint64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` // contains filtered or unexported fields }
func (*GetRequest) Descriptor
deprecated
func (*GetRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.
func (*GetRequest) GetUserId ¶
func (x *GetRequest) GetUserId() uint64
func (*GetRequest) ProtoMessage ¶
func (*GetRequest) ProtoMessage()
func (*GetRequest) ProtoReflect ¶
func (x *GetRequest) ProtoReflect() protoreflect.Message
func (*GetRequest) Reset ¶
func (x *GetRequest) Reset()
func (*GetRequest) String ¶
func (x *GetRequest) String() string
type JoinReply ¶
type JoinReply struct { Err *common.CommonResponse `protobuf:"bytes,1,opt,name=err,proto3" json:"err,omitempty"` // contains filtered or unexported fields }
func (*JoinReply) Descriptor
deprecated
func (*JoinReply) GetErr ¶
func (x *JoinReply) GetErr() *common.CommonResponse
func (*JoinReply) ProtoMessage ¶
func (*JoinReply) ProtoMessage()
func (*JoinReply) ProtoReflect ¶
func (x *JoinReply) ProtoReflect() protoreflect.Message
type JoinRequest ¶
type JoinRequest struct { UserId uint64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` // contains filtered or unexported fields }
func (*JoinRequest) Descriptor
deprecated
func (*JoinRequest) Descriptor() ([]byte, []int)
Deprecated: Use JoinRequest.ProtoReflect.Descriptor instead.
func (*JoinRequest) GetCode ¶
func (x *JoinRequest) GetCode() string
func (*JoinRequest) GetUserId ¶
func (x *JoinRequest) GetUserId() uint64
func (*JoinRequest) ProtoMessage ¶
func (*JoinRequest) ProtoMessage()
func (*JoinRequest) ProtoReflect ¶
func (x *JoinRequest) ProtoReflect() protoreflect.Message
func (*JoinRequest) Reset ¶
func (x *JoinRequest) Reset()
func (*JoinRequest) String ¶
func (x *JoinRequest) String() string
type LeaveReply ¶
type LeaveReply struct { Err *common.CommonResponse `protobuf:"bytes,1,opt,name=err,proto3" json:"err,omitempty"` // contains filtered or unexported fields }
func (*LeaveReply) Descriptor
deprecated
func (*LeaveReply) Descriptor() ([]byte, []int)
Deprecated: Use LeaveReply.ProtoReflect.Descriptor instead.
func (*LeaveReply) GetErr ¶
func (x *LeaveReply) GetErr() *common.CommonResponse
func (*LeaveReply) ProtoMessage ¶
func (*LeaveReply) ProtoMessage()
func (*LeaveReply) ProtoReflect ¶
func (x *LeaveReply) ProtoReflect() protoreflect.Message
func (*LeaveReply) Reset ¶
func (x *LeaveReply) Reset()
func (*LeaveReply) String ¶
func (x *LeaveReply) String() string
type LeaveRequest ¶
type LeaveRequest struct { UserId uint64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` // contains filtered or unexported fields }
func (*LeaveRequest) Descriptor
deprecated
func (*LeaveRequest) Descriptor() ([]byte, []int)
Deprecated: Use LeaveRequest.ProtoReflect.Descriptor instead.
func (*LeaveRequest) GetUserId ¶
func (x *LeaveRequest) GetUserId() uint64
func (*LeaveRequest) ProtoMessage ¶
func (*LeaveRequest) ProtoMessage()
func (*LeaveRequest) ProtoReflect ¶
func (x *LeaveRequest) ProtoReflect() protoreflect.Message
func (*LeaveRequest) Reset ¶
func (x *LeaveRequest) Reset()
func (*LeaveRequest) String ¶
func (x *LeaveRequest) String() string
type Server ¶
type Server struct { Config *viper.Viper UnimplementedTeamServer }
func (Server) Create ¶
func (s Server) Create(ctx context.Context, req *CreateRequest) (*CreateReply, error)
func (Server) Leave ¶
func (s Server) Leave(ctx context.Context, req *LeaveRequest) (*LeaveReply, error)
func (Server) Transfer ¶
func (s Server) Transfer(ctx context.Context, req *TransferRequest) (*TransferReply, error)
type TeamClient ¶
type TeamClient interface { Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateReply, error) Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetReply, error) Join(ctx context.Context, in *JoinRequest, opts ...grpc.CallOption) (*JoinReply, error) Leave(ctx context.Context, in *LeaveRequest, opts ...grpc.CallOption) (*LeaveReply, error) Transfer(ctx context.Context, in *TransferRequest, opts ...grpc.CallOption) (*TransferReply, error) }
TeamClient is the client API for Team 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 NewTeamClient ¶
func NewTeamClient(cc grpc.ClientConnInterface) TeamClient
type TeamInfo ¶
type TeamInfo struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` Gender string `protobuf:"bytes,3,opt,name=gender,proto3" json:"gender,omitempty"` Owner *user.UserInfo `protobuf:"bytes,4,opt,name=owner,proto3" json:"owner,omitempty"` Members []*user.UserInfo `protobuf:"bytes,5,rep,name=members,proto3" json:"members,omitempty"` // contains filtered or unexported fields }
func (*TeamInfo) Descriptor
deprecated
func (*TeamInfo) GetMembers ¶
func (*TeamInfo) ProtoMessage ¶
func (*TeamInfo) ProtoMessage()
func (*TeamInfo) ProtoReflect ¶
func (x *TeamInfo) ProtoReflect() protoreflect.Message
type TeamServer ¶
type TeamServer interface { Create(context.Context, *CreateRequest) (*CreateReply, error) Get(context.Context, *GetRequest) (*GetReply, error) Join(context.Context, *JoinRequest) (*JoinReply, error) Leave(context.Context, *LeaveRequest) (*LeaveReply, error) Transfer(context.Context, *TransferRequest) (*TransferReply, error) // contains filtered or unexported methods }
TeamServer is the server API for Team service. All implementations must embed UnimplementedTeamServer for forward compatibility
type TransferReply ¶
type TransferReply struct { Err *common.CommonResponse `protobuf:"bytes,1,opt,name=err,proto3" json:"err,omitempty"` // contains filtered or unexported fields }
func (*TransferReply) Descriptor
deprecated
func (*TransferReply) Descriptor() ([]byte, []int)
Deprecated: Use TransferReply.ProtoReflect.Descriptor instead.
func (*TransferReply) GetErr ¶
func (x *TransferReply) GetErr() *common.CommonResponse
func (*TransferReply) ProtoMessage ¶
func (*TransferReply) ProtoMessage()
func (*TransferReply) ProtoReflect ¶
func (x *TransferReply) ProtoReflect() protoreflect.Message
func (*TransferReply) Reset ¶
func (x *TransferReply) Reset()
func (*TransferReply) String ¶
func (x *TransferReply) String() string
type TransferRequest ¶
type TransferRequest struct { OldOwnerId uint64 `protobuf:"varint,1,opt,name=oldOwnerId,proto3" json:"oldOwnerId,omitempty"` NewOwnerId uint64 `protobuf:"varint,2,opt,name=newOwnerId,proto3" json:"newOwnerId,omitempty"` // contains filtered or unexported fields }
func (*TransferRequest) Descriptor
deprecated
func (*TransferRequest) Descriptor() ([]byte, []int)
Deprecated: Use TransferRequest.ProtoReflect.Descriptor instead.
func (*TransferRequest) GetNewOwnerId ¶
func (x *TransferRequest) GetNewOwnerId() uint64
func (*TransferRequest) GetOldOwnerId ¶
func (x *TransferRequest) GetOldOwnerId() uint64
func (*TransferRequest) ProtoMessage ¶
func (*TransferRequest) ProtoMessage()
func (*TransferRequest) ProtoReflect ¶
func (x *TransferRequest) ProtoReflect() protoreflect.Message
func (*TransferRequest) Reset ¶
func (x *TransferRequest) Reset()
func (*TransferRequest) String ¶
func (x *TransferRequest) String() string
type UnimplementedTeamServer ¶
type UnimplementedTeamServer struct { }
UnimplementedTeamServer must be embedded to have forward compatible implementations.
func (UnimplementedTeamServer) Create ¶
func (UnimplementedTeamServer) Create(context.Context, *CreateRequest) (*CreateReply, error)
func (UnimplementedTeamServer) Get ¶
func (UnimplementedTeamServer) Get(context.Context, *GetRequest) (*GetReply, error)
func (UnimplementedTeamServer) Join ¶
func (UnimplementedTeamServer) Join(context.Context, *JoinRequest) (*JoinReply, error)
func (UnimplementedTeamServer) Leave ¶
func (UnimplementedTeamServer) Leave(context.Context, *LeaveRequest) (*LeaveReply, error)
func (UnimplementedTeamServer) Transfer ¶
func (UnimplementedTeamServer) Transfer(context.Context, *TransferRequest) (*TransferReply, error)
type UnsafeTeamServer ¶
type UnsafeTeamServer interface {
// contains filtered or unexported methods
}
UnsafeTeamServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TeamServer will result in compilation errors.