Documentation
¶
Index ¶
Constants ¶
const ( MimeTypeUnknown = MimeType(iota) MimeTypeJSON MimeTypeXML MimeTypeYAML MimeTypeProtobuf MimeTypeAvro MimeTypeThrift MimeTypeMsgPack MimeTypeForm MimeTypeMultipartForm MimeTypeOctetStream MimeTypeText MimeTypeHTML MimeTypeCSV MimeTypePNG MimeTypeJPEG MimeTypeGIF MimeTypeSVG MimeTypeBMP MimeTypeTIFF MimeTypeWebP MimeTypeHEIF MimeTypeICO MimeTypeAVIF MimeTypeWebM MimeTypeMP4 MimeTypeMKV MimeTypeAVI MimeTypeWMV MimeTypeFLV MimeTypeMOV MimeTypeMPEG MimeTypeMP3 MimeTypeWAV )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataContainer ¶
type DataContainer[T any] struct { // Data the item to be tagged as data value. Data T `json:"data"` }
DataContainer is a sentinel structure to hold a sole item as Data.
This structure helps APIs exposed to external system clients through transport protocols to create a definition of a returning values and thus, a clear separation of different return values (i.e. errors).
type MimeType ¶
type MimeType uint16
MimeType represents a MIME type.
func NewMimeType ¶
NewMimeType creates a new MimeType from a string value.
func (MimeType) MarshalText ¶
MarshalText marshals the MIME type into text.
func (*MimeType) UnmarshalText ¶
UnmarshalText unmarshals the MIME type from text.
type PageResponse ¶
type PageResponse[T any] struct { TotalItems int `json:"total_items"` PreviousPageToken string `json:"previous_page_token"` NextPageToken string `json:"next_page_token"` Items []T `json:"items"` }
PageResponse is a structure to hold a paginated response.
This structure helps APIs exposed to external system clients through transport protocols to create a definition of a paginated response and thus, a clear separation of different return values.