Documentation
¶
Index ¶
- Variables
- type BlobParams
- type BranchEntry
- type BranchesParams
- type Breadcrumb
- type CommitParams
- type CommitsListParams
- type FileTree
- type FileTreeParams
- type FileView
- type HeaderParams
- type LayoutParams
- type ListEntry
- type ListParams
- type MarkdownParams
- type Pagination
- type PreviewCard
- type PreviewParams
- type TagsParams
Constants ¶
This section is empty.
Variables ¶
View Source
var BlobTemplate = Must(Must(layout.Clone()).Parse(blobContent))
View Source
var BranchesTemplate = Must(Must(layout.Clone()).Parse(branchesContent))
View Source
var CSSMarkdownDark string
View Source
var CSSMarkdownLight string
View Source
var CommitTemplate = Must(Must(layout.Clone()).Parse(commitContent))
View Source
var CommitsListTemplate = Must(Must(layout.Clone()).Parse(commitsListContent))
View Source
var ListTemplate = Must(Must(layout.Clone()).Parse(listContent))
View Source
var MarkdownTemplate = Must(Must(layout.Clone()).Parse(markdownContent))
View Source
var PreviewTemplate = Must(New("preview").Parse(previewContent))
View Source
var TagsTemplate = Must(Must(layout.Clone()).Parse(tagsContent))
Functions ¶
This section is empty.
Types ¶
type BlobParams ¶
type BlobParams struct {
LayoutParams
HeaderParams
CSS CSS
Blob git.Blob
IsImage bool
IsBinary bool
Content HTML
}
type BranchEntry ¶
type BranchesParams ¶
type BranchesParams struct {
LayoutParams
Branches []BranchEntry
}
type Breadcrumb ¶
type CommitParams ¶
type CommitParams struct {
LayoutParams
Commit git.Commit
DiffCSS CSS
FileTree []*FileTree
FileViews []FileView
}
type CommitsListParams ¶
type CommitsListParams struct {
LayoutParams
HeaderParams
Ref git.Ref
Commits []git.Commit
Page Pagination
}
type FileTree ¶
type FileTree struct {
Name string
Path string
IsDir bool
Children []*FileTree
// File status (applicable when IsDir == false)
IsNew bool
IsDelete bool
IsRename bool
OldName string
NewName string
// Anchor id for this file (empty for directories)
Anchor string
}
FileTree represents a directory or file in a commit's changed files tree. For directories, IsDir is true and Children contains nested nodes. For files, status flags indicate the type of change.
type FileTreeParams ¶
type FileTreeParams struct {
Nodes []*FileTree
}
type FileView ¶
type FileView struct {
Path string
OldName string
NewName string
IsNew bool
IsDelete bool
IsRename bool
IsBinary bool
HasChanges bool
HTML HTML // pre-rendered HTML for diff of this file
}
FileView represents a single file section on the commit page with its pre-rendered HTML diff and metadata used by the template.
type HeaderParams ¶
type HeaderParams struct {
Ref git.Ref
Header string
Breadcrumbs []Breadcrumb
}
type LayoutParams ¶
type ListParams ¶
type ListParams struct {
LayoutParams
HeaderParams
Ref git.Ref
ParentHref string
Dirs []ListEntry
Files []ListEntry
Readme HTML
}
type MarkdownParams ¶
type MarkdownParams struct {
LayoutParams
HeaderParams
Blob git.Blob
Content HTML
}
type Pagination ¶
type PreviewCard ¶
type PreviewParams ¶
type PreviewParams struct {
Count int
Themes []PreviewCard
}
type TagsParams ¶
type TagsParams struct {
LayoutParams
Tags []git.Tag
}
Click to show internal directories.
Click to hide internal directories.