model

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: May 8, 2023 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 ErrorResponse

type ErrorResponse struct {
	Error            bool                     `json:"error"`
	Message          string                   `json:"message"`
	ValidationErrors []*ValidateErrorResponse `json:"validation,omitempty"`
}

type Paginated

type Paginated[T model.Models] struct {
	Data  []*T  `json:"data"`
	Total int64 `json:"total"`
	Page  int64 `json:"page"`
	Size  int64 `json:"size"`
}

func NewPaginated

func NewPaginated[T model.Models](data []*T, total, page, size int64) *Paginated[T]

type SuccessResponse

type SuccessResponse struct {
	Success bool `json:"success"`
}

type ValidateErrorResponse

type ValidateErrorResponse struct {
	FailedField string `json:"field"`
	Tag         string `json:"tag"`
	Value       string `json:"value"`
}

Jump to

Keyboard shortcuts

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