model

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ServerTypeCMCC   = "移动"
	ServerTypeWCDMA  = "联通"
	ServerTypeOrigin = "校园网"
)

Variables

This section is empty.

Functions

func AddSuffix

func AddSuffix(name, server string) string

func Challenge

func Challenge(username string) url.Values

func Info

func Info(acid int, username, clientIp, accessToken string) url.Values

func Login

func Login(username, password string, acid int) url.Values

func Logout

func Logout(username string) url.Values

Types

type Account

type Account struct {
	Username    string `json:"username,omitempty"`
	Password    string `json:"password,omitempty"`
	AccessToken string `json:"access_token"`
	Ip          string `json:"ip"`
	Server      string `json:"server"`
}

func (*Account) JSONString

func (acc *Account) JSONString() (jsonStr string, err error)

func (*Account) String

func (acc *Account) String() string

type QChallenge

type QChallenge struct {
	Username string `json:"username"`
	Ip       string `json:"ip"`
}

query challenge

type QInfo

type QInfo struct {
	Acid        int    `json:"ac_id"`
	Username    string `json:"username"`
	ClientIp    string `json:"client_ip"`
	AccessToken string `json:"access_token"`
}

query info

type QLogin

type QLogin struct {
	Action   string `json:"action"`
	Username string `json:"username"`
	Password string `json:"password"`
	Acid     int    `json:"ac_id"`
	Ip       string `json:"ip"`
	Info     string `json:"info"`
	Chksum   string `json:"chksum"`
	N        int    `json:"n"`
	Type     int    `json:"type"`
}

query login

type QLogout

type QLogout struct {
	Action   string `json:"action"`
	Username string `json:"username"`
	Acid     int    `json:"ac_id"`
	Ip       string `json:"ip"`
}

query logout

Jump to

Keyboard shortcuts

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