SDK

package
v0.0.0-...-656f6e7 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Check

type Check struct {
	Data    *CheckData `json:"data"`
	Message string     `json:"message"`
	Retcode any        `json:"retcode"`
}

type CheckData

type CheckData struct {
	Id      string   `json:"id"`
	Action  string   `json:"action"`
	Geetest *Geetest `json:"geetest"`
}

type ClientCustomConfig

type ClientCustomConfig struct {
	Visitor        bool              `json:"visitor"`        // 游客功能
	SdkEnv         string            `json:"sdkenv"`         // sdk环境类型
	DebugMenu      bool              `json:"debugmenu"`      // debug菜单
	DebugLogSwitch []int32           `json:"debuglogswitch"` // 打开的log类型
	DebugLog       bool              `json:"debuglog"`       // log总开关
	DeviceList     map[string]string `json:"devicelist"`
	LoadJsonData   bool              `json:"loadjsondata"`  // 用json读取InLevel数据
	ShowException  bool              `json:"showexception"` // 是否显示异常提示框 默认为true
	CheckDevice    bool              `json:"checkdevice"`
	LoadPatch      bool              `json:"loadPatch"`
	RegionConfig   string            `json:"regionConfig"`
	DownloadMode   int32             `json:"downloadMode"`
	CodeSwitch     []int32           `json:"codeSwitch"`
	CoverSwitch    []int32           `json:"coverSwitch"`
}

ClientCustomConfig 客户端版本定义的配置 客户端版本号对应的配置 需要兼容老的json格式

type ComboTokenReq

type ComboTokenReq struct {
	AppID     any    `json:"app_id"`
	ChannelID any    `json:"channel_id"`
	Data      string `json:"data"`
	Device    string `json:"device"`
	Sign      string `json:"sign"`
}

type ComboTokenReqLoginTokenData

type ComboTokenReqLoginTokenData struct {
	Uid   string `json:"uid"`
	Token string `json:"token"`
	Guest bool   `json:"guest"`
}

type ComboTokenRsp

type ComboTokenRsp struct {
	Retcode int                     `json:"retcode"`
	Message string                  `json:"message"`
	Data    *ComboTokenRspLoginData `json:"data"`
}

type ComboTokenRspLoginData

type ComboTokenRspLoginData struct {
	ComboID       string      `json:"combo_id"`
	OpenID        string      `json:"open_id"`
	ComboToken    string      `json:"combo_token"`
	Data          string      `json:"data"`
	Heartbeat     bool        `json:"heartbeat"`
	AccountType   int         `json:"account_type"`
	FatigueRemind interface{} `json:"fatigue_remind"`
}

type Geetest

type Geetest struct {
	Challenge  string `json:"challenge"`
	Gt         string `json:"gt"`
	NewCaptcha string `json:"new_captcha"`
	Success    string `json:"success"`
}

type GranterApiGetConfig

type GranterApiGetConfig struct {
	Data    *GranterApiGetConfigData `json:"data"`
	Message string                   `json:"message"`
	Retcode any                      `json:"retcode"`
}

type GranterApiGetConfigData

type GranterApiGetConfigData struct {
	Protocol               bool          `json:"protocol"`
	QrEnabled              bool          `json:"qr_enabled"`
	LogLevel               string        `json:"log_level"`
	AnnounceURL            string        `json:"announce_url"`
	PushAliasType          int           `json:"push_alias_type"`
	DisableYsdkGuard       bool          `json:"disable_ysdk_guard"`
	EnableAnnouncePicPopup bool          `json:"enable_announce_pic_popup"`
	AppName                string        `json:"app_name"`
	QrEnabledApps          QrEnabledApps `json:"qr_enabled_apps"`
	QrAppIcons             QrAppIcons    `json:"qr_app_icons"`
	QrCloudDisplayName     string        `json:"qr_cloud_display_name"`
	EnableUserCenter       bool          `json:"enable_user_center"`
}

type Login

type Login struct {
	Data    *LoginData `json:"data"`
	Message string     `json:"message"`
	Retcode any        `json:"retcode"`
}

type LoginAccount

type LoginAccount struct {
	UID               string `json:"uid"`
	Name              string `json:"name"`
	Email             string `json:"email"`
	Mobile            string `json:"mobile"`
	IsEmailVerify     string `json:"is_email_verify"`
	Realname          string `json:"realname"`
	IdentityCard      string `json:"identity_card"`
	Token             string `json:"token"`
	SafeMobile        string `json:"safe_mobile"`
	FacebookName      string `json:"facebook_name"`
	GoogleName        string `json:"google_name"`
	TwitterName       string `json:"twitter_name"`
	GameCenterName    string `json:"game_center_name"`
	AppleName         string `json:"apple_name"`
	SonyName          string `json:"sony_name"`
	TapName           string `json:"tap_name"`
	Country           string `json:"country"`
	ReactivateTicket  string `json:"reactivate_ticket"`
	AreaCode          string `json:"area_code"`
	DeviceGrantTicket string `json:"device_grant_ticket"`
	SteamName         string `json:"steam_name"`
	UnmaskedEmail     string `json:"unmasked_email"`
	UnmaskedEmailType int    `json:"unmasked_email_type"`
}

type LoginAccountRequestJson

type LoginAccountRequestJson struct {
	Account  string `json:"account"`
	Password string `json:"password"`
	IsCrypto bool   `json:"is_crypto"`
}

type LoginData

type LoginData struct {
	Account             *LoginAccount `json:"account"`
	DeviceGrantRequired bool          `json:"device_grant_required"`
	SafeMoblieRequired  bool          `json:"safe_moblie_required"`
	RealpersonRequired  bool          `json:"realperson_required"`
	ReactivateRequired  bool          `json:"reactivate_required"`
	RealnameOperation   string        `json:"realname_operation"`
}

type LoginTokenRequest

type LoginTokenRequest struct {
	Uid   string `json:"uid"`
	Token string `json:"token"`
}

type QrAppIcons

type QrAppIcons struct {
	App   string `json:"app"`
	Bbs   string `json:"bbs"`
	Cloud string `json:"cloud"`
}

type QrEnabledApps

type QrEnabledApps struct {
	Bbs   bool `json:"bbs"`
	Cloud bool `json:"cloud"`
}

type RegionCustomConfig

type RegionCustomConfig struct {
	CloseAntiDebug   bool `json:"close_antidebug"`  // 默认打开反调开关 默认false
	ForceKill        bool `json:"force_kill"`       // 默认false
	AntiDebugPc      bool `json:"antidebug_pc"`     // pc默认不开启反调 默认false
	AntiDebugIos     bool `json:"antidubug_ios"`    // ios默认不开启反调 默认false
	AntiDebugAndroid bool `json:"antidubug_androd"` // android默认不开启反调 默认false
}

RegionCustomConfig 区服相关的配置 避免在http中使用Json格式

type RiskyApiCheck

type RiskyApiCheck struct {
	ActionType string `json:"action_type"`
	APIName    string `json:"api_name"`
	Username   string `json:"username"`
}

type Server

type Server struct {
	Config *config.Config
	Store  *DataBase.Store
	Router *gin.Engine
	// contains filtered or unexported fields
}

func (*Server) ComboGranterApiGetConfigHandler

func (s *Server) ComboGranterApiGetConfigHandler(c *gin.Context)

func (*Server) GetAgreementInfos

func (s *Server) GetAgreementInfos(c *gin.Context)

func (*Server) GetExperimentListHandler

func (s *Server) GetExperimentListHandler(c *gin.Context)

func (*Server) GetRegionCurr

func (s *Server) GetRegionCurr(c *gin.Context)

func (*Server) GetRegionCurrDump

func (s *Server) GetRegionCurrDump(c *gin.Context)

func (*Server) GetRegionList

func (s *Server) GetRegionList(c *gin.Context)

func (*Server) HandleDefault

func (s *Server) HandleDefault(c *gin.Context)

func (*Server) InitRouter

func (s *Server) InitRouter()

func (*Server) LoginRequestHandler

func (s *Server) LoginRequestHandler(c *gin.Context)

登录流程 1.从数据库获取此用户名,有返回,无则下一步 2.若关闭了自动注册返回次用户不存在,否则进入下一步 3.此步是开启了自动注册,将用户名写入数据库,并且获取到key作为accountUid返回

func (*Server) RiskyApiCheckHandler

func (s *Server) RiskyApiCheckHandler(c *gin.Context)

func (*Server) SdkDataUploadHandler

func (s *Server) SdkDataUploadHandler(c *gin.Context)

func (*Server) Shutdown

func (s *Server) Shutdown(context.Context) error

func (*Server) Start

func (s *Server) Start() error

func (*Server) V2LoginRequestHandler

func (s *Server) V2LoginRequestHandler(c *gin.Context)

流程: 1.检查token是否正确 2.若正确则生成token返回 3.若错误或不存在则返回错误

func (*Server) VerifyRequestHandler

func (s *Server) VerifyRequestHandler(c *gin.Context)

Jump to

Keyboard shortcuts

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