Documentation ¶
Index ¶
- func Client(w http.ResponseWriter, r *http.Request) *git.Client
- func LogoffHandler(c *Context) error
- func Render(w http.ResponseWriter, r *http.Request, tmpl string, data interface{}) error
- func RunWebServer(bind string) error
- func ToGithubHandler(c *Context) error
- func WebCommand() *commander.Command
- func WebError(w http.ResponseWriter, r *http.Request, err error)
- type Context
- func (c *Context) AddDefer(f func())
- func (c *Context) Context() context.Context
- func (c *Context) Decode(i interface{}) error
- func (c *Context) Flash(css, title, content string, args map[string]interface{}) error
- func (c *Context) FlashError(title, content string, args map[string]interface{}) error
- func (c *Context) FlashInfo(title, content string, args map[string]interface{}) error
- func (c *Context) FlashSuccess(title, content string, args map[string]interface{}) error
- func (c *Context) Flashes() ([]interface{}, error)
- func (c *Context) P(k string) string
- func (c *Context) PI(k string) int64
- func (c *Context) Redirect(f string, args ...interface{}) error
- func (c *Context) Render(templ string, data map[string]interface{}) error
- func (c *Context) Repo() (*git.Repo, error)
- func (c *Context) SaveSession() error
- func (c *Context) WebError(err error)
- type FlashMessage
- type OSFileSystem
- func (o *OSFileSystem) Mkdir(name string, perm os.FileMode) error
- func (o *OSFileSystem) OpenFile(name string, flag int, perm os.FileMode) (webdav.File, error)
- func (o *OSFileSystem) RemoveAll(name string) error
- func (o *OSFileSystem) Rename(oldName, newName string) error
- func (o *OSFileSystem) Stat(name string) (os.FileInfo, error)
- type WebHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LogoffHandler ¶
func RunWebServer ¶
func ToGithubHandler ¶
func WebCommand ¶
Types ¶
type Context ¶
type Context struct { R *http.Request W http.ResponseWriter Vars map[string]string D map[string]interface{} Client *git.Client Session *sessions.Session Defers []func() Log *logrus.Entry }
func (*Context) Decode ¶
Decode does a gorilla schema decode of the incoming form values against the given interface.
func (*Context) FlashError ¶
func (*Context) FlashSuccess ¶
func (*Context) Repo ¶
Repo returns the git.Repo for the current request's repository. The called does not need to call .Free(), since it is added to the Context's .Defers
func (*Context) SaveSession ¶
type FlashMessage ¶
type OSFileSystem ¶
type OSFileSystem struct {
// contains filtered or unexported fields
}
func NewOSFileSystem ¶
func NewOSFileSystem(root string) *OSFileSystem
func (*OSFileSystem) RemoveAll ¶
func (o *OSFileSystem) RemoveAll(name string) error
func (*OSFileSystem) Rename ¶
func (o *OSFileSystem) Rename(oldName, newName string) error
type WebHandler ¶
func (WebHandler) ServeHTTP ¶
func (f WebHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.