utils

package
v0.0.0-...-d95f0ed Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2020 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Document_Default_FileName = "README"
	Document_Page_Suffix      = ".md"
)
View Source
const (
	Document_Type_Page = 1
	Document_Type_Dir  = 2
)
View Source
const (
	BASE_64_TABLE = "1234567890poiuytreqwasdfghjklmnbvcxzQWERTYUIOPLKJHGFDSAZXCVBNM-_"
)

Variables

View Source
var Convert = NewConvert()
View Source
var Date = NewDate()
View Source
var Document = NewDocument("./data", "./data/markdowns")
View Source
var Email = NewEmail()
View Source
var Encrypt = NewEncrypt()
View Source
var File = NewFile()
View Source
var Misc = NewMisc()
View Source
var Request = NewRequest()
View Source
var (
	VersionCompare = NewVersionCompare(defaultPrefix)
)
View Source
var Zipx = NewZipx()

Functions

func MapInterface2String

func MapInterface2String(inputData map[string]interface{}) map[string]string

func MapString2Interface

func MapString2Interface(fromMaps []map[string]string) (toMaps []map[string]interface{})

func NewConvert

func NewConvert() *convert

func NewDate

func NewDate() *date

func NewDocument

func NewDocument(documentAbsDir string, markdownAbsDir string) *document

func NewEmail

func NewEmail() *email

func NewEncrypt

func NewEncrypt() *encrypt

func NewFile

func NewFile() *file

func NewMisc

func NewMisc() *misc

func NewRequest

func NewRequest() *request

func NewVersionCompare

func NewVersionCompare(prefix string) *versionCompare

new versionCompare

func NewZipx

func NewZipx() *zipx

Types

type CompressFileInfo

type CompressFileInfo struct {
	File       string
	PrefixPath string
	// contains filtered or unexported fields
}

type Paginator

type Paginator struct {
	Request           *http.Request
	PerPageNums       int
	PerPageNumsSelect []int
	MaxPages          int
	// contains filtered or unexported fields
}

func NewPaginator

func NewPaginator(req *http.Request, per int, nums interface{}) *Paginator

func (*Paginator) HasNext

func (p *Paginator) HasNext() bool

func (*Paginator) HasPages

func (p *Paginator) HasPages() bool

func (*Paginator) HasPrev

func (p *Paginator) HasPrev() bool

func (*Paginator) IsActive

func (p *Paginator) IsActive(page int) bool

func (*Paginator) Nums

func (p *Paginator) Nums() int64

func (*Paginator) Offset

func (p *Paginator) Offset() int

func (*Paginator) Page

func (p *Paginator) Page() int
func (p *Paginator) PageLink(page int) string

func (*Paginator) PageLinkFirst

func (p *Paginator) PageLinkFirst() (link string)

func (*Paginator) PageLinkLast

func (p *Paginator) PageLinkLast() (link string)

func (*Paginator) PageLinkNext

func (p *Paginator) PageLinkNext() (link string)

func (*Paginator) PageLinkPrev

func (p *Paginator) PageLinkPrev() (link string)

func (*Paginator) PageNums

func (p *Paginator) PageNums() int

func (*Paginator) Pages

func (p *Paginator) Pages() []int
func (p *Paginator) PrePageNumLink(perPageNum int) string

func (*Paginator) SetNums

func (p *Paginator) SetNums(nums interface{})

func (*Paginator) SetPerPageNums

func (p *Paginator) SetPerPageNums(perPageNums int)

func (*Paginator) SetPrePageNumsSelect

func (p *Paginator) SetPrePageNumsSelect(selectNums []int)

Jump to

Keyboard shortcuts

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