JCC-CSScheduler/client/internal/http/http.go

25 lines
406 B
Go

package http
import "gitlink.org.cn/cloudream/common/consts/errorcode"
type Response struct {
Code string `json:"code"`
Message string `json:"message"`
Data any `json:"data"`
}
func OK(data any) Response {
return Response{
Code: errorcode.OK,
Message: "",
Data: data,
}
}
func Failed(code string, msg string) Response {
return Response{
Code: code,
Message: msg,
}
}