library

package
v0.0.0-305 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBucket       = errors.New("Invalid bucket!")
	ErrSize         = errors.New("Invalid size!")
	ErrInvalidImage = errors.New("Invalid image!")
)

Functions

func DTExportToExcel

func DTExportToExcel(Config DataTableConfig) (string, error)

func DTGenerateColumn

func DTGenerateColumn(col []map[string]interface{}) string

func DTGenerateOrder

func DTGenerateOrder(col []map[string]interface{}, req map[string]interface{}) string

func DTGenerateWhere

func DTGenerateWhere(col []map[string]interface{}, req map[string]interface{}) string

func DTGeneratorLimit

func DTGeneratorLimit(req map[string]interface{}) string

func DataTable

func DataTable(Config DataTableConfig) (interface{}, error)

func DataTableTest

func DataTableTest() string

func GenUID

func GenUID(sequence int, lengthNumber int, charMinLenght int) string

func GenUIDToAlpha

func GenUIDToAlpha(num int, addString string) string

func JsonDecode

func JsonDecode(data string) (map[string]interface{}, error)

json decode

func JsonEncode

func JsonEncode(data interface{}) (string, error)

json encode

func JsonReqBody

func JsonReqBody(c *gin.Context) (map[string]interface{}, error)

parse json requst Body

func SaveImageToDisk

func SaveImageToDisk(fileNameBase, data string) (string, error)

Types

type DataTableConfig

type DataTableConfig struct {
	Primary    string
	Where      string
	Group      string
	Order      string
	Result     interface{}
	Column     []map[string]interface{}
	Table      string
	Connection *gorm.DB
	Request    map[string]interface{}
}

ykzirla DV8uJq2UWP6BgNa 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

type DataTableOutput

type DataTableOutput struct {
	Draw            int         `json:"draw"`
	RecordsTotal    int         `json:"recordsTotal"`
	RecordsFiltered int         `json:"recordsFiltered"`
	Data            interface{} `json:"data"`
}

Jump to

Keyboard shortcuts

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