v1

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserAuth_UserReg_FullMethodName          = "/api.user.v1.UserAuth/UserReg"
	UserAuth_UserBingPhone_FullMethodName    = "/api.user.v1.UserAuth/UserBingPhone"
	UserAuth_UserMergeAccount_FullMethodName = "/api.user.v1.UserAuth/UserMergeAccount"
)
View Source
const OperationUserAuthUserBingPhone = "/api.user.v1.UserAuth/UserBingPhone"
View Source
const OperationUserAuthUserMergeAccount = "/api.user.v1.UserAuth/UserMergeAccount"
View Source
const OperationUserAuthUserReg = "/api.user.v1.UserAuth/UserReg"

Variables

View Source
var File_user_v1_common_proto protoreflect.FileDescriptor
View Source
var File_user_v1_user_auth_proto protoreflect.FileDescriptor
View Source
var UserAuth_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "api.user.v1.UserAuth",
	HandlerType: (*UserAuthServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "UserReg",
			Handler:    _UserAuth_UserReg_Handler,
		},
		{
			MethodName: "UserBingPhone",
			Handler:    _UserAuth_UserBingPhone_Handler,
		},
		{
			MethodName: "UserMergeAccount",
			Handler:    _UserAuth_UserMergeAccount_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "user/v1/user_auth.proto",
}

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

Functions

func RegisterUserAuthHTTPServer

func RegisterUserAuthHTTPServer(s *http.Server, srv UserAuthHTTPServer)

func RegisterUserAuthServer

func RegisterUserAuthServer(s grpc.ServiceRegistrar, srv UserAuthServer)

Types

type Reply

type Reply struct {
	StatusCode int32  `protobuf:"varint,1,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"` // 状态码
	Message    string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`                          // 提示信息
	Data       string `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`                                // json字符串
	// contains filtered or unexported fields
}

func (*Reply) Descriptor deprecated

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

Deprecated: Use Reply.ProtoReflect.Descriptor instead.

func (*Reply) GetData

func (x *Reply) GetData() string

func (*Reply) GetMessage

func (x *Reply) GetMessage() string

func (*Reply) GetStatusCode

func (x *Reply) GetStatusCode() int32

func (*Reply) ProtoMessage

func (*Reply) ProtoMessage()

func (*Reply) ProtoReflect

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

func (*Reply) Reset

func (x *Reply) Reset()

func (*Reply) String

func (x *Reply) String() string

type UnimplementedUserAuthServer

type UnimplementedUserAuthServer struct{}

UnimplementedUserAuthServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedUserAuthServer) UserBingPhone

func (UnimplementedUserAuthServer) UserMergeAccount

func (UnimplementedUserAuthServer) UserReg

type UnsafeUserAuthServer

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

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

type UserAuthClient

type UserAuthClient interface {
	// 用户注册(登录)
	UserReg(ctx context.Context, in *UserRegRequest, opts ...grpc.CallOption) (*Reply, error)
	// 用户绑定手机号
	UserBingPhone(ctx context.Context, in *UserBingPhoneRequest, opts ...grpc.CallOption) (*Reply, error)
	// 账号合并功能
	UserMergeAccount(ctx context.Context, in *UserMergeAccountRequest, opts ...grpc.CallOption) (*Reply, error)
}

UserAuthClient is the client API for UserAuth 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 NewUserAuthClient

func NewUserAuthClient(cc grpc.ClientConnInterface) UserAuthClient

type UserAuthHTTPClient

type UserAuthHTTPClient interface {
	UserBingPhone(ctx context.Context, req *UserBingPhoneRequest, opts ...http.CallOption) (rsp *Reply, err error)
	UserMergeAccount(ctx context.Context, req *UserMergeAccountRequest, opts ...http.CallOption) (rsp *Reply, err error)
	UserReg(ctx context.Context, req *UserRegRequest, opts ...http.CallOption) (rsp *Reply, err error)
}

func NewUserAuthHTTPClient

func NewUserAuthHTTPClient(client *http.Client) UserAuthHTTPClient

type UserAuthHTTPClientImpl

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

func (*UserAuthHTTPClientImpl) UserBingPhone

func (c *UserAuthHTTPClientImpl) UserBingPhone(ctx context.Context, in *UserBingPhoneRequest, opts ...http.CallOption) (*Reply, error)

func (*UserAuthHTTPClientImpl) UserMergeAccount

func (c *UserAuthHTTPClientImpl) UserMergeAccount(ctx context.Context, in *UserMergeAccountRequest, opts ...http.CallOption) (*Reply, error)

func (*UserAuthHTTPClientImpl) UserReg

func (c *UserAuthHTTPClientImpl) UserReg(ctx context.Context, in *UserRegRequest, opts ...http.CallOption) (*Reply, error)

type UserAuthHTTPServer

type UserAuthHTTPServer interface {
	// UserBingPhone 用户绑定手机号
	UserBingPhone(context.Context, *UserBingPhoneRequest) (*Reply, error)
	// UserMergeAccount 账号合并功能
	UserMergeAccount(context.Context, *UserMergeAccountRequest) (*Reply, error)
	// UserReg 用户注册(登录)
	UserReg(context.Context, *UserRegRequest) (*Reply, error)
}

type UserAuthServer

type UserAuthServer interface {
	// 用户注册(登录)
	UserReg(context.Context, *UserRegRequest) (*Reply, error)
	// 用户绑定手机号
	UserBingPhone(context.Context, *UserBingPhoneRequest) (*Reply, error)
	// 账号合并功能
	UserMergeAccount(context.Context, *UserMergeAccountRequest) (*Reply, error)
	// contains filtered or unexported methods
}

UserAuthServer is the server API for UserAuth service. All implementations must embed UnimplementedUserAuthServer for forward compatibility.

用户认证管理

type UserBingPhoneRequest

type UserBingPhoneRequest struct {

	// 用户标识,不能为空
	OpenId string `protobuf:"bytes,1,opt,name=openId,proto3" json:"openId,omitempty"`
	// 手机号获取凭证,不能为空
	Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"`
	// 应用AppId,不能为空
	AppId string `protobuf:"bytes,3,opt,name=appId,proto3" json:"appId,omitempty"`
	// contains filtered or unexported fields
}

用户绑定手机号

func (*UserBingPhoneRequest) Descriptor deprecated

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

Deprecated: Use UserBingPhoneRequest.ProtoReflect.Descriptor instead.

func (*UserBingPhoneRequest) GetAppId

func (x *UserBingPhoneRequest) GetAppId() string

func (*UserBingPhoneRequest) GetCode

func (x *UserBingPhoneRequest) GetCode() string

func (*UserBingPhoneRequest) GetOpenId

func (x *UserBingPhoneRequest) GetOpenId() string

func (*UserBingPhoneRequest) ProtoMessage

func (*UserBingPhoneRequest) ProtoMessage()

func (*UserBingPhoneRequest) ProtoReflect

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

func (*UserBingPhoneRequest) Reset

func (x *UserBingPhoneRequest) Reset()

func (*UserBingPhoneRequest) String

func (x *UserBingPhoneRequest) String() string

type UserMergeAccountRequest

type UserMergeAccountRequest struct {

	// 要合并的手机号
	Phone string `protobuf:"bytes,1,opt,name=phone,proto3" json:"phone,omitempty"`
	// 用户OpenID
	OpenId string `protobuf:"bytes,2,opt,name=openId,proto3" json:"openId,omitempty"`
	// 应用AppId,不能为空
	AppId string `protobuf:"bytes,3,opt,name=appId,proto3" json:"appId,omitempty"`
	// contains filtered or unexported fields
}

用户合并账号

func (*UserMergeAccountRequest) Descriptor deprecated

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

Deprecated: Use UserMergeAccountRequest.ProtoReflect.Descriptor instead.

func (*UserMergeAccountRequest) GetAppId

func (x *UserMergeAccountRequest) GetAppId() string

func (*UserMergeAccountRequest) GetOpenId

func (x *UserMergeAccountRequest) GetOpenId() string

func (*UserMergeAccountRequest) GetPhone

func (x *UserMergeAccountRequest) GetPhone() string

func (*UserMergeAccountRequest) ProtoMessage

func (*UserMergeAccountRequest) ProtoMessage()

func (*UserMergeAccountRequest) ProtoReflect

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

func (*UserMergeAccountRequest) Reset

func (x *UserMergeAccountRequest) Reset()

func (*UserMergeAccountRequest) String

func (x *UserMergeAccountRequest) String() string

type UserRegRequest

type UserRegRequest struct {

	// 设备编号,不能为空
	Sn string `protobuf:"bytes,1,opt,name=sn,proto3" json:"sn,omitempty"`
	// 临时登录凭证,不能为空
	Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"`
	// 应用AppId,不能为空
	AppId string `protobuf:"bytes,3,opt,name=appId,proto3" json:"appId,omitempty"`
	// contains filtered or unexported fields
}

注册用户必须参数

func (*UserRegRequest) Descriptor deprecated

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

Deprecated: Use UserRegRequest.ProtoReflect.Descriptor instead.

func (*UserRegRequest) GetAppId

func (x *UserRegRequest) GetAppId() string

func (*UserRegRequest) GetCode

func (x *UserRegRequest) GetCode() string

func (*UserRegRequest) GetSn

func (x *UserRegRequest) GetSn() string

func (*UserRegRequest) ProtoMessage

func (*UserRegRequest) ProtoMessage()

func (*UserRegRequest) ProtoReflect

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

func (*UserRegRequest) Reset

func (x *UserRegRequest) Reset()

func (*UserRegRequest) String

func (x *UserRegRequest) String() string

Jump to

Keyboard shortcuts

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