httpclient

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2021 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	//ErrCannotParseData cannot parse html data error
	ErrCannotParseData = errors.New("data: parse error")
)

Functions

func LoginConfirm

func LoginConfirm(ctx context.Context, account interface{}, timeout time.Duration) error

LoginConfirm 验证账号密码

func Punch

func Punch(ctx context.Context, account interface{}, timeout time.Duration) (err error)

Punch 打卡

Types

type Account added in v1.0.12

type Account struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

Account account info for login

func (Account) Name added in v1.0.12

func (a Account) Name() string

Name get the name of the account

type CookieNotFoundErr

type CookieNotFoundErr struct {
	// contains filtered or unexported fields
}

CookieNotFoundErr error interface for Cookies

func (CookieNotFoundErr) Error

func (t CookieNotFoundErr) Error() string

type HealthForm deprecated

type HealthForm struct {
	DataTime        string `json:"DATETIME_CYCLE" url:"DATETIME_CYCLE"` // 填报时间
	StudentID       string `json:"XGH_336526" url:"XGH_336526"`         // 学号
	Name            string `json:"XM_1474" url:"XM_1474"`               // 姓名
	ID              string `json:"SFZJH_859173" url:"SFZJH_859173"`     // 身份证号
	College         string `json:"SELECT_941320" url:"SELECT_941320"`   // 学院
	Grade           string `json:"SELECT_459666" url:"SELECT_459666"`   // 年级
	Department      string `json:"SELECT_814855" url:"SELECT_814855"`   // 专业
	Class           string `json:"SELECT_525884" url:"SELECT_525884"`   // 班级
	Dormitory       string `json:"SELECT_125597" url:"SELECT_125597"`   // 宿舍楼
	DormitoryNumber string `json:"TEXT_950231" url:"TEXT_950231"`       // 宿舍号
	PhoneNumber     string `json:"TEXT_937296" url:"TEXT_937296"`       // 手机号码
	Temperature     string `json:"RADIO_6555" url:"RADIO_6555"`         // 体温状况
	InSchool        string `json:"RADIO_535015" url:"RADIO_535015"`     // 是否在校内
	SelfHealth      string `json:"RADIO_891359" url:"RADIO_891359"`     // 本人健康状况
	MateHealth      string `json:"RADIO_372002" url:"RADIO_372002"`     // 同住人健康状况
	HighRisk        string `json:"RADIO_618691" url:"RADIO_618691"`     // 中高风险地区旅居史、接触中高风险地区人员
}

HealthForm form for post

Deprecated: using map[string]string instead

type QueryParam

type QueryParam struct {
	Wid    string `url:"wid"`
	UserID string `url:"userId"`
}

QueryParam query param struct

Jump to

Keyboard shortcuts

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