Documentation ¶
Index ¶
- Variables
- func InitAuth() errors.WTError
- func SendGetRequests(u string, values url.Values) (string, errors.WTError)
- func SendRequests(data any, u string, r RespInterface) (*http.Response, errors.WTError)
- func Verify(w http.ResponseWriter, r *http.Request) (res bool)
- func WriteResp(w http.ResponseWriter, status string)
- func WriteRespFail(w http.ResponseWriter)
- func WriteRespSuccess(w http.ResponseWriter)
- type AuthResp
- type CheckEmailTokenData
- type CheckEmailTokenReq
- type CheckEmailTokenResp
- type CheckLoginTokenData
- type CheckLoginTokenReq
- type CheckLoginTokenResp
- type CheckPhoneTokenData
- type CheckPhoneTokenReq
- type CheckPhoneTokenResp
- type CheckSecondFATokenData
- type CheckSecondFATokenReq
- type CheckSecondFATokenResp
- type CreateDefrayData
- type CreateDefrayReq
- type CreateDefrayResp
- type QueryDefrayData
- type QueryDefrayReq
- type QueryDefrayResp
- type Resp
- type RespInterface
- type ReturnDefrayReq
- type SendAuditReq
- type SendMsgData
- type SendMsgReq
- type SendMsgResp
- type SendWorkOrder
- type SendWorkOrderFile
- type UserData
- type UserEasy
- type UserInfoEsay
Constants ¶
This section is empty.
Variables ¶
View Source
var AuthPubKey *rsa.PublicKey
View Source
var PriKey *rsa.PrivateKey
Functions ¶
func SendRequests ¶
func WriteResp ¶
func WriteResp(w http.ResponseWriter, status string)
func WriteRespFail ¶
func WriteRespFail(w http.ResponseWriter)
func WriteRespSuccess ¶
func WriteRespSuccess(w http.ResponseWriter)
Types ¶
type CheckEmailTokenData ¶
type CheckEmailTokenData struct {
IsOK bool `json:"isOK"`
}
type CheckEmailTokenReq ¶
type CheckEmailTokenResp ¶
type CheckEmailTokenResp struct { Resp Data CheckEmailTokenData `json:"data"` }
type CheckLoginTokenData ¶
type CheckLoginTokenData struct { IsLogin bool `json:"isLogin"` User UserEasy `json:"user"` Data UserData `json:"data"` Info UserInfoEsay `json:"info"` }
type CheckLoginTokenReq ¶
type CheckLoginTokenReq struct {
Token string `json:"token"`
}
type CheckLoginTokenResp ¶
type CheckLoginTokenResp struct { Resp Data CheckLoginTokenData `json:"data"` }
type CheckPhoneTokenData ¶
type CheckPhoneTokenData struct {
IsOK bool `json:"isOK"`
}
type CheckPhoneTokenReq ¶
type CheckPhoneTokenResp ¶
type CheckPhoneTokenResp struct { Resp Data CheckPhoneTokenData `json:"data"` }
type CheckSecondFATokenData ¶
type CheckSecondFATokenData struct {
IsOK bool `json:"isOK"`
}
type CheckSecondFATokenReq ¶
type CheckSecondFATokenResp ¶
type CheckSecondFATokenResp struct { Resp Data CheckSecondFATokenData `json:"data"` }
type CreateDefrayData ¶
type CreateDefrayReq ¶
type CreateDefrayReq struct { OwnerID string `json:"ownerID,optional"` Subject string `json:"subject"` // 标题 Price int64 `json:"price"` // 价格 Quantity int64 `json:"quantity"` // 数量 UnitPrice int64 `json:"unitPrice"` // 单价 Describe string `json:"describe"` // 描述 InvitePre int64 `json:"invitePre,optional"` DistributionLevel1 int64 `json:"distributionLevel1,optional"` DistributionLevel2 int64 `json:"distributionLevel2,optional"` DistributionLevel3 int64 `json:"distributionLevel3,optional"` CanWithdraw bool `json:"canWithdraw"` ReturnURL string `json:"returnURL"` MustSelfDefray bool `json:"mustSelfDefray"` }
type CreateDefrayResp ¶
type CreateDefrayResp struct { Resp Data CreateDefrayData `json:"data"` }
type QueryDefrayData ¶
type QueryDefrayReq ¶
type QueryDefrayReq struct {
TradeID string `json:"tradeID"`
}
type QueryDefrayResp ¶
type QueryDefrayResp struct { Resp Data QueryDefrayData `json:"data"` }
type Resp ¶
type Resp struct { Code string `json:"code"` SubCode string `json:"subCode"` NumCode int64 `json:"_code"` NumSubCode int64 `json:"_subCode"` Msg string `json:"msg,omitempty"` }
func (Resp) GetSubCode ¶
type RespInterface ¶
type ReturnDefrayReq ¶
type SendAuditReq ¶
type SendMsgData ¶
type SendMsgReq ¶
type SendMsgResp ¶
type SendMsgResp struct { Resp Data SendMsgData `json:"data"` }
type SendWorkOrder ¶
type SendWorkOrder struct { UserID string `json:"userID"` Title string `json:"title"` Content string `json:"content"` File []SendWorkOrderFile `json:"file"` }
type SendWorkOrderFile ¶
type UserData ¶
type UserData struct { HasPassword bool `json:"hasPassword"` HasEmail bool `json:"hasEmail"` Has2FA bool `json:"has2FA"` HasWeChat bool `json:"hasWeChat"` HasUnionID bool `json:"hasUnionId"` HasVerified bool `json:"hasVerified"` IsCompany bool `json:"isCompany"` HasUserOriginal bool `json:"hasUserOriginal"` HasUserFaceCheck bool `json:"hasUserFaceCheck"` HasCompanyOriginal bool `json:"hasCompanyOriginal"` HasLegalPersonFaceCheck bool `json:"hasLegalPersonFaceCheck"` VerifiedPhone string `json:"verifiedPhone,omitempty"` }
type UserEasy ¶
type UserEasy struct { UID string `json:"id"` Phone string `json:"phone"` RoleID int64 `json:"roleID,omitempty"` RoleName string `json:"roleName"` UserName string `json:"userName,omitempty"` NickName string `json:"nickname,omitempty"` Header string `json:"header,omitempty"` Email string `json:"email,omitempty"` UserRealName string `json:"userRealName,omitempty"` CompanyName string `json:"companyName,omitempty"` WeChatNickName string `json:"wechatNickName,omitempty"` WeChatHeader string `json:"wechatHeader,omitempty"` UnionID string `json:"unionID,omitempty"` Signin bool `json:"signin"` Status string `json:"status"` }
Click to show internal directories.
Click to hide internal directories.