go-lemmy/types.go

14 lines
357 B
Go
Raw Normal View History

package lemmy
2022-12-10 17:17:16 +00:00
// emptyResponse is a response without any fields.
// It embeds LemmyResponse to capture any errors.
type emptyResponse struct {
lemmyResponse
}
// lemmyResponse is embedded in all response structs
// to capture any errors sent by the Lemmy server.
type lemmyResponse struct {
2022-12-10 23:33:08 +00:00
Error Optional[string] `json:"error" url:"error,omitempty"`
2022-12-10 17:17:16 +00:00
}