utils

package
v0.7.99 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: MIT Imports: 15 Imported by: 14

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Mix map[string]string

Functions

func AbsolutePath added in v0.7.84

func AbsolutePath() string

func CallMix

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

func ConvertToInterfaceSlice added in v0.7.84

func ConvertToInterfaceSlice(specificSliceInterface interface{}) ([]interface{}, error)

func FileExists added in v0.7.84

func FileExists(path string) bool

func FrontMix

func FrontMix(path string) map[string]string

func GetBody added in v0.7.84

func GetBody(c *fiber.Ctx) []byte

func GetFieldValue added in v0.7.84

func GetFieldValue(structVar interface{}, fieldName string) (interface{}, error)

func GetString added in v0.7.84

func GetString(value interface{}) string

func IndexOf added in v0.7.84

func IndexOf(connectionValue interface{}, grpcRows *pb.StringRows) int

func IndexOfMicro added in v0.7.84

func IndexOfMicro(MicroserviceID int, microservices []models.Microservice) int

func RemoveDuplicateStr added in v0.7.84

func RemoveDuplicateStr(strSlice []string) []string

Types

type Paginator

type Paginator struct {
	//To int         `json:"to"`
	Total       int64       `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
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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