add: some user api and all api desc

This commit is contained in:
wwweww
2026-02-27 19:17:01 +08:00
parent a0c720eb2f
commit 5930fb0dde
156 changed files with 9457 additions and 1086 deletions
+23
View File
@@ -0,0 +1,23 @@
package responses
import "encoding/json"
type ErrorResponse struct {
Code int `json:"code"`
Msg string `json:"msg"`
}
func (e *ErrorResponse) Error() string {
marshal, err := json.Marshal(e)
if err != nil {
return err.Error()
}
return string(marshal)
}
func NewErrorResp(code int, msg error) *ErrorResponse {
return &ErrorResponse{
Code: code,
Msg: msg.Error(),
}
}