handlers

package
v0.0.0-...-acc4708 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 10, 2017 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Func

type Func func(r Request)

func (Func) Serve

func (f Func) Serve(r Request)

type Handler

type Handler interface {
	Serve(request Request)
}

type List

type List struct {
	// contains filtered or unexported fields
}

func NewList

func NewList(cfg *config.Global, url url.Reverser, repos []models.Repo, consumer ctx.Consumer) *List

func (*List) Serve

func (l *List) Serve(r Request)

type RepoLog

type RepoLog struct {
	// contains filtered or unexported fields
}

func NewRepoLog

func NewRepoLog(cfg *config.Global, url url.Reverser, repo models.Repo, consumer ctx.Consumer) *RepoLog

func (*RepoLog) Serve

func (rl *RepoLog) Serve(r Request)

type RepoPlain

type RepoPlain struct {
	// contains filtered or unexported fields
}

func NewRepoPlain

func NewRepoPlain(url url.Reverser, repo models.Repo) *RepoPlain

func (*RepoPlain) Serve

func (rp *RepoPlain) Serve(r Request)

type RepoRefs

type RepoRefs struct {
	// contains filtered or unexported fields
}

func NewRepoRefs

func NewRepoRefs(cfg *config.Global, url url.Reverser, repo models.Repo, consumer ctx.Consumer) *RepoRefs

func (*RepoRefs) Serve

func (rr *RepoRefs) Serve(r Request)

type RepoRoot

type RepoRoot struct {
	// contains filtered or unexported fields
}

func NewRepoRoot

func NewRepoRoot(cfg *config.Global, url url.Reverser, repo models.Repo, consumer ctx.Consumer) *RepoRoot

func (*RepoRoot) Readme

func (rr *RepoRoot) Readme(branch string) (content string, isReadmeHTML bool)

func (*RepoRoot) Serve

func (rr *RepoRoot) Serve(r Request)

type RepoTree

type RepoTree struct {
	// contains filtered or unexported fields
}

func NewRepoTree

func NewRepoTree(cfg *config.Global, url url.Reverser, repo models.Repo, consumer ctx.Consumer) *RepoTree

func (*RepoTree) Serve

func (rt *RepoTree) Serve(r Request)

type Request

type Request interface {
	// Attributes
	Path() string
	// If the registered path for this handler is /X/Y/, return /Z/ for
	// Path() == /X/Y/Z/
	Subtree() string
	QueryString() map[string]string

	// Actions
	Redirect(string)
	Write([]byte) (int, error)
	Error(error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL