v1

package
v0.0.0-...-b62a1b2 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2023 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Login_Login_FullMethodName = "/layout.login.v1.Login/Login"
)
View Source
const OperationLoginLogin = "/layout.login.v1.Login/Login"

Variables

View Source
var (
	ErrorReason_name = map[int32]string{
		0: "USER_DOES_NOT_EXIST",
		1: "INCORRECT_PASSWORD",
		2: "ACCOUNT_HAS_BEEN_BANNED",
		3: "LOGIN_ERROR",
	}
	ErrorReason_value = map[string]int32{
		"USER_DOES_NOT_EXIST":     0,
		"INCORRECT_PASSWORD":      1,
		"ACCOUNT_HAS_BEEN_BANNED": 2,
		"LOGIN_ERROR":             3,
	}
)

Enum value maps for ErrorReason.

View Source
var File_login_v1_error_reason_proto protoreflect.FileDescriptor
View Source
var File_login_v1_login_proto protoreflect.FileDescriptor
View Source
var Login_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "layout.login.v1.Login",
	HandlerType: (*LoginServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Login",
			Handler:    _Login_Login_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "login/v1/login.proto",
}

Login_ServiceDesc is the grpc.ServiceDesc for Login service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterLoginHTTPServer

func RegisterLoginHTTPServer(s *http.Server, srv LoginHTTPServer)

func RegisterLoginServer

func RegisterLoginServer(s grpc.ServiceRegistrar, srv LoginServer)

Types

type ErrorReason

type ErrorReason int32
const (
	ErrorReason_USER_DOES_NOT_EXIST     ErrorReason = 0
	ErrorReason_INCORRECT_PASSWORD      ErrorReason = 1
	ErrorReason_ACCOUNT_HAS_BEEN_BANNED ErrorReason = 2
	ErrorReason_LOGIN_ERROR             ErrorReason = 3
)

func (ErrorReason) Descriptor

func (ErrorReason) Enum

func (x ErrorReason) Enum() *ErrorReason

func (ErrorReason) EnumDescriptor deprecated

func (ErrorReason) EnumDescriptor() ([]byte, []int)

Deprecated: Use ErrorReason.Descriptor instead.

func (ErrorReason) Number

func (x ErrorReason) Number() protoreflect.EnumNumber

func (ErrorReason) String

func (x ErrorReason) String() string

func (ErrorReason) Type

type LoginClient

type LoginClient interface {
	Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginReply, error)
}

LoginClient is the client API for Login 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 NewLoginClient

func NewLoginClient(cc grpc.ClientConnInterface) LoginClient

type LoginHTTPClient

type LoginHTTPClient interface {
	Login(ctx context.Context, req *LoginRequest, opts ...http.CallOption) (rsp *LoginReply, err error)
}

func NewLoginHTTPClient

func NewLoginHTTPClient(client *http.Client) LoginHTTPClient

type LoginHTTPClientImpl

type LoginHTTPClientImpl struct {
	// contains filtered or unexported fields
}

func (*LoginHTTPClientImpl) Login

type LoginHTTPServer

type LoginHTTPServer interface {
	Login(context.Context, *LoginRequest) (*LoginReply, error)
}

type LoginOutReplyMultiError

type LoginOutReplyMultiError []error

LoginOutReplyMultiError is an error wrapping multiple validation errors returned by LoginOutReply.ValidateAll() if the designated constraints aren't met.

func (LoginOutReplyMultiError) AllErrors

func (m LoginOutReplyMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (LoginOutReplyMultiError) Error

func (m LoginOutReplyMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type LoginOutReplyValidationError

type LoginOutReplyValidationError struct {
	// contains filtered or unexported fields
}

LoginOutReplyValidationError is the validation error returned by LoginOutReply.Validate if the designated constraints aren't met.

func (LoginOutReplyValidationError) Cause

Cause function returns cause value.

func (LoginOutReplyValidationError) Error

Error satisfies the builtin error interface

func (LoginOutReplyValidationError) ErrorName

func (e LoginOutReplyValidationError) ErrorName() string

ErrorName returns error name.

func (LoginOutReplyValidationError) Field

Field function returns field value.

func (LoginOutReplyValidationError) Key

Key function returns key value.

func (LoginOutReplyValidationError) Reason

Reason function returns reason value.

type LoginOutRequestMultiError

type LoginOutRequestMultiError []error

LoginOutRequestMultiError is an error wrapping multiple validation errors returned by LoginOutRequest.ValidateAll() if the designated constraints aren't met.

func (LoginOutRequestMultiError) AllErrors

func (m LoginOutRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (LoginOutRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type LoginOutRequestValidationError

type LoginOutRequestValidationError struct {
	// contains filtered or unexported fields
}

LoginOutRequestValidationError is the validation error returned by LoginOutRequest.Validate if the designated constraints aren't met.

func (LoginOutRequestValidationError) Cause

Cause function returns cause value.

func (LoginOutRequestValidationError) Error

Error satisfies the builtin error interface

func (LoginOutRequestValidationError) ErrorName

func (e LoginOutRequestValidationError) ErrorName() string

ErrorName returns error name.

func (LoginOutRequestValidationError) Field

Field function returns field value.

func (LoginOutRequestValidationError) Key

Key function returns key value.

func (LoginOutRequestValidationError) Reason

Reason function returns reason value.

type LoginReply

type LoginReply struct {
	Token string    `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	User  *UserInfo `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"`
	// contains filtered or unexported fields
}

func (*LoginReply) Descriptor deprecated

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

Deprecated: Use LoginReply.ProtoReflect.Descriptor instead.

func (*LoginReply) GetToken

func (x *LoginReply) GetToken() string

func (*LoginReply) GetUser

func (x *LoginReply) GetUser() *UserInfo

func (*LoginReply) ProtoMessage

func (*LoginReply) ProtoMessage()

func (*LoginReply) ProtoReflect

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

func (*LoginReply) Reset

func (x *LoginReply) Reset()

func (*LoginReply) String

func (x *LoginReply) String() string

func (*LoginReply) Validate

func (m *LoginReply) Validate() error

Validate checks the field values on LoginReply with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*LoginReply) ValidateAll

func (m *LoginReply) ValidateAll() error

ValidateAll checks the field values on LoginReply with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in LoginReplyMultiError, or nil if none found.

type LoginReplyMultiError

type LoginReplyMultiError []error

LoginReplyMultiError is an error wrapping multiple validation errors returned by LoginReply.ValidateAll() if the designated constraints aren't met.

func (LoginReplyMultiError) AllErrors

func (m LoginReplyMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (LoginReplyMultiError) Error

func (m LoginReplyMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type LoginReplyValidationError

type LoginReplyValidationError struct {
	// contains filtered or unexported fields
}

LoginReplyValidationError is the validation error returned by LoginReply.Validate if the designated constraints aren't met.

func (LoginReplyValidationError) Cause

func (e LoginReplyValidationError) Cause() error

Cause function returns cause value.

func (LoginReplyValidationError) Error

Error satisfies the builtin error interface

func (LoginReplyValidationError) ErrorName

func (e LoginReplyValidationError) ErrorName() string

ErrorName returns error name.

func (LoginReplyValidationError) Field

Field function returns field value.

func (LoginReplyValidationError) Key

Key function returns key value.

func (LoginReplyValidationError) Reason

func (e LoginReplyValidationError) Reason() string

Reason function returns reason value.

type LoginRequest

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

func (*LoginRequest) Descriptor deprecated

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

Deprecated: Use LoginRequest.ProtoReflect.Descriptor instead.

func (*LoginRequest) GetAccount

func (x *LoginRequest) GetAccount() string

func (*LoginRequest) GetPassword

func (x *LoginRequest) GetPassword() string

func (*LoginRequest) ProtoMessage

func (*LoginRequest) ProtoMessage()

func (*LoginRequest) ProtoReflect

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

func (*LoginRequest) Reset

func (x *LoginRequest) Reset()

func (*LoginRequest) String

func (x *LoginRequest) String() string

func (*LoginRequest) Validate

func (m *LoginRequest) Validate() error

Validate checks the field values on LoginRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*LoginRequest) ValidateAll

func (m *LoginRequest) ValidateAll() error

ValidateAll checks the field values on LoginRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in LoginRequestMultiError, or nil if none found.

type LoginRequestMultiError

type LoginRequestMultiError []error

LoginRequestMultiError is an error wrapping multiple validation errors returned by LoginRequest.ValidateAll() if the designated constraints aren't met.

func (LoginRequestMultiError) AllErrors

func (m LoginRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (LoginRequestMultiError) Error

func (m LoginRequestMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type LoginRequestValidationError

type LoginRequestValidationError struct {
	// contains filtered or unexported fields
}

LoginRequestValidationError is the validation error returned by LoginRequest.Validate if the designated constraints aren't met.

func (LoginRequestValidationError) Cause

Cause function returns cause value.

func (LoginRequestValidationError) Error

Error satisfies the builtin error interface

func (LoginRequestValidationError) ErrorName

func (e LoginRequestValidationError) ErrorName() string

ErrorName returns error name.

func (LoginRequestValidationError) Field

Field function returns field value.

func (LoginRequestValidationError) Key

Key function returns key value.

func (LoginRequestValidationError) Reason

Reason function returns reason value.

type LoginServer

type LoginServer interface {
	Login(context.Context, *LoginRequest) (*LoginReply, error)
	// contains filtered or unexported methods
}

LoginServer is the server API for Login service. All implementations must embed UnimplementedLoginServer for forward compatibility

type UnimplementedLoginServer

type UnimplementedLoginServer struct {
}

UnimplementedLoginServer must be embedded to have forward compatible implementations.

func (UnimplementedLoginServer) Login

type UnsafeLoginServer

type UnsafeLoginServer interface {
	// contains filtered or unexported methods
}

UnsafeLoginServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to LoginServer will result in compilation errors.

type UserInfo

type UserInfo struct {
	Num      string `protobuf:"bytes,1,opt,name=num,proto3" json:"num,omitempty"`
	Account  string `protobuf:"bytes,2,opt,name=account,proto3" json:"account,omitempty"`
	NickName string `protobuf:"bytes,3,opt,name=nickName,proto3" json:"nickName,omitempty"`
	Avatar   string `protobuf:"bytes,4,opt,name=avatar,proto3" json:"avatar,omitempty"`
	// contains filtered or unexported fields
}

func (*UserInfo) Descriptor deprecated

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

Deprecated: Use UserInfo.ProtoReflect.Descriptor instead.

func (*UserInfo) GetAccount

func (x *UserInfo) GetAccount() string

func (*UserInfo) GetAvatar

func (x *UserInfo) GetAvatar() string

func (*UserInfo) GetNickName

func (x *UserInfo) GetNickName() string

func (*UserInfo) GetNum

func (x *UserInfo) GetNum() string

func (*UserInfo) ProtoMessage

func (*UserInfo) ProtoMessage()

func (*UserInfo) ProtoReflect

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

func (*UserInfo) Reset

func (x *UserInfo) Reset()

func (*UserInfo) String

func (x *UserInfo) String() string

func (*UserInfo) Validate

func (m *UserInfo) Validate() error

Validate checks the field values on UserInfo with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*UserInfo) ValidateAll

func (m *UserInfo) ValidateAll() error

ValidateAll checks the field values on UserInfo with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in UserInfoMultiError, or nil if none found.

type UserInfoMultiError

type UserInfoMultiError []error

UserInfoMultiError is an error wrapping multiple validation errors returned by UserInfo.ValidateAll() if the designated constraints aren't met.

func (UserInfoMultiError) AllErrors

func (m UserInfoMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (UserInfoMultiError) Error

func (m UserInfoMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type UserInfoValidationError

type UserInfoValidationError struct {
	// contains filtered or unexported fields
}

UserInfoValidationError is the validation error returned by UserInfo.Validate if the designated constraints aren't met.

func (UserInfoValidationError) Cause

func (e UserInfoValidationError) Cause() error

Cause function returns cause value.

func (UserInfoValidationError) Error

func (e UserInfoValidationError) Error() string

Error satisfies the builtin error interface

func (UserInfoValidationError) ErrorName

func (e UserInfoValidationError) ErrorName() string

ErrorName returns error name.

func (UserInfoValidationError) Field

func (e UserInfoValidationError) Field() string

Field function returns field value.

func (UserInfoValidationError) Key

func (e UserInfoValidationError) Key() bool

Key function returns key value.

func (UserInfoValidationError) Reason

func (e UserInfoValidationError) Reason() string

Reason function returns reason value.

Jump to

Keyboard shortcuts

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