template

package
v0.9.46 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2016 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActionContent2Commits

func ActionContent2Commits(act Actioner) *models.PushCommits

func ActionIcon

func ActionIcon(opType int) string

ActionIcon accepts a int that represents action operation type and returns a icon class name.

func DiffLineTypeToStr

func DiffLineTypeToStr(diffType int) string

func DiffTypeToStr

func DiffTypeToStr(diffType int) string

func List

func List(l *list.List) chan interface{}

func NewFuncMap added in v0.9.0

func NewFuncMap() []template.FuncMap

func Range

func Range(l int) []int

func RenderCommitMessage

func RenderCommitMessage(full bool, msg, urlPrefix string, metas map[string]string) template.HTML

RenderCommitMessage renders commit message with XSS-safe and special links.

func ReplaceLeft

func ReplaceLeft(s, old, new string) string

Replaces all prefixes 'old' in 's' with 'new'.

func Safe

func Safe(raw string) template.HTML

func Sha1

func Sha1(str string) string

func Str2html

func Str2html(raw string) template.HTML

func ToUtf8

func ToUtf8(content string) string

func ToUtf8WithErr

func ToUtf8WithErr(content []byte) (error, string)

Types

type Actioner

type Actioner interface {
	GetOpType() int
	GetActUserName() string
	GetActEmail() string
	GetRepoUserName() string
	GetRepoName() string
	GetRepoPath() string
	GetRepoLink() string
	GetBranch() string
	GetContent() string
	GetCreate() time.Time
	GetIssueInfos() []string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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