tools

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2021 License: MIT Imports: 12 Imported by: 14

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Mix map[string]string

Functions

func CallMix

func CallMix(index string, mixData map[string]string) string

func FrontMix

func FrontMix(path string) map[string]string

func GetTemplates

func GetTemplates(e *echo.Echo) map[string]*template.Template

func WriteFile

func WriteFile(fileContent string, path string)

func WriteFileFormat

func WriteFileFormat(fileContent string, path string)

Types

type Paginator

type Paginator struct {
	//To int         `json:"to"`
	Total       int         `json:"total"`
	LastPage    int         `json:"last_page"`
	Data        interface{} `json:"data"`
	Offset      int         `json:"offset"`
	Limit       int         `json:"limit"`
	CurrentPage int         `json:"current_page"`
	PrevPage    int         `json:"prev_page"`
	NextPage    int         `json:"next_page"`
}

Paginator

func Paging

func Paging(p *Param, result interface{}) *Paginator

Paging

type Param

type Param struct {
	DB      *gorm.DB
	Page    int
	Limit   int
	ShowSQL bool
}

type TemplateRegistry

type TemplateRegistry struct {
	// contains filtered or unexported fields
}

Define the template registry struct

func (*TemplateRegistry) Render

func (t *TemplateRegistry) Render(w io.Writer, name string, data interface{}, c echo.Context) error

Implement e.Renderer interface

Jump to

Keyboard shortcuts

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