syntax = "v1" info ( title: "认证接口" ) type ( UserLoginReq { Email string `json:"email"` Password string `json:"password"` } UserRegisterReq { Email string `json:"email"` Password string `json:"password"` Code string `json:"code"` ReferCode string `json:"refer_code,optional"` } AuthResp { Token string `json:"token"` Expire int64 `json:"expire"` } ResetPasswordReq { Email string `json:"email"` Password string `json:"password"` Code string `json:"code"` } ) @server ( prefix: /api/v1/auth group: auth ) service ppanel-api { @handler UserLoginHandler post /login (UserLoginReq) returns (AuthResp) @handler UserRegisterHandler post /register (UserRegisterReq) returns (AuthResp) @handler ResetPasswordHandler post /reset_password (ResetPasswordReq) }