package main // *common type MsgInterface struct { Success int `json:"success"` Msg interface{} `json:"msg"` } // // *error // type SimpleJsonMsg struct { // Success int `json:"success"` // Msg string `json:"msg"` // } // *handler // login type HandlerLoginData struct { Name string `json:"name"` Password string `json:"password"` } // register type HandlerRegisterData struct { Name string `json:"name"` Password string `json:"password"` Password2 string `json:"password2"` Key string `json:"key"` } // userinfo type HandlerUserInfo struct { Name string `json:"name"` } // seturl type HandlerSetUrl struct { Url string `json:"url"` } // geturl type HandlerGetUrl struct { Url string `json:"url"` Status int `json:"status"` Msg string `json:"msg"` } // setkey // getkey type HandlerKey struct { AK string `json:"ak"` SK string `json:"sk"` } // *data // user type LogData struct { Time int `json:"time"` Name string `json:"name"` Type int `json:"type"` } // admin type LogDataAdmin struct { Time int `json:"time"` Name string `json:"name"` Type int `json:"type"` Msg string `json:"msg"` } // details type LogDataDetails struct { Uid int `json:"id"` Name string `json:"name"` Time int `json:"time"` // 最早成功时间 Fail int `json:"fail"` // 失败次数 }