account

package
v0.0.0-...-3237e8e Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AccountService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "account.AccountService",
	HandlerType: (*AccountServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Get",
			Handler:    _AccountService_Get_Handler,
		},
		{
			MethodName: "Auth",
			Handler:    _AccountService_Auth_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "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_proto protoreflect.FileDescriptor

Functions

func NewAccountServiceHTTPServer

func NewAccountServiceHTTPServer(srv AccountServiceServer, logger *logrus.Entry) http.Handler

func RegisterAccountServiceServer

func RegisterAccountServiceServer(s grpc.ServiceRegistrar, srv AccountServiceServer)

Types

type Account

type Account struct {
	Id        uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Username  string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
	Password  string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"`
	Age       uint64 `protobuf:"varint,4,opt,name=age,proto3" json:"age,omitempty"`
	Email     string `protobuf:"bytes,5,opt,name=email,proto3" json:"email,omitempty"`
	Bank      uint64 `protobuf:"varint,6,opt,name=bank,proto3" json:"bank,omitempty"`
	Cellphone uint64 `protobuf:"varint,7,opt,name=cellphone,proto3" json:"cellphone,omitempty"`
	// contains filtered or unexported fields
}

func (*Account) Descriptor deprecated

func (*Account) Descriptor() ([]byte, []int)

Deprecated: Use Account.ProtoReflect.Descriptor instead.

func (*Account) GetAge

func (x *Account) GetAge() uint64

func (*Account) GetBank

func (x *Account) GetBank() uint64

func (*Account) GetCellphone

func (x *Account) GetCellphone() uint64

func (*Account) GetEmail

func (x *Account) GetEmail() string

func (*Account) GetId

func (x *Account) GetId() uint64

func (*Account) GetPassword

func (x *Account) GetPassword() string

func (*Account) GetUsername

func (x *Account) GetUsername() 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 {
	Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error)
	Auth(ctx context.Context, in *AuthRequest, opts ...grpc.CallOption) (*AuthResponse, 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 AccountServiceHTTPServer

type AccountServiceHTTPServer interface {
	Auth(context.Context, *AuthRequest) (*AuthResponse, error)

	Get(context.Context, *GetRequest) (*GetResponse, error)
}

type AccountServiceServer

type AccountServiceServer interface {
	Get(context.Context, *GetRequest) (*GetResponse, error)
	Auth(context.Context, *AuthRequest) (*AuthResponse, error)
	// contains filtered or unexported methods
}

AccountServiceServer is the server API for AccountService service. All implementations must embed UnimplementedAccountServiceServer for forward compatibility

type AuthRequest

type AuthRequest struct {
	Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	// contains filtered or unexported fields
}

func (*AuthRequest) Descriptor deprecated

func (*AuthRequest) Descriptor() ([]byte, []int)

Deprecated: Use AuthRequest.ProtoReflect.Descriptor instead.

func (*AuthRequest) GetPassword

func (x *AuthRequest) GetPassword() string

func (*AuthRequest) GetUsername

func (x *AuthRequest) GetUsername() string

func (*AuthRequest) ProtoMessage

func (*AuthRequest) ProtoMessage()

func (*AuthRequest) ProtoReflect

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

func (*AuthRequest) Reset

func (x *AuthRequest) Reset()

func (*AuthRequest) String

func (x *AuthRequest) String() string

type AuthResponse

type AuthResponse struct {
	Code uint64   `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	Msg  string   `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
	Data *Account `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*AuthResponse) Descriptor deprecated

func (*AuthResponse) Descriptor() ([]byte, []int)

Deprecated: Use AuthResponse.ProtoReflect.Descriptor instead.

func (*AuthResponse) GetCode

func (x *AuthResponse) GetCode() uint64

func (*AuthResponse) GetData

func (x *AuthResponse) GetData() *Account

func (*AuthResponse) GetMsg

func (x *AuthResponse) GetMsg() string

func (*AuthResponse) ProtoMessage

func (*AuthResponse) ProtoMessage()

func (*AuthResponse) ProtoReflect

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

func (*AuthResponse) Reset

func (x *AuthResponse) Reset()

func (*AuthResponse) String

func (x *AuthResponse) String() string

type GetRequest

type GetRequest struct {
	Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` // optional
	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // optional
	// contains filtered or unexported fields
}

func (*GetRequest) Descriptor deprecated

func (*GetRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.

func (*GetRequest) GetPassword

func (x *GetRequest) GetPassword() string

func (*GetRequest) GetUsername

func (x *GetRequest) GetUsername() string

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 GetResponse

type GetResponse struct {
	Code uint64   `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	Msg  string   `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
	Data *Account `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*GetResponse) Descriptor deprecated

func (*GetResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetResponse.ProtoReflect.Descriptor instead.

func (*GetResponse) GetCode

func (x *GetResponse) GetCode() uint64

func (*GetResponse) GetData

func (x *GetResponse) GetData() *Account

func (*GetResponse) GetMsg

func (x *GetResponse) GetMsg() string

func (*GetResponse) ProtoMessage

func (*GetResponse) ProtoMessage()

func (*GetResponse) ProtoReflect

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

func (*GetResponse) Reset

func (x *GetResponse) Reset()

func (*GetResponse) String

func (x *GetResponse) String() string

type UnimplementedAccountServiceServer

type UnimplementedAccountServiceServer struct {
}

UnimplementedAccountServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedAccountServiceServer) Auth

func (UnimplementedAccountServiceServer) Get

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