template

package
v0.0.0-...-ee699ad Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2016 License: MIT Imports: 17 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

func NewFuncMap() []template.FuncMap

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
	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