Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterAdminHTTPServer(s *http.Server, srv AdminHTTPServer)
- func RegisterAdminServer(s grpc.ServiceRegistrar, srv AdminServer)
- type AdminClient
- type AdminHTTPClient
- type AdminHTTPClientImpl
- type AdminHTTPServer
- type AdminServer
- type CreateAdminReply
- func (*CreateAdminReply) Descriptor() ([]byte, []int)deprecated
- func (x *CreateAdminReply) GetBirthday() uint64
- func (x *CreateAdminReply) GetGender() string
- func (x *CreateAdminReply) GetId() int64
- func (x *CreateAdminReply) GetMobile() string
- func (x *CreateAdminReply) GetNickName() string
- func (x *CreateAdminReply) GetPassword() string
- func (x *CreateAdminReply) GetRole() int32
- func (*CreateAdminReply) ProtoMessage()
- func (x *CreateAdminReply) ProtoReflect() protoreflect.Message
- func (x *CreateAdminReply) Reset()
- func (x *CreateAdminReply) String() string
- type CreateAdminRequest
- func (*CreateAdminRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateAdminRequest) GetMobile() string
- func (x *CreateAdminRequest) GetNickName() string
- func (x *CreateAdminRequest) GetPassword() string
- func (*CreateAdminRequest) ProtoMessage()
- func (x *CreateAdminRequest) ProtoReflect() protoreflect.Message
- func (x *CreateAdminRequest) Reset()
- func (x *CreateAdminRequest) String() string
- type UnimplementedAdminServer
- type UnsafeAdminServer
Constants ¶
const OperationAdminCreateAdmin = "/protocol.admin.Admin/CreateAdmin"
Variables ¶
var Admin_ServiceDesc = grpc.ServiceDesc{ ServiceName: "protocol.admin.Admin", HandlerType: (*AdminServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateAdmin", Handler: _Admin_CreateAdmin_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "admin/admin.proto", }
Admin_ServiceDesc is the grpc.ServiceDesc for Admin service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_admin_admin_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAdminHTTPServer ¶
func RegisterAdminHTTPServer(s *http.Server, srv AdminHTTPServer)
func RegisterAdminServer ¶
func RegisterAdminServer(s grpc.ServiceRegistrar, srv AdminServer)
Types ¶
type AdminClient ¶
type AdminClient interface {
CreateAdmin(ctx context.Context, in *CreateAdminRequest, opts ...grpc.CallOption) (*CreateAdminReply, error)
}
AdminClient is the client API for Admin 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 NewAdminClient ¶
func NewAdminClient(cc grpc.ClientConnInterface) AdminClient
type AdminHTTPClient ¶
type AdminHTTPClient interface {
CreateAdmin(ctx context.Context, req *CreateAdminRequest, opts ...http.CallOption) (rsp *CreateAdminReply, err error)
}
func NewAdminHTTPClient ¶
func NewAdminHTTPClient(client *http.Client) AdminHTTPClient
type AdminHTTPClientImpl ¶
type AdminHTTPClientImpl struct {
// contains filtered or unexported fields
}
func (*AdminHTTPClientImpl) CreateAdmin ¶
func (c *AdminHTTPClientImpl) CreateAdmin(ctx context.Context, in *CreateAdminRequest, opts ...http.CallOption) (*CreateAdminReply, error)
type AdminHTTPServer ¶
type AdminHTTPServer interface {
CreateAdmin(context.Context, *CreateAdminRequest) (*CreateAdminReply, error)
}
type AdminServer ¶
type AdminServer interface { CreateAdmin(context.Context, *CreateAdminRequest) (*CreateAdminReply, error) // contains filtered or unexported methods }
AdminServer is the server API for Admin service. All implementations must embed UnimplementedAdminServer for forward compatibility
type CreateAdminReply ¶
type CreateAdminReply struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` Mobile string `protobuf:"bytes,3,opt,name=mobile,proto3" json:"mobile,omitempty"` NickName string `protobuf:"bytes,4,opt,name=nickName,proto3" json:"nickName,omitempty"` Birthday uint64 `protobuf:"varint,5,opt,name=birthday,proto3" json:"birthday,omitempty"` Gender string `protobuf:"bytes,6,opt,name=gender,proto3" json:"gender,omitempty"` Role int32 `protobuf:"varint,7,opt,name=role,proto3" json:"role,omitempty"` // contains filtered or unexported fields }
func (*CreateAdminReply) Descriptor
deprecated
func (*CreateAdminReply) Descriptor() ([]byte, []int)
Deprecated: Use CreateAdminReply.ProtoReflect.Descriptor instead.
func (*CreateAdminReply) GetBirthday ¶
func (x *CreateAdminReply) GetBirthday() uint64
func (*CreateAdminReply) GetGender ¶
func (x *CreateAdminReply) GetGender() string
func (*CreateAdminReply) GetId ¶
func (x *CreateAdminReply) GetId() int64
func (*CreateAdminReply) GetMobile ¶
func (x *CreateAdminReply) GetMobile() string
func (*CreateAdminReply) GetNickName ¶
func (x *CreateAdminReply) GetNickName() string
func (*CreateAdminReply) GetPassword ¶
func (x *CreateAdminReply) GetPassword() string
func (*CreateAdminReply) GetRole ¶
func (x *CreateAdminReply) GetRole() int32
func (*CreateAdminReply) ProtoMessage ¶
func (*CreateAdminReply) ProtoMessage()
func (*CreateAdminReply) ProtoReflect ¶
func (x *CreateAdminReply) ProtoReflect() protoreflect.Message
func (*CreateAdminReply) Reset ¶
func (x *CreateAdminReply) Reset()
func (*CreateAdminReply) String ¶
func (x *CreateAdminReply) String() string
type CreateAdminRequest ¶
type CreateAdminRequest struct { NickName string `protobuf:"bytes,1,opt,name=nickName,proto3" json:"nickName,omitempty"` Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` Mobile string `protobuf:"bytes,3,opt,name=mobile,proto3" json:"mobile,omitempty"` // contains filtered or unexported fields }
func (*CreateAdminRequest) Descriptor
deprecated
func (*CreateAdminRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateAdminRequest.ProtoReflect.Descriptor instead.
func (*CreateAdminRequest) GetMobile ¶
func (x *CreateAdminRequest) GetMobile() string
func (*CreateAdminRequest) GetNickName ¶
func (x *CreateAdminRequest) GetNickName() string
func (*CreateAdminRequest) GetPassword ¶
func (x *CreateAdminRequest) GetPassword() string
func (*CreateAdminRequest) ProtoMessage ¶
func (*CreateAdminRequest) ProtoMessage()
func (*CreateAdminRequest) ProtoReflect ¶
func (x *CreateAdminRequest) ProtoReflect() protoreflect.Message
func (*CreateAdminRequest) Reset ¶
func (x *CreateAdminRequest) Reset()
func (*CreateAdminRequest) String ¶
func (x *CreateAdminRequest) String() string
type UnimplementedAdminServer ¶
type UnimplementedAdminServer struct { }
UnimplementedAdminServer must be embedded to have forward compatible implementations.
func (UnimplementedAdminServer) CreateAdmin ¶
func (UnimplementedAdminServer) CreateAdmin(context.Context, *CreateAdminRequest) (*CreateAdminReply, error)
type UnsafeAdminServer ¶
type UnsafeAdminServer interface {
// contains filtered or unexported methods
}
UnsafeAdminServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AdminServer will result in compilation errors.