// Copyright 2019 github.com. All rights reserved. // Use of this source code is governed by github.com. package v1 import ( "smart-site-management-gateway/param/base" "smart-site-management-gateway/pb/v1" ) type LoginBody struct { User string `form:"user"` Password string `form:"password"` Verify string `form:"verify"` Captcha string `form:"captcha"` RemberPassword bool `form:"rember_password"` } type LoginRequest struct { base.Header LoginBody } type LoginData struct { Uid int64 `json:"uid"` Token string `json:"token"` RefreshToken string `json:"refresh_token"` IsAdmin bool `json:"is_admin"` User string `json:"user"` } type LoginResponse struct { base.Result Data LoginData `json:"data"` } type TokenRequest struct { base.Header } type TokenResponse struct { base.Result Data string `json:"data"` RefreshToken string `json:"refresh_token"` } type VcodeQuery struct { Phone string `form:"phone"` } type VcodeRequest struct { VcodeQuery } type VcodeResponse struct { base.Result Data v1.GetVcodeReply `json:"data"` } type FindPasswdVerifyBody struct { Phone string `form:"phone"` Verify string `form:"verify"` Vcode uint32 `form:"vcode"` Captcha string `form:"captcha"` } type FindPasswdVerifyRequest struct { FindPasswdVerifyBody } type FindPasswdVerifyResponse struct { base.Result } type ChangePasswdBody struct { Old string `form:"old"` New string `form:"new"` } type ChangePasswdRequest struct { base.Header ChangePasswdBody } type ChangePasswdResponse struct { base.Result } type MailUpdateQuery struct { Token string `form:"token"` } type MailUpdateRequest struct { MailUpdateQuery } type MailUpdateResponse struct { base.Result } type MailPrepareBody struct { Email string `form:"email"` Password string `form:"password"` } type MailPrepareRequest struct { base.Header MailPrepareBody } type MailPrepareResponse struct { base.Result } type PhoneUpdateBody struct { Phone string `form:"phone"` Vcode uint32 `form:"vcode"` } type PhoneUpdateRequest struct { base.Header PhoneUpdateBody } type PhoneUpdateResponse struct { base.Result } type UserInfoRequest struct { base.Header } type UserInfoResponse struct { base.Result Data v1.UserInfoReply `json:"data"` } type LogListQuery struct { Page int32 `form:"page"` Start int64 `form:"start"` End int64 `form:"end"` } type LogListRequest struct { base.Header LogListQuery } type LogListResponse struct { base.Result Data v1.LogListReply `json:"data"` } type CaptchaIdRequest struct { } type CaptchaIdResponse struct { base.Result CaptureId string } type CaptchaPngPath struct { CaptchaId string `uri:"captcha_id"` } type CaptchaPngRequest struct { CaptchaPngPath } type CaptchaPngResponse struct { } type UserPermissionRequest struct{ base.Header } type UserPermissionData struct { IsAdmin bool `json:"is_admin"` UserName string `json:"user_name"` } type UserPermissionResponse struct { base.Result Data UserPermissionData `json:"data"` }