Documentation
¶
Index ¶
- Variables
- func AuthService_Login_Handler(svr interface{}, ctx context.Context, f server.FilterFunc) (interface{}, error)
- func AuthService_Synchronize_Handler(svr interface{}, ctx context.Context, f server.FilterFunc) (interface{}, error)
- func AuthService_UserSpace_Handler(svr interface{}, ctx context.Context, f server.FilterFunc) (interface{}, error)
- func RegisterAuthService(s server.Service, svr AuthService)
- type AuthClientProxy
- type AuthClientProxyImpl
- func (c *AuthClientProxyImpl) Login(ctx context.Context, req *LoginRequest, opts ...client.Option) (*LoginResponse, error)
- func (c *AuthClientProxyImpl) Synchronize(ctx context.Context, req *SynchronizeRequest, opts ...client.Option) (*SynchronizeResponse, error)
- func (c *AuthClientProxyImpl) UserSpace(ctx context.Context, req *UserSpaceRequest, opts ...client.Option) (*UserSpaceResponse, error)
- type AuthService
- type LoginRequest
- func (*LoginRequest) Descriptor() ([]byte, []int)deprecated
- func (x *LoginRequest) GetMetadata() *common.Metadata
- func (x *LoginRequest) GetPasswordHash() string
- func (x *LoginRequest) GetUsername() string
- func (*LoginRequest) ProtoMessage()
- func (x *LoginRequest) ProtoReflect() protoreflect.Message
- func (x *LoginRequest) Reset()
- func (x *LoginRequest) String() string
- type LoginResponse
- func (*LoginResponse) Descriptor() ([]byte, []int)deprecated
- func (x *LoginResponse) GetData() *LoginResponse_Data
- func (x *LoginResponse) GetErrCode() int32
- func (x *LoginResponse) GetErrMsg() string
- func (*LoginResponse) ProtoMessage()
- func (x *LoginResponse) ProtoReflect() protoreflect.Message
- func (x *LoginResponse) Reset()
- func (x *LoginResponse) String() string
- type LoginResponse_Data
- func (*LoginResponse_Data) Descriptor() ([]byte, []int)deprecated
- func (x *LoginResponse_Data) GetIdTicket() string
- func (*LoginResponse_Data) ProtoMessage()
- func (x *LoginResponse_Data) ProtoReflect() protoreflect.Message
- func (x *LoginResponse_Data) Reset()
- func (x *LoginResponse_Data) String() string
- type SynchronizeRequest
- func (*SynchronizeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SynchronizeRequest) GetMetadata() *common.Metadata
- func (*SynchronizeRequest) ProtoMessage()
- func (x *SynchronizeRequest) ProtoReflect() protoreflect.Message
- func (x *SynchronizeRequest) Reset()
- func (x *SynchronizeRequest) String() string
- type SynchronizeResponse
- func (*SynchronizeResponse) Descriptor() ([]byte, []int)deprecated
- func (x *SynchronizeResponse) GetData() *SynchronizeResponse_Data
- func (x *SynchronizeResponse) GetErrCode() int32
- func (x *SynchronizeResponse) GetErrMsg() string
- func (*SynchronizeResponse) ProtoMessage()
- func (x *SynchronizeResponse) ProtoReflect() protoreflect.Message
- func (x *SynchronizeResponse) Reset()
- func (x *SynchronizeResponse) String() string
- type SynchronizeResponse_Data
- func (*SynchronizeResponse_Data) Descriptor() ([]byte, []int)deprecated
- func (x *SynchronizeResponse_Data) GetDesc() string
- func (x *SynchronizeResponse_Data) GetTimezone() string
- func (x *SynchronizeResponse_Data) GetTsMsec() int64
- func (*SynchronizeResponse_Data) ProtoMessage()
- func (x *SynchronizeResponse_Data) ProtoReflect() protoreflect.Message
- func (x *SynchronizeResponse_Data) Reset()
- func (x *SynchronizeResponse_Data) String() string
- type UnimplementedAuth
- func (s *UnimplementedAuth) Login(ctx context.Context, req *LoginRequest) (*LoginResponse, error)
- func (s *UnimplementedAuth) Synchronize(ctx context.Context, req *SynchronizeRequest) (*SynchronizeResponse, error)
- func (s *UnimplementedAuth) UserSpace(ctx context.Context, req *UserSpaceRequest) (*UserSpaceResponse, error)
- type UserSpaceRequest
- func (*UserSpaceRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UserSpaceRequest) GetMetadata() *common.Metadata
- func (x *UserSpaceRequest) GetUsername() string
- func (*UserSpaceRequest) ProtoMessage()
- func (x *UserSpaceRequest) ProtoReflect() protoreflect.Message
- func (x *UserSpaceRequest) Reset()
- func (x *UserSpaceRequest) String() string
- type UserSpaceResponse
- func (*UserSpaceResponse) Descriptor() ([]byte, []int)deprecated
- func (x *UserSpaceResponse) GetData() *UserSpaceResponse_Data
- func (x *UserSpaceResponse) GetErrCode() int32
- func (x *UserSpaceResponse) GetErrMsg() string
- func (*UserSpaceResponse) ProtoMessage()
- func (x *UserSpaceResponse) ProtoReflect() protoreflect.Message
- func (x *UserSpaceResponse) Reset()
- func (x *UserSpaceResponse) String() string
- type UserSpaceResponse_Data
- func (*UserSpaceResponse_Data) Descriptor() ([]byte, []int)deprecated
- func (x *UserSpaceResponse_Data) GetBadges() []*achieve.Badge
- func (x *UserSpaceResponse_Data) GetReputation() *achieve.Reputation
- func (x *UserSpaceResponse_Data) GetUserInfo() *UserSpaceResponse_UserInfo
- func (*UserSpaceResponse_Data) ProtoMessage()
- func (x *UserSpaceResponse_Data) ProtoReflect() protoreflect.Message
- func (x *UserSpaceResponse_Data) Reset()
- func (x *UserSpaceResponse_Data) String() string
- type UserSpaceResponse_UserInfo
- func (*UserSpaceResponse_UserInfo) Descriptor() ([]byte, []int)deprecated
- func (x *UserSpaceResponse_UserInfo) GetCreateTsSec() int64
- func (x *UserSpaceResponse_UserInfo) GetNickname() string
- func (x *UserSpaceResponse_UserInfo) GetUserId() string
- func (x *UserSpaceResponse_UserInfo) GetUsername() string
- func (*UserSpaceResponse_UserInfo) ProtoMessage()
- func (x *UserSpaceResponse_UserInfo) ProtoReflect() protoreflect.Message
- func (x *UserSpaceResponse_UserInfo) Reset()
- func (x *UserSpaceResponse_UserInfo) String() string
Constants ¶
This section is empty.
Variables ¶
var AuthServer_ServiceDesc = server.ServiceDesc{ ServiceName: "trpc.demo.httpauth.Auth", HandlerType: ((*AuthService)(nil)), Methods: []server.Method{ { Name: "/demo/auth/Login", Func: AuthService_Login_Handler, }, { Name: "/demo/auth/Synchronize", Func: AuthService_Synchronize_Handler, }, { Name: "/demo/auth/UserSpace", Func: AuthService_UserSpace_Handler, }, { Name: "/trpc.demo.httpauth.Auth/Login", Func: AuthService_Login_Handler, }, { Name: "/trpc.demo.httpauth.Auth/Synchronize", Func: AuthService_Synchronize_Handler, }, { Name: "/trpc.demo.httpauth.Auth/UserSpace", Func: AuthService_UserSpace_Handler, }, }, }
AuthServer_ServiceDesc descriptor for server.RegisterService.
var File_http_auth_proto protoreflect.FileDescriptor
var NewAuthClientProxy = func(opts ...client.Option) AuthClientProxy { return &AuthClientProxyImpl{client: client.DefaultClient, opts: opts} }
Functions ¶
func AuthService_Login_Handler ¶
func AuthService_Login_Handler(svr interface{}, ctx context.Context, f server.FilterFunc) (interface{}, error)
func AuthService_Synchronize_Handler ¶
func AuthService_Synchronize_Handler(svr interface{}, ctx context.Context, f server.FilterFunc) (interface{}, error)
func AuthService_UserSpace_Handler ¶
func AuthService_UserSpace_Handler(svr interface{}, ctx context.Context, f server.FilterFunc) (interface{}, error)
func RegisterAuthService ¶
func RegisterAuthService(s server.Service, svr AuthService)
RegisterAuthService registers service.
Types ¶
type AuthClientProxy ¶
type AuthClientProxy interface { Login(ctx context.Context, req *LoginRequest, opts ...client.Option) (rsp *LoginResponse, err error) // @alias=/demo/auth/Login Synchronize(ctx context.Context, req *SynchronizeRequest, opts ...client.Option) (rsp *SynchronizeResponse, err error) // @alias=/demo/auth/Synchronize UserSpace(ctx context.Context, req *UserSpaceRequest, opts ...client.Option) (rsp *UserSpaceResponse, err error) // @alias=/demo/auth/UserSpace }
AuthClientProxy defines service client proxy
type AuthClientProxyImpl ¶
type AuthClientProxyImpl struct {
// contains filtered or unexported fields
}
func (*AuthClientProxyImpl) Login ¶
func (c *AuthClientProxyImpl) Login(ctx context.Context, req *LoginRequest, opts ...client.Option) (*LoginResponse, error)
func (*AuthClientProxyImpl) Synchronize ¶
func (c *AuthClientProxyImpl) Synchronize(ctx context.Context, req *SynchronizeRequest, opts ...client.Option) (*SynchronizeResponse, error)
func (*AuthClientProxyImpl) UserSpace ¶
func (c *AuthClientProxyImpl) UserSpace(ctx context.Context, req *UserSpaceRequest, opts ...client.Option) (*UserSpaceResponse, error)
type AuthService ¶
type AuthService interface { Login(ctx context.Context, req *LoginRequest) (*LoginResponse, error) // @alias=/demo/auth/Login Synchronize(ctx context.Context, req *SynchronizeRequest) (*SynchronizeResponse, error) // @alias=/demo/auth/Synchronize UserSpace(ctx context.Context, req *UserSpaceRequest) (*UserSpaceResponse, error) // @alias=/demo/auth/UserSpace }
AuthService defines service.
type LoginRequest ¶
type LoginRequest struct { Metadata *common.Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` PasswordHash string `protobuf:"bytes,3,opt,name=password_hash,json=passwordHash,proto3" json:"password_hash,omitempty"` // contains filtered or unexported fields }
func (*LoginRequest) Descriptor
deprecated
func (*LoginRequest) Descriptor() ([]byte, []int)
Deprecated: Use LoginRequest.ProtoReflect.Descriptor instead.
func (*LoginRequest) GetMetadata ¶
func (x *LoginRequest) GetMetadata() *common.Metadata
func (*LoginRequest) GetPasswordHash ¶
func (x *LoginRequest) GetPasswordHash() string
func (*LoginRequest) GetUsername ¶
func (x *LoginRequest) GetUsername() 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
type LoginResponse ¶
type LoginResponse struct { ErrCode int32 `protobuf:"varint,1,opt,name=err_code,json=errCode,proto3" json:"err_code"` ErrMsg string `protobuf:"bytes,2,opt,name=err_msg,json=errMsg,proto3" json:"err_msg,omitempty"` Data *LoginResponse_Data `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*LoginResponse) Descriptor
deprecated
func (*LoginResponse) Descriptor() ([]byte, []int)
Deprecated: Use LoginResponse.ProtoReflect.Descriptor instead.
func (*LoginResponse) GetData ¶
func (x *LoginResponse) GetData() *LoginResponse_Data
func (*LoginResponse) GetErrCode ¶
func (x *LoginResponse) GetErrCode() int32
func (*LoginResponse) GetErrMsg ¶
func (x *LoginResponse) GetErrMsg() string
func (*LoginResponse) ProtoMessage ¶
func (*LoginResponse) ProtoMessage()
func (*LoginResponse) ProtoReflect ¶
func (x *LoginResponse) ProtoReflect() protoreflect.Message
func (*LoginResponse) Reset ¶
func (x *LoginResponse) Reset()
func (*LoginResponse) String ¶
func (x *LoginResponse) String() string
type LoginResponse_Data ¶
type LoginResponse_Data struct { IdTicket string `protobuf:"bytes,1,opt,name=id_ticket,json=idTicket,proto3" json:"id_ticket,omitempty"` // contains filtered or unexported fields }
func (*LoginResponse_Data) Descriptor
deprecated
func (*LoginResponse_Data) Descriptor() ([]byte, []int)
Deprecated: Use LoginResponse_Data.ProtoReflect.Descriptor instead.
func (*LoginResponse_Data) GetIdTicket ¶
func (x *LoginResponse_Data) GetIdTicket() string
func (*LoginResponse_Data) ProtoMessage ¶
func (*LoginResponse_Data) ProtoMessage()
func (*LoginResponse_Data) ProtoReflect ¶
func (x *LoginResponse_Data) ProtoReflect() protoreflect.Message
func (*LoginResponse_Data) Reset ¶
func (x *LoginResponse_Data) Reset()
func (*LoginResponse_Data) String ¶
func (x *LoginResponse_Data) String() string
type SynchronizeRequest ¶
type SynchronizeRequest struct { Metadata *common.Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` // contains filtered or unexported fields }
func (*SynchronizeRequest) Descriptor
deprecated
func (*SynchronizeRequest) Descriptor() ([]byte, []int)
Deprecated: Use SynchronizeRequest.ProtoReflect.Descriptor instead.
func (*SynchronizeRequest) GetMetadata ¶
func (x *SynchronizeRequest) GetMetadata() *common.Metadata
func (*SynchronizeRequest) ProtoMessage ¶
func (*SynchronizeRequest) ProtoMessage()
func (*SynchronizeRequest) ProtoReflect ¶
func (x *SynchronizeRequest) ProtoReflect() protoreflect.Message
func (*SynchronizeRequest) Reset ¶
func (x *SynchronizeRequest) Reset()
func (*SynchronizeRequest) String ¶
func (x *SynchronizeRequest) String() string
type SynchronizeResponse ¶
type SynchronizeResponse struct { ErrCode int32 `protobuf:"varint,1,opt,name=err_code,json=errCode,proto3" json:"err_code"` ErrMsg string `protobuf:"bytes,2,opt,name=err_msg,json=errMsg,proto3" json:"err_msg,omitempty"` Data *SynchronizeResponse_Data `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*SynchronizeResponse) Descriptor
deprecated
func (*SynchronizeResponse) Descriptor() ([]byte, []int)
Deprecated: Use SynchronizeResponse.ProtoReflect.Descriptor instead.
func (*SynchronizeResponse) GetData ¶
func (x *SynchronizeResponse) GetData() *SynchronizeResponse_Data
func (*SynchronizeResponse) GetErrCode ¶
func (x *SynchronizeResponse) GetErrCode() int32
func (*SynchronizeResponse) GetErrMsg ¶
func (x *SynchronizeResponse) GetErrMsg() string
func (*SynchronizeResponse) ProtoMessage ¶
func (*SynchronizeResponse) ProtoMessage()
func (*SynchronizeResponse) ProtoReflect ¶
func (x *SynchronizeResponse) ProtoReflect() protoreflect.Message
func (*SynchronizeResponse) Reset ¶
func (x *SynchronizeResponse) Reset()
func (*SynchronizeResponse) String ¶
func (x *SynchronizeResponse) String() string
type SynchronizeResponse_Data ¶
type SynchronizeResponse_Data struct { TsMsec int64 `protobuf:"varint,1,opt,name=ts_msec,json=tsMsec,proto3" json:"ts_msec,omitempty"` // 毫秒级时间戳 Desc string `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc,omitempty"` // 时间可视化描述 Timezone string `protobuf:"bytes,3,opt,name=timezone,proto3" json:"timezone,omitempty"` // 时区 // contains filtered or unexported fields }
func (*SynchronizeResponse_Data) Descriptor
deprecated
func (*SynchronizeResponse_Data) Descriptor() ([]byte, []int)
Deprecated: Use SynchronizeResponse_Data.ProtoReflect.Descriptor instead.
func (*SynchronizeResponse_Data) GetDesc ¶
func (x *SynchronizeResponse_Data) GetDesc() string
func (*SynchronizeResponse_Data) GetTimezone ¶
func (x *SynchronizeResponse_Data) GetTimezone() string
func (*SynchronizeResponse_Data) GetTsMsec ¶
func (x *SynchronizeResponse_Data) GetTsMsec() int64
func (*SynchronizeResponse_Data) ProtoMessage ¶
func (*SynchronizeResponse_Data) ProtoMessage()
func (*SynchronizeResponse_Data) ProtoReflect ¶
func (x *SynchronizeResponse_Data) ProtoReflect() protoreflect.Message
func (*SynchronizeResponse_Data) Reset ¶
func (x *SynchronizeResponse_Data) Reset()
func (*SynchronizeResponse_Data) String ¶
func (x *SynchronizeResponse_Data) String() string
type UnimplementedAuth ¶
type UnimplementedAuth struct{}
func (*UnimplementedAuth) Login ¶
func (s *UnimplementedAuth) Login(ctx context.Context, req *LoginRequest) (*LoginResponse, error)
func (*UnimplementedAuth) Synchronize ¶
func (s *UnimplementedAuth) Synchronize(ctx context.Context, req *SynchronizeRequest) (*SynchronizeResponse, error)
func (*UnimplementedAuth) UserSpace ¶
func (s *UnimplementedAuth) UserSpace(ctx context.Context, req *UserSpaceRequest) (*UserSpaceResponse, error)
type UserSpaceRequest ¶
type UserSpaceRequest struct { Metadata *common.Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` // contains filtered or unexported fields }
func (*UserSpaceRequest) Descriptor
deprecated
func (*UserSpaceRequest) Descriptor() ([]byte, []int)
Deprecated: Use UserSpaceRequest.ProtoReflect.Descriptor instead.
func (*UserSpaceRequest) GetMetadata ¶
func (x *UserSpaceRequest) GetMetadata() *common.Metadata
func (*UserSpaceRequest) GetUsername ¶
func (x *UserSpaceRequest) GetUsername() string
func (*UserSpaceRequest) ProtoMessage ¶
func (*UserSpaceRequest) ProtoMessage()
func (*UserSpaceRequest) ProtoReflect ¶
func (x *UserSpaceRequest) ProtoReflect() protoreflect.Message
func (*UserSpaceRequest) Reset ¶
func (x *UserSpaceRequest) Reset()
func (*UserSpaceRequest) String ¶
func (x *UserSpaceRequest) String() string
type UserSpaceResponse ¶
type UserSpaceResponse struct { ErrCode int32 `protobuf:"varint,1,opt,name=err_code,json=errCode,proto3" json:"err_code"` ErrMsg string `protobuf:"bytes,2,opt,name=err_msg,json=errMsg,proto3" json:"err_msg,omitempty"` Data *UserSpaceResponse_Data `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*UserSpaceResponse) Descriptor
deprecated
func (*UserSpaceResponse) Descriptor() ([]byte, []int)
Deprecated: Use UserSpaceResponse.ProtoReflect.Descriptor instead.
func (*UserSpaceResponse) GetData ¶
func (x *UserSpaceResponse) GetData() *UserSpaceResponse_Data
func (*UserSpaceResponse) GetErrCode ¶
func (x *UserSpaceResponse) GetErrCode() int32
func (*UserSpaceResponse) GetErrMsg ¶
func (x *UserSpaceResponse) GetErrMsg() string
func (*UserSpaceResponse) ProtoMessage ¶
func (*UserSpaceResponse) ProtoMessage()
func (*UserSpaceResponse) ProtoReflect ¶
func (x *UserSpaceResponse) ProtoReflect() protoreflect.Message
func (*UserSpaceResponse) Reset ¶
func (x *UserSpaceResponse) Reset()
func (*UserSpaceResponse) String ¶
func (x *UserSpaceResponse) String() string
type UserSpaceResponse_Data ¶
type UserSpaceResponse_Data struct { UserInfo *UserSpaceResponse_UserInfo `protobuf:"bytes,1,opt,name=user_info,json=userInfo,proto3" json:"user_info,omitempty"` Reputation *achieve.Reputation `protobuf:"bytes,2,opt,name=reputation,proto3" json:"reputation,omitempty"` Badges []*achieve.Badge `protobuf:"bytes,3,rep,name=badges,proto3" json:"badges,omitempty"` // contains filtered or unexported fields }
func (*UserSpaceResponse_Data) Descriptor
deprecated
func (*UserSpaceResponse_Data) Descriptor() ([]byte, []int)
Deprecated: Use UserSpaceResponse_Data.ProtoReflect.Descriptor instead.
func (*UserSpaceResponse_Data) GetBadges ¶
func (x *UserSpaceResponse_Data) GetBadges() []*achieve.Badge
func (*UserSpaceResponse_Data) GetReputation ¶
func (x *UserSpaceResponse_Data) GetReputation() *achieve.Reputation
func (*UserSpaceResponse_Data) GetUserInfo ¶
func (x *UserSpaceResponse_Data) GetUserInfo() *UserSpaceResponse_UserInfo
func (*UserSpaceResponse_Data) ProtoMessage ¶
func (*UserSpaceResponse_Data) ProtoMessage()
func (*UserSpaceResponse_Data) ProtoReflect ¶
func (x *UserSpaceResponse_Data) ProtoReflect() protoreflect.Message
func (*UserSpaceResponse_Data) Reset ¶
func (x *UserSpaceResponse_Data) Reset()
func (*UserSpaceResponse_Data) String ¶
func (x *UserSpaceResponse_Data) String() string
type UserSpaceResponse_UserInfo ¶
type UserSpaceResponse_UserInfo struct { UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` Nickname string `protobuf:"bytes,3,opt,name=nickname,proto3" json:"nickname,omitempty"` CreateTsSec int64 `protobuf:"varint,4,opt,name=create_ts_sec,json=createTsSec,proto3" json:"create_ts_sec,omitempty"` // contains filtered or unexported fields }
func (*UserSpaceResponse_UserInfo) Descriptor
deprecated
func (*UserSpaceResponse_UserInfo) Descriptor() ([]byte, []int)
Deprecated: Use UserSpaceResponse_UserInfo.ProtoReflect.Descriptor instead.
func (*UserSpaceResponse_UserInfo) GetCreateTsSec ¶
func (x *UserSpaceResponse_UserInfo) GetCreateTsSec() int64
func (*UserSpaceResponse_UserInfo) GetNickname ¶
func (x *UserSpaceResponse_UserInfo) GetNickname() string
func (*UserSpaceResponse_UserInfo) GetUserId ¶
func (x *UserSpaceResponse_UserInfo) GetUserId() string
func (*UserSpaceResponse_UserInfo) GetUsername ¶
func (x *UserSpaceResponse_UserInfo) GetUsername() string
func (*UserSpaceResponse_UserInfo) ProtoMessage ¶
func (*UserSpaceResponse_UserInfo) ProtoMessage()
func (*UserSpaceResponse_UserInfo) ProtoReflect ¶
func (x *UserSpaceResponse_UserInfo) ProtoReflect() protoreflect.Message
func (*UserSpaceResponse_UserInfo) Reset ¶
func (x *UserSpaceResponse_UserInfo) Reset()
func (*UserSpaceResponse_UserInfo) String ¶
func (x *UserSpaceResponse_UserInfo) String() string