v1

package
v0.0.0-...-259e43b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 6, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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)

View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Account.ProtoReflect.Descriptor instead.

func (*Account) GetName

func (x *Account) GetName() string

func (*Account) GetPass

func (x *Account) GetPass() string

func (*Account) ProtoMessage

func (*Account) ProtoMessage()

func (*Account) ProtoReflect

func (x *Account) ProtoReflect() protoreflect.Message

func (*Account) Reset

func (x *Account) Reset()

func (*Account) String

func (x *Account) String() string

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.

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

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL