helper

package
v0.0.0-...-49cc056 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const TimeFormat = "2006-01-02 15:04:05"

Variables

This section is empty.

Functions

func AbstractCache

func AbstractCache() cache.AbstractCache

获取缓存服务

func Ajax

func Ajax(msg interface{}, errcode int64, this *pine.Context)

Ajax Ajax返回数据给前端

func App

func App() *pine.Application

获取应用实例

func Bytes2String

func Bytes2String(b []byte) *string

func GetCallerFuncName

func GetCallerFuncName() string

GetCallerFuncName 获取当前执行函数名 只用于日志记录

func GetLocation

func GetLocation() *time.Location

func GetMd5

func GetMd5(str string) string

GetMd5 md5加密字符串

func GetORM

func GetORM() *xorm.Engine

func GetRandomString

func GetRandomString(l int) string

func GetRootPath

func GetRootPath(relPath ...string) string

GetRootPath 获取项目根目录 (即 main.go的所在位置)

func GetTimeStamp

func GetTimeStamp() int

GetTimeStamp 获取时间戳

func GetUrlPrefix

func GetUrlPrefix(catid int64) string

func HandleArtListInfo

func HandleArtListInfo(list []map[string]string, titlelen int)

处理文章列表信息数据. 补全一些cms生成

func InArray

func InArray(val interface{}, array interface{}) (exists bool, index int)

func Inject

func Inject(key interface{}, v interface{}, single ...bool)

Inject 注入依赖

func IsFalse

func IsFalse(args ...interface{}) bool

IsFalse 检测字段是否为 空 0 nil

func IsWindows

func IsWindows() bool

func Krand

func Krand(size int, kind int) []byte

Krand 随机字符串

func NewOrmLogFile

func NewOrmLogFile(path string) *os.File

func NowDate

func NowDate(str string) string

NowDate 当前时间 Y m d H:i:s

func PanicErr

func PanicErr(err error, msg ...string)

PanicErr 抛出异常

func Password

func Password(password, encrypt string) string

Password 生成密码

func SendEmail

func SendEmail(opt *EmailOpt, conf map[string]string) error

func ToInterfaces

func ToInterfaces(values interface{}) []interface{}

func UcFirst

func UcFirst(str string) string

Types

type DirInfo

type DirInfo struct {
	Label    string      `json:"label"`
	FullPath string      `json:"full_path"`
	IsDir    bool        `json:"is_dir"`
	Children interface{} `json:"children"`
}

func DirTree

func DirTree(dir string) []DirInfo

type EmailOpt

type EmailOpt struct {
	Title        string
	UrlOrMessage string
	Address      []string
}

type FormItemAttr

type FormItemAttr struct {
}

FormItemAttr 文档属性编辑器

type FormItemCascader

type FormItemCascader struct {
}

FormItemCascader 级联组件

type FormItemCheckbox

type FormItemCheckbox struct {
}

FormItemCheckbox 多选框

type FormItemCodeEditor

type FormItemCodeEditor struct {
}

FormItemCodeEditor 代码编辑器

type FormItemColorPicker

type FormItemColorPicker struct {
}

FormItemColorPicker 颜色选择器

type FormItemDateTime

type FormItemDateTime struct {
}

FormItemDateTime 时间日期组件

type FormItemDict

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

FormItemDict 字典组件 el-autocomplete

type FormItemInput

type FormItemInput struct {
	MixLength     uint
	Type          string
	ShowWordLimit bool
	// contains filtered or unexported fields
}

FormItemInput 输入框

type FormItemMarkdownEditor

type FormItemMarkdownEditor struct {
}

FormItemMarkdownEditor markdown编辑器

type FormItemNumberInput

type FormItemNumberInput struct {
	Min          float64 `json:"min"`
	Max          float64 `json:"max"`
	Step         float64 `json:"step"`
	StepStrictly bool    `json:"step-strictly"`
	Precision    float64 `json:"precision"`
	Size         string  `json:"size"`
	Controls     bool    `json:"controls"`
	// contains filtered or unexported fields
}

FormItemNumberInput 数组输入框

type FormItemRadio

type FormItemRadio struct {
	Options  []tables.KV `json:"options"`
	Disabled bool        `json:"disabled"`
	Size     string      `json:"size"`
	Border   bool        `json:"border"`
	Label    interface{} `json:"label"`
	// contains filtered or unexported fields
}

FormItemRadio 单选框

type FormItemSelect

type FormItemSelect struct {
}

FormItemSelect 下拉选择组件

type FormItemSlider

type FormItemSlider struct {
}

FormItemSlider 滑块组件

type FormItemSwitch

type FormItemSwitch struct {
}

FormItemSwitch 开关按钮

type FormItemTags

type FormItemTags struct {
}

FormItemTags 标签组件

type FormItemTransfer

type FormItemTransfer struct {
}

FormItemTransfer 穿梭器组件

type FormItemUeditor

type FormItemUeditor struct {
}

FormItemUeditor 富文本编辑器

type FormItemUpload

type FormItemUpload struct {
}

FormItemUpload 附件选择上传框

type FormItemUploadImage

type FormItemUploadImage struct {
	FormItemUpload
}

FormItemUploadImage 图片上传

type Page

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

func NewPage

func NewPage(urlPrefix string, curPage, prePage, total int, params map[string][]string, dynamic bool) *Page

func (*Page) GetFirst

func (p *Page) GetFirst() string

func (*Page) GetLast

func (p *Page) GetLast() string

func (*Page) GetNext

func (p *Page) GetNext() string

func (*Page) GetPrev

func (p *Page) GetPrev() string

func (*Page) HasNext

func (p *Page) HasNext() bool

func (*Page) HasPrev

func (p *Page) HasPrev() bool

func (*Page) String

func (p *Page) String() string

Jump to

Keyboard shortcuts

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