controllers

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DirEntry

type DirEntry struct {
	Name  string
	IsDir bool
	Path  string
	Size  string
}

type DownloadsController

type DownloadsController struct {
	application.BaseController
}

func Downloads

func Downloads() (string, *DownloadsController)

func (DownloadsController) Handle

func (*DownloadsController) Platforms

func (c *DownloadsController) Platforms() []Platform

func (*DownloadsController) ServeFile

func (c *DownloadsController) ServeFile(w http.ResponseWriter, r *http.Request)

func (*DownloadsController) Setup

func (c *DownloadsController) Setup(app *application.App)

type GitController

type GitController struct {
	application.BaseController
	// contains filtered or unexported fields
}

GitController serves the congo repo over read-only git HTTP protocol.

func Git

func Git() (string, *GitController)

Git returns the controller name and instance.

func (GitController) Handle

Handle returns a request-scoped controller instance.

func (*GitController) Setup

func (c *GitController) Setup(app *application.App)

Setup registers the git smart HTTP routes.

type HomeController

type HomeController struct {
	application.BaseController
}

func Home

func Home() (string, *HomeController)

func (HomeController) Handle

func (*HomeController) Setup

func (c *HomeController) Setup(app *application.App)

type MailingListController

type MailingListController struct {
	application.BaseController
}

func MailingList

func MailingList() (string, *MailingListController)

func (MailingListController) Handle

func (*MailingListController) Setup

func (c *MailingListController) Setup(app *application.App)

func (*MailingListController) Subscribe

type Platform

type Platform struct {
	OS       string
	Arch     string
	Label    string
	Filename string
}

type SourceController

type SourceController struct {
	application.BaseController
	// contains filtered or unexported fields
}

func Source

func Source(sourceFS fs.FS) (string, *SourceController)

Source creates the source browser controller. sourceFS should embed the full Congo source tree.

func (*SourceController) Breadcrumbs

func (c *SourceController) Breadcrumbs() []DirEntry

func (*SourceController) Entries

func (c *SourceController) Entries() []DirEntry

func (*SourceController) File

func (c *SourceController) File() *SourceFile

func (SourceController) Handle

func (*SourceController) IsFile

func (c *SourceController) IsFile() bool

func (*SourceController) NotFound

func (c *SourceController) NotFound() bool

func (*SourceController) Path

func (c *SourceController) Path() string

func (*SourceController) Setup

func (c *SourceController) Setup(app *application.App)

type SourceFile

type SourceFile struct {
	Name     string
	Path     string
	Content  string
	Lines    int
	LineNums []int
	Lang     string
}

type StarsController

type StarsController struct {
	application.BaseController
}

func Stars

func Stars() (string, *StarsController)

func (*StarsController) Count

func (c *StarsController) Count() int

func (*StarsController) Create

func (c *StarsController) Create(w http.ResponseWriter, r *http.Request)

func (StarsController) Handle

func (*StarsController) Setup

func (c *StarsController) Setup(app *application.App)

func (*StarsController) Starred

func (c *StarsController) Starred() bool

Jump to

Keyboard shortcuts

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