Documentation
¶
Index ¶
Constants ¶
const ( Int64 int64 = 0 Uint32 uint32 = 0 DevMode = "dev" )
Used for type cloning conversion
const ( ChannelStable = "stable" ChannelBeta = "beta" ChannelNightly = "nightly" ChannelDev = "dev" )
Release channels. A build that does not have Channel injected is a local developer build.
const TempOrderCacheKey = "temp_order:%s"
TempOrderCacheKey Cache to Redis Key eg: temp_order:order_no
Variables ¶
var ( Version = "unknown version" BuildTime = "unknown time" // Channel names the release channel this binary was built for. Every build // path injects it alongside Version; never infer the channel from the shape // of the version string. Channel = ChannelDev )
Version PPanel version
Functions ¶
func ChannelLabel ¶
ChannelLabel returns the suffix shown next to the version for builds that did not come from the stable channel. Stable builds carry no suffix.
func CheckoutTokenHash ¶
CheckoutTokenHash returns the durable representation of the guest checkout capability. Only the caller receives the original high-entropy token.
func Display ¶
func Display() string
Display returns the version string the CLI and the admin API show operators. The channel comes from Channel and never from the shape of Version: the release pipelines strip the tag's leading "v", so classifying a build by that prefix reported every published release as a development build.
Types ¶
type TemporaryOrderInfo ¶
type TemporaryOrderInfo struct {
OrderNo string `json:"order_no"`
CheckoutToken string `json:"checkout_token"`
Identifier string `json:"identifier"`
AuthType string `json:"auth_type"`
// PasswordHash is the one-way encoded password needed to finish a guest
// account after payment. Never place the plaintext password in Redis.
PasswordHash string `json:"password_hash,omitempty"`
// Password is retained only to finish orders created by older releases.
// New orders never populate it and it must never be logged.
Password string `json:"password,omitempty"`
InviteCode string `json:"invite_code,omitempty"`
}
func (*TemporaryOrderInfo) Marshal ¶
func (t *TemporaryOrderInfo) Marshal() ([]byte, error)
func (*TemporaryOrderInfo) Unmarshal ¶
func (t *TemporaryOrderInfo) Unmarshal(data []byte) error
type VerifyType ¶
type VerifyType uint8
VerifyType is the type of verification code
const ( Register VerifyType = iota + 1 Security )
func ParseVerifyType ¶
func ParseVerifyType(i uint8) VerifyType
func (VerifyType) String ¶
func (v VerifyType) String() string