amis

package
v0.0.26 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSelectedCluster added in v0.0.19

func GetSelectedCluster(c *gin.Context) string

func WriteJsonData

func WriteJsonData[T any](c *gin.Context, data T)

func WriteJsonError

func WriteJsonError(c *gin.Context, err error)

func WriteJsonErrorOrOK added in v0.0.9

func WriteJsonErrorOrOK(c *gin.Context, err error)

func WriteJsonList

func WriteJsonList[T any](c *gin.Context, data []T)

func WriteJsonListTotalWithError added in v0.0.19

func WriteJsonListTotalWithError[T any](c *gin.Context, total int64, data []T, err error)

func WriteJsonListWithError

func WriteJsonListWithError[T any](c *gin.Context, data []T, err error)

func WriteJsonListWithTotal

func WriteJsonListWithTotal[T any](c *gin.Context, total int64, data []T)

func WriteJsonOK

func WriteJsonOK(c *gin.Context)

func WriteJsonOKMsg

func WriteJsonOKMsg(c *gin.Context, msg string)

Types

type ListResponse

type ListResponse[T any] struct {
	Count int64 `json:"count"`
	Rows  []T   `json:"rows"`
}

type Option

type Option struct {
	Label string `json:"label"`
	Value string `json:"value"`
}

Option 定义选项结构体

func ArrayToOptions

func ArrayToOptions[T any](array []T) []Option

func MapToOptions

func MapToOptions[T any](m map[string]T) []Option

Jump to

Keyboard shortcuts

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