Documentation ¶
Index ¶
- Constants
- func CreateRepository(ctx *RenderContext, props *CreateRepositoryProps) string
- func Error(ctx *RenderContext, props *ErrorProps) string
- func FormatFileSize(s int64) string
- func Head(ctx *RenderContext) string
- func Index(ctx *RenderContext, props *IndexProps) string
- func Navbar(ctx *RenderContext) string
- func PageBegin(ctx *RenderContext) string
- func PageEnd(ctx *RenderContext) string
- func ProblemBox(problem string) string
- func RepositoryTabRefsDefaultBranchSelector(ctx *RenderContext, props *RepositoryTabProps, message string) string
- func RepositoryTabs(ctx *RenderContext, props *RepositoryTabProps) string
- func SendPage(ctx *fiber.Ctx, content string) error
- func ViewRepository(ctx *RenderContext, props *ViewRepositoryProps) string
- type CreateRepositoryProps
- type ErrorProps
- type IndexProps
- type RenderContext
- type RepositoryTabProps
- type ViewRepositoryProps
Constants ¶
View Source
const ( TabSelectorReadme = 1 << iota TabSelectorShowTree TabSelectorShowRefs TabSelectorClone TabSelectorCommits )
Variables ¶
This section is empty.
Functions ¶
func CreateRepository ¶
func CreateRepository(ctx *RenderContext, props *CreateRepositoryProps) string
func Error ¶
func Error(ctx *RenderContext, props *ErrorProps) string
func FormatFileSize ¶
func Head ¶
func Head(ctx *RenderContext) string
func Index ¶
func Index(ctx *RenderContext, props *IndexProps) string
func Navbar ¶
func Navbar(ctx *RenderContext) string
func PageBegin ¶
func PageBegin(ctx *RenderContext) string
func PageEnd ¶
func PageEnd(ctx *RenderContext) string
func ProblemBox ¶
func RepositoryTabRefsDefaultBranchSelector ¶
func RepositoryTabRefsDefaultBranchSelector(ctx *RenderContext, props *RepositoryTabProps, message string) string
func RepositoryTabs ¶
func RepositoryTabs(ctx *RenderContext, props *RepositoryTabProps) string
func ViewRepository ¶
func ViewRepository(ctx *RenderContext, props *ViewRepositoryProps) string
Types ¶
type CreateRepositoryProps ¶
type CreateRepositoryProps struct {
Problem string
}
type ErrorProps ¶
type IndexProps ¶
type IndexProps struct {
AllRepos []*core.RepoOnDisk
}
type RenderContext ¶
type RenderContext struct {
// contains filtered or unexported fields
}
func NewRenderContext ¶
func NewRenderContext(user *models.User) *RenderContext
NewRenderContext creates a new context for rendering pages.
User is the currently authenticated user. May be `nil` if no use is currently authenticated.
type RepositoryTabProps ¶
type ViewRepositoryProps ¶
type ViewRepositoryProps struct { Repo *core.RepoOnDisk IsEmpty bool }
Click to show internal directories.
Click to hide internal directories.