This repository has been archived on 2023-11-13. You can view files and clone it, but cannot push or open issues or pull requests.
imagini/internal/api/models.go

25 lines
517 B
Go
Raw Normal View History

2021-02-03 03:55:35 +00:00
package api
2021-01-12 04:48:32 +00:00
type APICredentials struct {
User string `json:"user"`
Password string `json:"password"`
}
2021-02-01 23:24:09 +00:00
type APIData interface{}
2021-01-12 04:48:32 +00:00
type APIMeta struct {
2021-02-01 23:24:09 +00:00
Count int64 `json:"count"`
Page int64 `json:"page"`
2021-01-12 04:48:32 +00:00
}
type APIError struct {
Message string `json:"message"`
2021-02-01 23:24:09 +00:00
Code int64 `json:"code"`
2021-01-12 04:48:32 +00:00
}
type APIResponse struct {
2021-02-01 23:24:09 +00:00
Data APIData `json:"data,omitempty"`
Meta *APIMeta `json:"meta,omitempty"`
Error *APIError `json:"error,omitempty"`
2021-01-12 04:48:32 +00:00
}