tmpl

package
v0.0.0-...-91abe55 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2017 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

beta version

Index

Constants

This section is empty.

Variables

View Source
var (
	Json_error_data_en string
	Json_error_data_ru string
)

Functions

func GetDir

func GetDir() string

func GetTemplate

func GetTemplate(address string) (*template.Template, error)

func HumanInt

func HumanInt(st interface{}) string

func InitDir

func InitDir(address string)

func IsStatus

func IsStatus(status, is, value string, params ...string) string

func Json

func Json(w http.ResponseWriter, data interface{})

func JsonString

func JsonString(w http.ResponseWriter, data string)

func MessageError

func MessageError(w http.ResponseWriter, message ...string)

func MessageOK

func MessageOK(w http.ResponseWriter, message ...string)

func Pagination

func Pagination(url string, page int64, page_max int64, address string) (r template.HTML, err error)

func Redirect

func Redirect(w http.ResponseWriter, address string)

func Render

func Render(w http.ResponseWriter, data interface{}, address string)

func RenderHTML

func RenderHTML(data interface{}, address string) (r template.HTML, err error)

func RenderString

func RenderString(data interface{}, address string) (r string, err error)

func RenderText

func RenderText(w http.ResponseWriter, data interface{}, address string)

func SetDir

func SetDir(address string)

func TMPL_json

func TMPL_json(v interface{}) template.JS

Types

type Json_error_data

type Json_error_data struct {
	Message string
	Status  string
}
type PaginationLink struct {
	// contains filtered or unexported fields
}
func NewPaginationLink() (p *PaginationLink)

func (*PaginationLink) GetAddress

func (p *PaginationLink) GetAddress() string

func (*PaginationLink) GetPage

func (p *PaginationLink) GetPage() int64

func (*PaginationLink) IsActive

func (p *PaginationLink) IsActive() bool

func (*PaginationLink) IsType

func (p *PaginationLink) IsType(link_type string) bool

func (*PaginationLink) SetActive

func (p *PaginationLink) SetActive()

func (*PaginationLink) SetPage

func (p *PaginationLink) SetPage(page int64) *PaginationLink

func (*PaginationLink) SetType

func (p *PaginationLink) SetType(link_type string) *PaginationLink

func (*PaginationLink) SetUrl

func (p *PaginationLink) SetUrl(url string) *PaginationLink

Jump to

Keyboard shortcuts

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