Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterHoyolibServer(s grpc.ServiceRegistrar, srv HoyolibServer)
- func RegisterOpwxServer(s grpc.ServiceRegistrar, srv OpwxServer)
- type AccountInfoRequest
- func (*AccountInfoRequest) Descriptor() ([]byte, []int)deprecated
- func (x *AccountInfoRequest) GetUserId() int64
- func (*AccountInfoRequest) ProtoMessage()
- func (x *AccountInfoRequest) ProtoReflect() protoreflect.Message
- func (x *AccountInfoRequest) Reset()
- func (x *AccountInfoRequest) String() string
- type AccountInfoResponse
- func (*AccountInfoResponse) Descriptor() ([]byte, []int)deprecated
- func (x *AccountInfoResponse) GetAccountInfo() *AccountInfoResponse_AccountInfo
- func (x *AccountInfoResponse) GetHeader() *ResponseHeader
- func (*AccountInfoResponse) ProtoMessage()
- func (x *AccountInfoResponse) ProtoReflect() protoreflect.Message
- func (x *AccountInfoResponse) Reset()
- func (x *AccountInfoResponse) String() string
- type AccountInfoResponse_AccountInfo
- func (*AccountInfoResponse_AccountInfo) Descriptor() ([]byte, []int)deprecated
- func (x *AccountInfoResponse_AccountInfo) GetGameInfos() []*AccountInfoResponse_AccountInfo_GameInfo
- func (x *AccountInfoResponse_AccountInfo) GetIsSign() bool
- func (*AccountInfoResponse_AccountInfo) ProtoMessage()
- func (x *AccountInfoResponse_AccountInfo) ProtoReflect() protoreflect.Message
- func (x *AccountInfoResponse_AccountInfo) Reset()
- func (x *AccountInfoResponse_AccountInfo) String() string
- type AccountInfoResponse_AccountInfo_GameInfo
- func (*AccountInfoResponse_AccountInfo_GameInfo) Descriptor() ([]byte, []int)deprecated
- func (*AccountInfoResponse_AccountInfo_GameInfo) ProtoMessage()
- func (x *AccountInfoResponse_AccountInfo_GameInfo) ProtoReflect() protoreflect.Message
- func (x *AccountInfoResponse_AccountInfo_GameInfo) Reset()
- func (x *AccountInfoResponse_AccountInfo_GameInfo) String() string
- type CheckInRequest
- func (*CheckInRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CheckInRequest) GetGames() []GameType
- func (x *CheckInRequest) GetUserId() int64
- func (*CheckInRequest) ProtoMessage()
- func (x *CheckInRequest) ProtoReflect() protoreflect.Message
- func (x *CheckInRequest) Reset()
- func (x *CheckInRequest) String() string
- type CheckInResponse
- func (*CheckInResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CheckInResponse) GetClientsInfo() map[int32]*CheckInResponse_CheckInInfo
- func (x *CheckInResponse) GetHeader() *ResponseHeader
- func (*CheckInResponse) ProtoMessage()
- func (x *CheckInResponse) ProtoReflect() protoreflect.Message
- func (x *CheckInResponse) Reset()
- func (x *CheckInResponse) String() string
- type CheckInResponse_CheckInInfo
- func (*CheckInResponse_CheckInInfo) Descriptor() ([]byte, []int)deprecated
- func (x *CheckInResponse_CheckInInfo) GetInfo() map[int32]*CheckInResponse_CheckInStatus
- func (*CheckInResponse_CheckInInfo) ProtoMessage()
- func (x *CheckInResponse_CheckInInfo) ProtoReflect() protoreflect.Message
- func (x *CheckInResponse_CheckInInfo) Reset()
- func (x *CheckInResponse_CheckInInfo) String() string
- type CheckInResponse_CheckInStatus
- func (*CheckInResponse_CheckInStatus) Descriptor() ([]byte, []int)deprecated
- func (x *CheckInResponse_CheckInStatus) GetMsg() string
- func (x *CheckInResponse_CheckInStatus) GetSuccess() bool
- func (*CheckInResponse_CheckInStatus) ProtoMessage()
- func (x *CheckInResponse_CheckInStatus) ProtoReflect() protoreflect.Message
- func (x *CheckInResponse_CheckInStatus) Reset()
- func (x *CheckInResponse_CheckInStatus) String() string
- type CheckinResults
- type ErrorCode
- type GameType
- type HoyolibClient
- type HoyolibServer
- type OpwxClient
- type OpwxServer
- type PushResponse
- func (*PushResponse) Descriptor() ([]byte, []int)deprecated
- func (x *PushResponse) GetMsg() string
- func (x *PushResponse) GetStatus() PushResponse_PushStatus
- func (*PushResponse) ProtoMessage()
- func (x *PushResponse) ProtoReflect() protoreflect.Message
- func (x *PushResponse) Reset()
- func (x *PushResponse) String() string
- type PushResponse_PushStatus
- func (PushResponse_PushStatus) Descriptor() protoreflect.EnumDescriptor
- func (x PushResponse_PushStatus) Enum() *PushResponse_PushStatus
- func (PushResponse_PushStatus) EnumDescriptor() ([]byte, []int)deprecated
- func (x PushResponse_PushStatus) Number() protoreflect.EnumNumber
- func (x PushResponse_PushStatus) String() string
- func (PushResponse_PushStatus) Type() protoreflect.EnumType
- type RegisterRequest
- func (*RegisterRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterRequest) GetAccountId() string
- func (x *RegisterRequest) GetAccountType() RegisterRequest_AccountType
- func (x *RegisterRequest) GetCookieToken() string
- func (x *RegisterRequest) GetGames() []GameType
- func (x *RegisterRequest) GetUserId() int64
- func (*RegisterRequest) ProtoMessage()
- func (x *RegisterRequest) ProtoReflect() protoreflect.Message
- func (x *RegisterRequest) Reset()
- func (x *RegisterRequest) String() string
- type RegisterRequest_AccountType
- func (RegisterRequest_AccountType) Descriptor() protoreflect.EnumDescriptor
- func (x RegisterRequest_AccountType) Enum() *RegisterRequest_AccountType
- func (RegisterRequest_AccountType) EnumDescriptor() ([]byte, []int)deprecated
- func (x RegisterRequest_AccountType) Number() protoreflect.EnumNumber
- func (x RegisterRequest_AccountType) String() string
- func (RegisterRequest_AccountType) Type() protoreflect.EnumType
- type RegisterResponse
- type ResponseHeader
- func (*ResponseHeader) Descriptor() ([]byte, []int)deprecated
- func (x *ResponseHeader) GetCode() int32
- func (x *ResponseHeader) GetMessage() string
- func (x *ResponseHeader) GetUserId() int64
- func (*ResponseHeader) ProtoMessage()
- func (x *ResponseHeader) ProtoReflect() protoreflect.Message
- func (x *ResponseHeader) Reset()
- func (x *ResponseHeader) String() string
- type UnimplementedHoyolibServer
- func (UnimplementedHoyolibServer) CheckIn(context.Context, *CheckInRequest) (*CheckInResponse, error)
- func (UnimplementedHoyolibServer) GetAccountInfo(context.Context, *AccountInfoRequest) (*AccountInfoResponse, error)
- func (UnimplementedHoyolibServer) Register(context.Context, *RegisterRequest) (*RegisterResponse, error)
- type UnimplementedOpwxServer
- type UnsafeHoyolibServer
- type UnsafeOpwxServer
Constants ¶
const ( Hoyolib_Register_FullMethodName = "/Hoyolib/Register" Hoyolib_CheckIn_FullMethodName = "/Hoyolib/CheckIn" Hoyolib_GetAccountInfo_FullMethodName = "/Hoyolib/GetAccountInfo" )
const (
Opwx_PushCheckinResults_FullMethodName = "/Opwx/PushCheckinResults"
)
Variables ¶
var ( ErrorCode_name = map[int32]string{ 0: "OK", 10000: "INVALID_REQUEST_PARAM", 10001: "ERROR_CREATE_USER", 10002: "ERROR_USER_NOT_REGISTER", 10003: "ERROR_CHECK_IN", } ErrorCode_value = map[string]int32{ "OK": 0, "INVALID_REQUEST_PARAM": 10000, "ERROR_CREATE_USER": 10001, "ERROR_USER_NOT_REGISTER": 10002, "ERROR_CHECK_IN": 10003, } )
Enum value maps for ErrorCode.
var ( GameType_name = map[int32]string{ 0: "UNKNOWN_GAME", 1000: "Genshin", 1001: "StarRail", } GameType_value = map[string]int32{ "UNKNOWN_GAME": 0, "Genshin": 1000, "StarRail": 1001, } )
Enum value maps for GameType.
var ( PushResponse_PushStatus_name = map[int32]string{ 0: "OK", 1: "ERR", } PushResponse_PushStatus_value = map[string]int32{ "OK": 0, "ERR": 1, } )
Enum value maps for PushResponse_PushStatus.
var ( RegisterRequest_AccountType_name = map[int32]string{ 0: "UNKNOWN", 1: "OVERSEA", 2: "CN", } RegisterRequest_AccountType_value = map[string]int32{ "UNKNOWN": 0, "OVERSEA": 1, "CN": 2, } )
Enum value maps for RegisterRequest_AccountType.
var File_hoyolib_pb_hoyolib_proto protoreflect.FileDescriptor
var Hoyolib_ServiceDesc = grpc.ServiceDesc{ ServiceName: "Hoyolib", HandlerType: (*HoyolibServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Register", Handler: _Hoyolib_Register_Handler, }, { MethodName: "CheckIn", Handler: _Hoyolib_CheckIn_Handler, }, { MethodName: "GetAccountInfo", Handler: _Hoyolib_GetAccountInfo_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "hoyolib_pb/hoyolib.proto", }
Hoyolib_ServiceDesc is the grpc.ServiceDesc for Hoyolib service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var Opwx_ServiceDesc = grpc.ServiceDesc{ ServiceName: "Opwx", HandlerType: (*OpwxServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "PushCheckinResults", Handler: _Opwx_PushCheckinResults_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "hoyolib_pb/hoyolib.proto", }
Opwx_ServiceDesc is the grpc.ServiceDesc for Opwx service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterHoyolibServer ¶
func RegisterHoyolibServer(s grpc.ServiceRegistrar, srv HoyolibServer)
func RegisterOpwxServer ¶ added in v0.2.0
func RegisterOpwxServer(s grpc.ServiceRegistrar, srv OpwxServer)
Types ¶
type AccountInfoRequest ¶
type AccountInfoRequest struct { UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // contains filtered or unexported fields }
func (*AccountInfoRequest) Descriptor
deprecated
func (*AccountInfoRequest) Descriptor() ([]byte, []int)
Deprecated: Use AccountInfoRequest.ProtoReflect.Descriptor instead.
func (*AccountInfoRequest) GetUserId ¶
func (x *AccountInfoRequest) GetUserId() int64
func (*AccountInfoRequest) ProtoMessage ¶
func (*AccountInfoRequest) ProtoMessage()
func (*AccountInfoRequest) ProtoReflect ¶
func (x *AccountInfoRequest) ProtoReflect() protoreflect.Message
func (*AccountInfoRequest) Reset ¶
func (x *AccountInfoRequest) Reset()
func (*AccountInfoRequest) String ¶
func (x *AccountInfoRequest) String() string
type AccountInfoResponse ¶
type AccountInfoResponse struct { Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` AccountInfo *AccountInfoResponse_AccountInfo `protobuf:"bytes,2,opt,name=account_info,json=accountInfo,proto3" json:"account_info,omitempty"` // contains filtered or unexported fields }
func (*AccountInfoResponse) Descriptor
deprecated
func (*AccountInfoResponse) Descriptor() ([]byte, []int)
Deprecated: Use AccountInfoResponse.ProtoReflect.Descriptor instead.
func (*AccountInfoResponse) GetAccountInfo ¶
func (x *AccountInfoResponse) GetAccountInfo() *AccountInfoResponse_AccountInfo
func (*AccountInfoResponse) GetHeader ¶
func (x *AccountInfoResponse) GetHeader() *ResponseHeader
func (*AccountInfoResponse) ProtoMessage ¶
func (*AccountInfoResponse) ProtoMessage()
func (*AccountInfoResponse) ProtoReflect ¶
func (x *AccountInfoResponse) ProtoReflect() protoreflect.Message
func (*AccountInfoResponse) Reset ¶
func (x *AccountInfoResponse) Reset()
func (*AccountInfoResponse) String ¶
func (x *AccountInfoResponse) String() string
type AccountInfoResponse_AccountInfo ¶
type AccountInfoResponse_AccountInfo struct { GameInfos []*AccountInfoResponse_AccountInfo_GameInfo `protobuf:"bytes,1,rep,name=game_infos,json=gameInfos,proto3" json:"game_infos,omitempty"` IsSign bool `protobuf:"varint,2,opt,name=is_sign,json=isSign,proto3" json:"is_sign,omitempty"` // contains filtered or unexported fields }
func (*AccountInfoResponse_AccountInfo) Descriptor
deprecated
func (*AccountInfoResponse_AccountInfo) Descriptor() ([]byte, []int)
Deprecated: Use AccountInfoResponse_AccountInfo.ProtoReflect.Descriptor instead.
func (*AccountInfoResponse_AccountInfo) GetGameInfos ¶
func (x *AccountInfoResponse_AccountInfo) GetGameInfos() []*AccountInfoResponse_AccountInfo_GameInfo
func (*AccountInfoResponse_AccountInfo) GetIsSign ¶
func (x *AccountInfoResponse_AccountInfo) GetIsSign() bool
func (*AccountInfoResponse_AccountInfo) ProtoMessage ¶
func (*AccountInfoResponse_AccountInfo) ProtoMessage()
func (*AccountInfoResponse_AccountInfo) ProtoReflect ¶
func (x *AccountInfoResponse_AccountInfo) ProtoReflect() protoreflect.Message
func (*AccountInfoResponse_AccountInfo) Reset ¶
func (x *AccountInfoResponse_AccountInfo) Reset()
func (*AccountInfoResponse_AccountInfo) String ¶
func (x *AccountInfoResponse_AccountInfo) String() string
type AccountInfoResponse_AccountInfo_GameInfo ¶
type AccountInfoResponse_AccountInfo_GameInfo struct {
// contains filtered or unexported fields
}
func (*AccountInfoResponse_AccountInfo_GameInfo) Descriptor
deprecated
func (*AccountInfoResponse_AccountInfo_GameInfo) Descriptor() ([]byte, []int)
Deprecated: Use AccountInfoResponse_AccountInfo_GameInfo.ProtoReflect.Descriptor instead.
func (*AccountInfoResponse_AccountInfo_GameInfo) ProtoMessage ¶
func (*AccountInfoResponse_AccountInfo_GameInfo) ProtoMessage()
func (*AccountInfoResponse_AccountInfo_GameInfo) ProtoReflect ¶
func (x *AccountInfoResponse_AccountInfo_GameInfo) ProtoReflect() protoreflect.Message
func (*AccountInfoResponse_AccountInfo_GameInfo) Reset ¶
func (x *AccountInfoResponse_AccountInfo_GameInfo) Reset()
func (*AccountInfoResponse_AccountInfo_GameInfo) String ¶
func (x *AccountInfoResponse_AccountInfo_GameInfo) String() string
type CheckInRequest ¶ added in v0.1.4
type CheckInRequest struct { UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` Games []GameType `protobuf:"varint,2,rep,packed,name=games,proto3,enum=GameType" json:"games,omitempty"` // contains filtered or unexported fields }
func (*CheckInRequest) Descriptor
deprecated
added in
v0.1.4
func (*CheckInRequest) Descriptor() ([]byte, []int)
Deprecated: Use CheckInRequest.ProtoReflect.Descriptor instead.
func (*CheckInRequest) GetGames ¶ added in v0.1.4
func (x *CheckInRequest) GetGames() []GameType
func (*CheckInRequest) GetUserId ¶ added in v0.1.4
func (x *CheckInRequest) GetUserId() int64
func (*CheckInRequest) ProtoMessage ¶ added in v0.1.4
func (*CheckInRequest) ProtoMessage()
func (*CheckInRequest) ProtoReflect ¶ added in v0.1.4
func (x *CheckInRequest) ProtoReflect() protoreflect.Message
func (*CheckInRequest) Reset ¶ added in v0.1.4
func (x *CheckInRequest) Reset()
func (*CheckInRequest) String ¶ added in v0.1.4
func (x *CheckInRequest) String() string
type CheckInResponse ¶ added in v0.1.4
type CheckInResponse struct { Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` ClientsInfo map[int32]*CheckInResponse_CheckInInfo `` /* 183-byte string literal not displayed */ // contains filtered or unexported fields }
func (*CheckInResponse) Descriptor
deprecated
added in
v0.1.4
func (*CheckInResponse) Descriptor() ([]byte, []int)
Deprecated: Use CheckInResponse.ProtoReflect.Descriptor instead.
func (*CheckInResponse) GetClientsInfo ¶ added in v0.2.0
func (x *CheckInResponse) GetClientsInfo() map[int32]*CheckInResponse_CheckInInfo
func (*CheckInResponse) GetHeader ¶ added in v0.1.4
func (x *CheckInResponse) GetHeader() *ResponseHeader
func (*CheckInResponse) ProtoMessage ¶ added in v0.1.4
func (*CheckInResponse) ProtoMessage()
func (*CheckInResponse) ProtoReflect ¶ added in v0.1.4
func (x *CheckInResponse) ProtoReflect() protoreflect.Message
func (*CheckInResponse) Reset ¶ added in v0.1.4
func (x *CheckInResponse) Reset()
func (*CheckInResponse) String ¶ added in v0.1.4
func (x *CheckInResponse) String() string
type CheckInResponse_CheckInInfo ¶ added in v0.2.0
type CheckInResponse_CheckInInfo struct { Info map[int32]*CheckInResponse_CheckInStatus `` /* 150-byte string literal not displayed */ // contains filtered or unexported fields }
func (*CheckInResponse_CheckInInfo) Descriptor
deprecated
added in
v0.2.0
func (*CheckInResponse_CheckInInfo) Descriptor() ([]byte, []int)
Deprecated: Use CheckInResponse_CheckInInfo.ProtoReflect.Descriptor instead.
func (*CheckInResponse_CheckInInfo) GetInfo ¶ added in v0.2.0
func (x *CheckInResponse_CheckInInfo) GetInfo() map[int32]*CheckInResponse_CheckInStatus
func (*CheckInResponse_CheckInInfo) ProtoMessage ¶ added in v0.2.0
func (*CheckInResponse_CheckInInfo) ProtoMessage()
func (*CheckInResponse_CheckInInfo) ProtoReflect ¶ added in v0.2.0
func (x *CheckInResponse_CheckInInfo) ProtoReflect() protoreflect.Message
func (*CheckInResponse_CheckInInfo) Reset ¶ added in v0.2.0
func (x *CheckInResponse_CheckInInfo) Reset()
func (*CheckInResponse_CheckInInfo) String ¶ added in v0.2.0
func (x *CheckInResponse_CheckInInfo) String() string
type CheckInResponse_CheckInStatus ¶ added in v0.1.4
type CheckInResponse_CheckInStatus struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` // contains filtered or unexported fields }
func (*CheckInResponse_CheckInStatus) Descriptor
deprecated
added in
v0.1.4
func (*CheckInResponse_CheckInStatus) Descriptor() ([]byte, []int)
Deprecated: Use CheckInResponse_CheckInStatus.ProtoReflect.Descriptor instead.
func (*CheckInResponse_CheckInStatus) GetMsg ¶ added in v0.1.4
func (x *CheckInResponse_CheckInStatus) GetMsg() string
func (*CheckInResponse_CheckInStatus) GetSuccess ¶ added in v0.1.4
func (x *CheckInResponse_CheckInStatus) GetSuccess() bool
func (*CheckInResponse_CheckInStatus) ProtoMessage ¶ added in v0.1.4
func (*CheckInResponse_CheckInStatus) ProtoMessage()
func (*CheckInResponse_CheckInStatus) ProtoReflect ¶ added in v0.1.4
func (x *CheckInResponse_CheckInStatus) ProtoReflect() protoreflect.Message
func (*CheckInResponse_CheckInStatus) Reset ¶ added in v0.1.4
func (x *CheckInResponse_CheckInStatus) Reset()
func (*CheckInResponse_CheckInStatus) String ¶ added in v0.1.4
func (x *CheckInResponse_CheckInStatus) String() string
type CheckinResults ¶ added in v0.2.0
type CheckinResults struct { Results []*CheckInResponse `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` // contains filtered or unexported fields }
func (*CheckinResults) Descriptor
deprecated
added in
v0.2.0
func (*CheckinResults) Descriptor() ([]byte, []int)
Deprecated: Use CheckinResults.ProtoReflect.Descriptor instead.
func (*CheckinResults) GetResults ¶ added in v0.2.0
func (x *CheckinResults) GetResults() []*CheckInResponse
func (*CheckinResults) ProtoMessage ¶ added in v0.2.0
func (*CheckinResults) ProtoMessage()
func (*CheckinResults) ProtoReflect ¶ added in v0.2.0
func (x *CheckinResults) ProtoReflect() protoreflect.Message
func (*CheckinResults) Reset ¶ added in v0.2.0
func (x *CheckinResults) Reset()
func (*CheckinResults) String ¶ added in v0.2.0
func (x *CheckinResults) String() string
type ErrorCode ¶ added in v0.1.1
type ErrorCode int32
func (ErrorCode) Descriptor ¶ added in v0.1.1
func (ErrorCode) Descriptor() protoreflect.EnumDescriptor
func (ErrorCode) EnumDescriptor
deprecated
added in
v0.1.1
func (ErrorCode) Number ¶ added in v0.1.1
func (x ErrorCode) Number() protoreflect.EnumNumber
func (ErrorCode) Type ¶ added in v0.1.1
func (ErrorCode) Type() protoreflect.EnumType
type GameType ¶
type GameType int32
func (GameType) Descriptor ¶
func (GameType) Descriptor() protoreflect.EnumDescriptor
func (GameType) EnumDescriptor
deprecated
func (GameType) Number ¶
func (x GameType) Number() protoreflect.EnumNumber
func (GameType) Type ¶
func (GameType) Type() protoreflect.EnumType
type HoyolibClient ¶
type HoyolibClient interface { Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterResponse, error) CheckIn(ctx context.Context, in *CheckInRequest, opts ...grpc.CallOption) (*CheckInResponse, error) GetAccountInfo(ctx context.Context, in *AccountInfoRequest, opts ...grpc.CallOption) (*AccountInfoResponse, error) }
HoyolibClient is the client API for Hoyolib 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 NewHoyolibClient ¶
func NewHoyolibClient(cc grpc.ClientConnInterface) HoyolibClient
type HoyolibServer ¶
type HoyolibServer interface { Register(context.Context, *RegisterRequest) (*RegisterResponse, error) CheckIn(context.Context, *CheckInRequest) (*CheckInResponse, error) GetAccountInfo(context.Context, *AccountInfoRequest) (*AccountInfoResponse, error) // contains filtered or unexported methods }
HoyolibServer is the server API for Hoyolib service. All implementations must embed UnimplementedHoyolibServer for forward compatibility
type OpwxClient ¶ added in v0.2.0
type OpwxClient interface {
PushCheckinResults(ctx context.Context, in *CheckinResults, opts ...grpc.CallOption) (*PushResponse, error)
}
OpwxClient is the client API for Opwx 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 NewOpwxClient ¶ added in v0.2.0
func NewOpwxClient(cc grpc.ClientConnInterface) OpwxClient
type OpwxServer ¶ added in v0.2.0
type OpwxServer interface { PushCheckinResults(context.Context, *CheckinResults) (*PushResponse, error) // contains filtered or unexported methods }
OpwxServer is the server API for Opwx service. All implementations must embed UnimplementedOpwxServer for forward compatibility
type PushResponse ¶ added in v0.2.0
type PushResponse struct { Status PushResponse_PushStatus `protobuf:"varint,1,opt,name=status,proto3,enum=PushResponse_PushStatus" json:"status,omitempty"` Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` // contains filtered or unexported fields }
func (*PushResponse) Descriptor
deprecated
added in
v0.2.0
func (*PushResponse) Descriptor() ([]byte, []int)
Deprecated: Use PushResponse.ProtoReflect.Descriptor instead.
func (*PushResponse) GetMsg ¶ added in v0.2.0
func (x *PushResponse) GetMsg() string
func (*PushResponse) GetStatus ¶ added in v0.2.0
func (x *PushResponse) GetStatus() PushResponse_PushStatus
func (*PushResponse) ProtoMessage ¶ added in v0.2.0
func (*PushResponse) ProtoMessage()
func (*PushResponse) ProtoReflect ¶ added in v0.2.0
func (x *PushResponse) ProtoReflect() protoreflect.Message
func (*PushResponse) Reset ¶ added in v0.2.0
func (x *PushResponse) Reset()
func (*PushResponse) String ¶ added in v0.2.0
func (x *PushResponse) String() string
type PushResponse_PushStatus ¶ added in v0.2.0
type PushResponse_PushStatus int32
const ( PushResponse_OK PushResponse_PushStatus = 0 PushResponse_ERR PushResponse_PushStatus = 1 )
func (PushResponse_PushStatus) Descriptor ¶ added in v0.2.0
func (PushResponse_PushStatus) Descriptor() protoreflect.EnumDescriptor
func (PushResponse_PushStatus) Enum ¶ added in v0.2.0
func (x PushResponse_PushStatus) Enum() *PushResponse_PushStatus
func (PushResponse_PushStatus) EnumDescriptor
deprecated
added in
v0.2.0
func (PushResponse_PushStatus) EnumDescriptor() ([]byte, []int)
Deprecated: Use PushResponse_PushStatus.Descriptor instead.
func (PushResponse_PushStatus) Number ¶ added in v0.2.0
func (x PushResponse_PushStatus) Number() protoreflect.EnumNumber
func (PushResponse_PushStatus) String ¶ added in v0.2.0
func (x PushResponse_PushStatus) String() string
func (PushResponse_PushStatus) Type ¶ added in v0.2.0
func (PushResponse_PushStatus) Type() protoreflect.EnumType
type RegisterRequest ¶
type RegisterRequest struct { AccountId string `protobuf:"bytes,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` CookieToken string `protobuf:"bytes,2,opt,name=cookie_token,json=cookieToken,proto3" json:"cookie_token,omitempty"` AccountType RegisterRequest_AccountType `` /* 128-byte string literal not displayed */ UserId int64 `protobuf:"varint,4,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // send the empty user_id first time to get user_id Games []GameType `protobuf:"varint,5,rep,packed,name=games,proto3,enum=GameType" json:"games,omitempty"` // contains filtered or unexported fields }
func (*RegisterRequest) Descriptor
deprecated
func (*RegisterRequest) Descriptor() ([]byte, []int)
Deprecated: Use RegisterRequest.ProtoReflect.Descriptor instead.
func (*RegisterRequest) GetAccountId ¶
func (x *RegisterRequest) GetAccountId() string
func (*RegisterRequest) GetAccountType ¶
func (x *RegisterRequest) GetAccountType() RegisterRequest_AccountType
func (*RegisterRequest) GetCookieToken ¶
func (x *RegisterRequest) GetCookieToken() string
func (*RegisterRequest) GetGames ¶
func (x *RegisterRequest) GetGames() []GameType
func (*RegisterRequest) GetUserId ¶
func (x *RegisterRequest) GetUserId() int64
func (*RegisterRequest) ProtoMessage ¶
func (*RegisterRequest) ProtoMessage()
func (*RegisterRequest) ProtoReflect ¶
func (x *RegisterRequest) ProtoReflect() protoreflect.Message
func (*RegisterRequest) Reset ¶
func (x *RegisterRequest) Reset()
func (*RegisterRequest) String ¶
func (x *RegisterRequest) String() string
type RegisterRequest_AccountType ¶
type RegisterRequest_AccountType int32
const ( RegisterRequest_UNKNOWN RegisterRequest_AccountType = 0 RegisterRequest_OVERSEA RegisterRequest_AccountType = 1 RegisterRequest_CN RegisterRequest_AccountType = 2 )
func (RegisterRequest_AccountType) Descriptor ¶
func (RegisterRequest_AccountType) Descriptor() protoreflect.EnumDescriptor
func (RegisterRequest_AccountType) Enum ¶
func (x RegisterRequest_AccountType) Enum() *RegisterRequest_AccountType
func (RegisterRequest_AccountType) EnumDescriptor
deprecated
func (RegisterRequest_AccountType) EnumDescriptor() ([]byte, []int)
Deprecated: Use RegisterRequest_AccountType.Descriptor instead.
func (RegisterRequest_AccountType) Number ¶
func (x RegisterRequest_AccountType) Number() protoreflect.EnumNumber
func (RegisterRequest_AccountType) String ¶
func (x RegisterRequest_AccountType) String() string
func (RegisterRequest_AccountType) Type ¶
func (RegisterRequest_AccountType) Type() protoreflect.EnumType
type RegisterResponse ¶
type RegisterResponse struct { Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` // contains filtered or unexported fields }
func (*RegisterResponse) Descriptor
deprecated
func (*RegisterResponse) Descriptor() ([]byte, []int)
Deprecated: Use RegisterResponse.ProtoReflect.Descriptor instead.
func (*RegisterResponse) GetHeader ¶
func (x *RegisterResponse) GetHeader() *ResponseHeader
func (*RegisterResponse) ProtoMessage ¶
func (*RegisterResponse) ProtoMessage()
func (*RegisterResponse) ProtoReflect ¶
func (x *RegisterResponse) ProtoReflect() protoreflect.Message
func (*RegisterResponse) Reset ¶
func (x *RegisterResponse) Reset()
func (*RegisterResponse) String ¶
func (x *RegisterResponse) String() string
type ResponseHeader ¶
type ResponseHeader struct { Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` UserId int64 `protobuf:"varint,3,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // contains filtered or unexported fields }
func (*ResponseHeader) Descriptor
deprecated
func (*ResponseHeader) Descriptor() ([]byte, []int)
Deprecated: Use ResponseHeader.ProtoReflect.Descriptor instead.
func (*ResponseHeader) GetCode ¶
func (x *ResponseHeader) GetCode() int32
func (*ResponseHeader) GetMessage ¶
func (x *ResponseHeader) GetMessage() string
func (*ResponseHeader) GetUserId ¶
func (x *ResponseHeader) GetUserId() int64
func (*ResponseHeader) ProtoMessage ¶
func (*ResponseHeader) ProtoMessage()
func (*ResponseHeader) ProtoReflect ¶
func (x *ResponseHeader) ProtoReflect() protoreflect.Message
func (*ResponseHeader) Reset ¶
func (x *ResponseHeader) Reset()
func (*ResponseHeader) String ¶
func (x *ResponseHeader) String() string
type UnimplementedHoyolibServer ¶
type UnimplementedHoyolibServer struct { }
UnimplementedHoyolibServer must be embedded to have forward compatible implementations.
func (UnimplementedHoyolibServer) CheckIn ¶ added in v0.1.4
func (UnimplementedHoyolibServer) CheckIn(context.Context, *CheckInRequest) (*CheckInResponse, error)
func (UnimplementedHoyolibServer) GetAccountInfo ¶
func (UnimplementedHoyolibServer) GetAccountInfo(context.Context, *AccountInfoRequest) (*AccountInfoResponse, error)
func (UnimplementedHoyolibServer) Register ¶
func (UnimplementedHoyolibServer) Register(context.Context, *RegisterRequest) (*RegisterResponse, error)
type UnimplementedOpwxServer ¶ added in v0.2.0
type UnimplementedOpwxServer struct { }
UnimplementedOpwxServer must be embedded to have forward compatible implementations.
func (UnimplementedOpwxServer) PushCheckinResults ¶ added in v0.2.0
func (UnimplementedOpwxServer) PushCheckinResults(context.Context, *CheckinResults) (*PushResponse, error)
type UnsafeHoyolibServer ¶
type UnsafeHoyolibServer interface {
// contains filtered or unexported methods
}
UnsafeHoyolibServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to HoyolibServer will result in compilation errors.
type UnsafeOpwxServer ¶ added in v0.2.0
type UnsafeOpwxServer interface {
// contains filtered or unexported methods
}
UnsafeOpwxServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to OpwxServer will result in compilation errors.