model

package
v0.0.14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 27, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicResponse

type BasicResponse struct {
	Message string `json:"message"`
}

type Cursor

type Cursor struct {
	After  string `json:"after,omitempty" query:"after,omitempty" example:""`
	Before string `json:"before,omitempty" query:"before,omitempty" example:""`
}

type Empty

type Empty struct{}

type Mutation

type Mutation[T any] struct {
	Type constant.MutationType `json:"type"`
	Data *T                    `json:"data"`
}

type PaginationRequest

type PaginationRequest struct {
	Cursor Cursor   `query:"cursor"`
	Keys   []string `query:"-"`
	Limit  int      `query:"limit"`
	Sort   Sort     `query:"sort"`
}

type PaginationResponse

type PaginationResponse struct {
	Cursor Cursor `json:"cursor"`
	Total  int64  `json:"total"`
}

type Sort

type Sort struct {
	Key   string `query:"key" example:""`
	Order string `query:"order" validate:"omitempty,oneof=asc desc" example:"asc"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL