Documentation ¶
Index ¶
- Variables
- func RegisterAccountServiceServer(s grpc.ServiceRegistrar, srv AccountServiceServer)
- type Account
- type AccountServiceClient
- type AccountServiceServer
- type LoginAccountRequest
- func (*LoginAccountRequest) Descriptor() ([]byte, []int)deprecated
- func (x *LoginAccountRequest) GetName() string
- func (x *LoginAccountRequest) GetPass() string
- func (*LoginAccountRequest) ProtoMessage()
- func (x *LoginAccountRequest) ProtoReflect() protoreflect.Message
- func (x *LoginAccountRequest) Reset()
- func (x *LoginAccountRequest) String() string
- type UnimplementedAccountServiceServer
- type UnsafeAccountServiceServer
Constants ¶
This section is empty.
Variables ¶
var AccountService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "demo.account.v1.AccountService", HandlerType: (*AccountServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "LoginAccount", Handler: _AccountService_LoginAccount_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "account/v1/account.proto", }
AccountService_ServiceDesc is the grpc.ServiceDesc for AccountService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_account_v1_account_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAccountServiceServer ¶
func RegisterAccountServiceServer(s grpc.ServiceRegistrar, srv AccountServiceServer)
Types ¶
type Account ¶
type Account struct { Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` Pass string `protobuf:"bytes,2,opt,name=Pass,proto3" json:"Pass,omitempty"` // contains filtered or unexported fields }
定义 AccountService 服务返回参数
func (*Account) Descriptor
deprecated
func (*Account) ProtoMessage ¶
func (*Account) ProtoMessage()
func (*Account) ProtoReflect ¶
func (x *Account) ProtoReflect() protoreflect.Message
type AccountServiceClient ¶
type AccountServiceClient interface {
LoginAccount(ctx context.Context, in *LoginAccountRequest, opts ...grpc.CallOption) (*Account, error)
}
AccountServiceClient is the client API for AccountService 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 NewAccountServiceClient ¶
func NewAccountServiceClient(cc grpc.ClientConnInterface) AccountServiceClient
type AccountServiceServer ¶
type AccountServiceServer interface { LoginAccount(context.Context, *LoginAccountRequest) (*Account, error) // contains filtered or unexported methods }
AccountServiceServer is the server API for AccountService service. All implementations must embed UnimplementedAccountServiceServer for forward compatibility
type LoginAccountRequest ¶
type LoginAccountRequest struct { Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` Pass string `protobuf:"bytes,2,opt,name=Pass,proto3" json:"Pass,omitempty"` // contains filtered or unexported fields }
定义 AccountService 服务请求参数
func (*LoginAccountRequest) Descriptor
deprecated
func (*LoginAccountRequest) Descriptor() ([]byte, []int)
Deprecated: Use LoginAccountRequest.ProtoReflect.Descriptor instead.
func (*LoginAccountRequest) GetName ¶
func (x *LoginAccountRequest) GetName() string
func (*LoginAccountRequest) GetPass ¶
func (x *LoginAccountRequest) GetPass() string
func (*LoginAccountRequest) ProtoMessage ¶
func (*LoginAccountRequest) ProtoMessage()
func (*LoginAccountRequest) ProtoReflect ¶
func (x *LoginAccountRequest) ProtoReflect() protoreflect.Message
func (*LoginAccountRequest) Reset ¶
func (x *LoginAccountRequest) Reset()
func (*LoginAccountRequest) String ¶
func (x *LoginAccountRequest) String() string
type UnimplementedAccountServiceServer ¶
type UnimplementedAccountServiceServer struct { }
UnimplementedAccountServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedAccountServiceServer) LoginAccount ¶
func (UnimplementedAccountServiceServer) LoginAccount(context.Context, *LoginAccountRequest) (*Account, error)
type UnsafeAccountServiceServer ¶
type UnsafeAccountServiceServer interface {
// contains filtered or unexported methods
}
UnsafeAccountServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AccountServiceServer will result in compilation errors.