Documentation
¶
Index ¶
- type GitBrowser
- type GitCommit
- type GitFile
- type GitRef
- type GitServer
- func (GitServer) CaddyModule() caddy.ModuleInfo
- func (gsrv *GitServer) Provision(ctx caddy.Context) error
- func (gsrv *GitServer) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddyhttp.Handler) error
- func (gsrv *GitServer) UnmarshalCaddyfile(d *caddyfile.Dispenser) error
- func (gsrv GitServer) Validate() error
- type StaticAssets
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GitBrowser ¶
type GitServer ¶
type GitServer struct {
// Git http protocol to use: 'dumb' or 'smart' or 'both' (default)
// Note this doesn't actually do anything currently, only the dumb protocol is implemented.
Protocol string `json:"protocol,omitempty"`
// Path to directory containing bare git repos (<repo>.git)
Root string `json:"root,omitempty"`
// Enable repo browser
Browse bool `json:"browse,omitempty"`
TemplateDir string `json:"template_dir,omitempty"`
// If IgnorePrefix is defined we strip it from the URL path
IgnorePrefix string `json:"ignore_prefix,omitempty"`
// File server module that serves static git files
// FileServerRaw json.RawMessage `json:"file_server,omitempty" caddy:"namespace=http.handlers inline_key=handler"`
FileServer *fileserver.FileServer `json:"-"`
// contains filtered or unexported fields
}
func (GitServer) CaddyModule ¶
func (GitServer) CaddyModule() caddy.ModuleInfo
CaddyModule returns the Caddy module information.
func (*GitServer) ServeHTTP ¶
func (gsrv *GitServer) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddyhttp.Handler) error
ServeHTTP implements http.MiddlewareHandler
func (*GitServer) UnmarshalCaddyfile ¶
Unmarshal caddyfile directive into a GitServer
type StaticAssets ¶
type StaticAssets struct {
GitIcon string
}
Click to show internal directories.
Click to hide internal directories.