Documentation

Index

Constants

View Source
const (
	ServerHost    = "https://www.go-admin.cn"
	ServerHostApi = "https://www.go-admin.cn/api"
)
View Source
const TokenKey = "GOADMIN_OFFICIAL_SESS"

Variables

This section is empty.

Functions

func GetDownloadURL

func GetDownloadURL(uuid, token string) (string, string, error)

func GetOnline

func GetOnline(reqData GetOnlineReq, token string) ([]byte, error)

Types

type GetDownloadURLRes

type GetDownloadURLRes struct {
	Code int `json:"code"`
	Data struct {
		Url      string `json:"url"`
		ExtraUrl string `json:"extra_url"`
	} `json:"data"`
	Msg string `json:"msg"`
}

type GetOnlineReq

type GetOnlineReq struct {
	Page       string `json:"page"`
	Free       string `json:"free"`
	PageSize   string `json:"page_size"`
	Filter     string `json:"filter"`
	Order      string `json:"order"`
	Lang       string `json:"lang"`
	CategoryId string `json:"category_id"`
	Version    string `json:"version"`
}

func (GetOnlineReq) Format

func (req GetOnlineReq) Format() string

type LoginRes

type LoginRes struct {
	Code int `json:"code"`
	Data struct {
		Token  string `json:"token"`
		Name   string `json:"name"`
		Expire int64  `json:"expire"`
	} `json:"data"`
	Msg string `json:"msg"`
}

func Login

func Login(account, password string) LoginRes