util

package
v0.0.0-...-d2a2bec Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2020 License: GPL-3.0 Imports: 19 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(args ...interface{}) (string, error)

Decrypt function can be used to decrupt encrypted test using secret key First parameter is mandatory

func Encrypt

func Encrypt(args ...interface{}) (string, error)

Encrypt function can be used to encrypt plain test using secret key First parameter is mandatory

func GenerateQrcode

func GenerateQrcode(length int) string

func GenerateToken

func GenerateToken(length int) string

func GenerateUrl

func GenerateUrl(args ...interface{}) (string, error)

Types

type Paginator

type Paginator struct {
	TotalRecord  int         `json:"total_record"`
	TotalPage    int         `json:"total_page"`
	Records      interface{} `json:"records"`
	Offset       int         `json:"offset"`
	Limit        int         `json:"limit"`
	CurrentPage  int         `json:"current_page"`
	PreviousPage int         `json:"previous_page"`
	NextPage     int         `json:"next_page"`
}

func NewPaginator

func NewPaginator(p *PaginatorParameter) *Paginator

type PaginatorParameter

type PaginatorParameter struct {
	Database *gorm.DB
	Count    interface{}
	Result   interface{}
	Page     int
	Limit    int
	OrderBy  []string
	ShowSQL  bool
}

type Parser

type Parser struct{}

func (*Parser) MailTemplate

func (p *Parser) MailTemplate(name string, data interface{}) (interface{}, error)

func (*Parser) MarshalResponse

func (p *Parser) MarshalResponse(response alira.Response, out interface{}) error

func (*Parser) UnmarshalResponse

func (p *Parser) UnmarshalResponse(data []byte, code int, out interface{}) (*alira.Response, error)

Jump to

Keyboard shortcuts

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