utils

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2019 License: MIT Imports: 25 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 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 added in v0.1.2

func NewVersionCompare(prefix string) *versionCompare

new versionCompare

func NewZipx

func NewZipx() *zipx

Types

type CompressFileInfo added in v0.1.3

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 added in v0.1.3

func (p *Paginator) SetPerPageNums(perPageNums int)

func (*Paginator) SetPrePageNumsSelect added in v0.1.3

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

Jump to

Keyboard shortcuts

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