Documentation
¶
Index ¶
- Variables
- type AuthToken
- func (*AuthToken) Descriptor() ([]byte, []int)deprecated
- func (x *AuthToken) GetAccountId() int64
- func (x *AuthToken) GetColor() string
- func (x *AuthToken) GetLocation() int32
- func (x *AuthToken) GetRand() string
- func (x *AuthToken) GetServerId() int64
- func (x *AuthToken) GetStatus() OnlineStatus
- func (x *AuthToken) GetTimeout() int64
- func (x *AuthToken) GetUnencrypted() bool
- func (*AuthToken) ProtoMessage()
- func (x *AuthToken) ProtoReflect() protoreflect.Message
- func (x *AuthToken) Reset()
- func (x *AuthToken) String() string
- func (m *AuthToken) Validate() error
- func (m *AuthToken) ValidateAll() error
- type AuthTokenMultiError
- type AuthTokenValidationError
- type OnlineStatus
- func (OnlineStatus) Descriptor() protoreflect.EnumDescriptor
- func (x OnlineStatus) Enum() *OnlineStatus
- func (OnlineStatus) EnumDescriptor() ([]byte, []int)deprecated
- func (x OnlineStatus) Number() protoreflect.EnumNumber
- func (x OnlineStatus) String() string
- func (OnlineStatus) Type() protoreflect.EnumType
Constants ¶
This section is empty.
Variables ¶
var ( OnlineStatus_name = map[int32]string{ 0: "ONLINE_STATUS_UNSPECIFIED", 1: "ONLINE_STATUS_GATE", 2: "ONLINE_STATUS_DEV", 3: "ONLINE_STATUS_ADMIN", 4: "ONLINE_STATUS_SVC", } OnlineStatus_value = map[string]int32{ "ONLINE_STATUS_UNSPECIFIED": 0, "ONLINE_STATUS_GATE": 1, "ONLINE_STATUS_DEV": 2, "ONLINE_STATUS_ADMIN": 3, "ONLINE_STATUS_SVC": 4, } )
Enum value maps for OnlineStatus.
var File_gate_intra_v1_auth_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type AuthToken ¶
type AuthToken struct { Rand string `protobuf:"bytes,1,opt,name=rand,proto3" json:"rand,omitempty"` // random string for replay attack prevention Color string `protobuf:"bytes,2,opt,name=color,proto3" json:"color,omitempty"` // Color for route distribution AccountId int64 `protobuf:"varint,3,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` // Account ID ServerId int64 `protobuf:"varint,4,opt,name=server_id,json=serverId,proto3" json:"server_id,omitempty"` // Server ID Timeout int64 `protobuf:"varint,5,opt,name=timeout,proto3" json:"timeout,omitempty"` // timeout (unix timestamp) Location int32 `protobuf:"varint,6,opt,name=location,proto3" json:"location,omitempty"` // Location Status OnlineStatus `protobuf:"varint,7,opt,name=status,proto3,enum=gate.intra.v1.OnlineStatus" json:"status,omitempty"` // Online status Unencrypted bool `protobuf:"varint,8,opt,name=unencrypted,proto3" json:"unencrypted,omitempty"` // Whether the token is unencrypted, default is false // contains filtered or unexported fields }
only for server use The client will receive []byte(AuthToken) data from the /login interface of the Account service, and then carry it in the handshake message
func (*AuthToken) Descriptor
deprecated
func (*AuthToken) GetAccountId ¶
func (*AuthToken) GetLocation ¶
func (*AuthToken) GetServerId ¶ added in v0.0.3
func (*AuthToken) GetStatus ¶
func (x *AuthToken) GetStatus() OnlineStatus
func (*AuthToken) GetTimeout ¶
func (*AuthToken) GetUnencrypted ¶
func (*AuthToken) ProtoMessage ¶
func (*AuthToken) ProtoMessage()
func (*AuthToken) ProtoReflect ¶
func (x *AuthToken) ProtoReflect() protoreflect.Message
func (*AuthToken) Validate ¶
Validate checks the field values on AuthToken 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 (*AuthToken) ValidateAll ¶
ValidateAll checks the field values on AuthToken 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 AuthTokenMultiError, or nil if none found.
type AuthTokenMultiError ¶
type AuthTokenMultiError []error
AuthTokenMultiError is an error wrapping multiple validation errors returned by AuthToken.ValidateAll() if the designated constraints aren't met.
func (AuthTokenMultiError) AllErrors ¶
func (m AuthTokenMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (AuthTokenMultiError) Error ¶
func (m AuthTokenMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type AuthTokenValidationError ¶
type AuthTokenValidationError struct {
// contains filtered or unexported fields
}
AuthTokenValidationError is the validation error returned by AuthToken.Validate if the designated constraints aren't met.
func (AuthTokenValidationError) Cause ¶
func (e AuthTokenValidationError) Cause() error
Cause function returns cause value.
func (AuthTokenValidationError) Error ¶
func (e AuthTokenValidationError) Error() string
Error satisfies the builtin error interface
func (AuthTokenValidationError) ErrorName ¶
func (e AuthTokenValidationError) ErrorName() string
ErrorName returns error name.
func (AuthTokenValidationError) Field ¶
func (e AuthTokenValidationError) Field() string
Field function returns field value.
func (AuthTokenValidationError) Key ¶
func (e AuthTokenValidationError) Key() bool
Key function returns key value.
func (AuthTokenValidationError) Reason ¶
func (e AuthTokenValidationError) Reason() string
Reason function returns reason value.
type OnlineStatus ¶
type OnlineStatus int32
const ( OnlineStatus_ONLINE_STATUS_UNSPECIFIED OnlineStatus = 0 // Unspecified OnlineStatus_ONLINE_STATUS_GATE OnlineStatus = 1 // Request from Gate service, usually initiated by users. It is not inner status. OnlineStatus_ONLINE_STATUS_DEV OnlineStatus = 2 // Developer test use. It is not inner status. OnlineStatus_ONLINE_STATUS_ADMIN OnlineStatus = 3 // Request from Admin service, usually initiated by internal GM. It is inner status. OnlineStatus_ONLINE_STATUS_SVC OnlineStatus = 4 // Request from other services, usually initiated by internal services. It is inner status. )
func (OnlineStatus) Descriptor ¶
func (OnlineStatus) Descriptor() protoreflect.EnumDescriptor
func (OnlineStatus) Enum ¶
func (x OnlineStatus) Enum() *OnlineStatus
func (OnlineStatus) EnumDescriptor
deprecated
func (OnlineStatus) EnumDescriptor() ([]byte, []int)
Deprecated: Use OnlineStatus.Descriptor instead.
func (OnlineStatus) Number ¶
func (x OnlineStatus) Number() protoreflect.EnumNumber
func (OnlineStatus) String ¶
func (x OnlineStatus) String() string
func (OnlineStatus) Type ¶
func (OnlineStatus) Type() protoreflect.EnumType