export

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApiExport

func ApiExport(table, filename string) gin.HandlerFunc

func ApiImport

func ApiImport(table string) gin.HandlerFunc

func Error

func Error(ctx *gin.Context, err error)

func Fail

func Fail(ctx *gin.Context, err string)

func List

func List(ctx *gin.Context, data any, total int64)

func OK

func OK(ctx *gin.Context, data any)

Types

type ReplyData

type ReplyData[T any] struct {
	Data  T      `json:"data"`
	Error string `json:"error,omitempty"`
}

type ReplyList

type ReplyList[T any] struct {
	Data  []T    `json:"data"`
	Total int64  `json:"total"`
	Error string `json:"error,omitempty"`
}

Jump to

Keyboard shortcuts

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