Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Repo struct {
ScanPath string `yaml:"scanPath"`
Readme []string `yaml:"readme"`
MainBranch []string `yaml:"mainBranch"`
Ignore []string `yaml:"ignore,omitempty"`
Unlisted []string `yaml:"unlisted,omitempty"`
// Diff method. "system" uses system git and "go" uses go-git and go-diff.
// Default is "go".
Diff string `yaml:"diff"`
// TrimDotGitSuffix allows accessing bare repository without ".git" suffix.
TrimDotGitSuffix bool `yaml:"trimDotGitSuffix"`
} `yaml:"repo"`
Dirs struct {
Templates string `yaml:"templates"`
Static string `yaml:"static"`
} `yaml:"dirs"`
Meta struct {
Title string `yaml:"title"`
Description string `yaml:"description"`
SyntaxHighlight bool `yaml:"syntaxHighlight"`
RobotsTxt string `yaml:"robotsTxt"`
} `yaml:"meta"`
UI struct {
CommitsPageSize uint32 `yaml:"commitsPageSize"`
Diff struct {
// HideThresholdLines controls threshold to hide diff for the file.
// Unit is line count, and set 0 to disable diff hiding at all.
HideThresholdLines uint32 `yaml:"hideThresholdLines"`
}
Category struct {
Grouping bool `yaml:"grouping"`
Default string `yaml:"default"`
Order []string `yaml:"order"`
}
Email string `yaml:"email"`
Footer struct {
Links []struct {
Text string `yaml:"text"`
Href string `yaml:"href"`
} `yaml:"links"`
PoweredBy bool `yaml:"poweredBy"`
} `yaml:"footer"`
} `yaml:"ui"`
CompileTemplatesOnRequest bool `yaml:"compileTemplatesOnRequest"`
Server struct {
Name string `yaml:"name,omitempty"`
Host string `yaml:"host"`
Port uint `yaml:"port"`
} `yaml:"server"`
// StaticDirRevision represents version / revision of "Dirs.Static" (or the
// "embed/static" directory if the option is unset.) HTML templates uses
// this string for browser-cache bust.
StaticDirRevision string `yaml:"staticDirRevision"`
// contains filtered or unexported fields
}
func NewWithDefaults ¶
func NewWithDefaults() *Config
func (*Config) ReadFromFile ¶
Click to show internal directories.
Click to hide internal directories.