adminui

package
v0.0.0-...-5d153c6 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AssetLookups = []assetLookup{
		localeFiles.ReadFile,
	}
)
View Source
var (
	DefaultTabs = []Tab{
		{"Home", "/"},
		{"Busy", "/busy"},
		{"Queues", "/queues"},
		{"Retries", "/retries"},
		{"Scheduled", "/scheduled"},
		{"Dead", "/morgue"},
	}
)

Functions

func AType

func AType(ctx context.Context, name string) error

func BType

func BType(ctx context.Context, name string) error

func DebugLog

func DebugLog(ui *WebUI, pass http.HandlerFunc) http.HandlerFunc

The stats handler is hit a lot and adds much noise to the log, quiet it down.

func GetOnly

func GetOnly(h http.HandlerFunc) http.HandlerFunc

func Log

func Log(ui *WebUI, pass http.HandlerFunc) http.HandlerFunc

func NewJob

func NewJob(jobtype string, queue string, args ...interface{}) *client.Job

func PostOnly

func PostOnly(h http.HandlerFunc) http.HandlerFunc

func Register

func Register(js sparq.JobService)

Types

type Context

type Context interface {
	context.Context
}

type DefaultContext

type DefaultContext struct {
	context.Context

	Root string
	// contains filtered or unexported fields
}

func NewContext

func NewContext(ui *WebUI, req *http.Request, resp http.ResponseWriter) *DefaultContext

func (*DefaultContext) Locale

func (d *DefaultContext) Locale() string

func (*DefaultContext) Pusher

func (d *DefaultContext) Pusher() sparq.Pusher

func (*DefaultContext) Request

func (d *DefaultContext) Request() *http.Request

func (*DefaultContext) Response

func (d *DefaultContext) Response() http.ResponseWriter

func (*DefaultContext) Translation

func (d *DefaultContext) Translation(str string) string

func (*DefaultContext) UseCsrf

func (d *DefaultContext) UseCsrf() bool

type Tab

type Tab struct {
	Name string
	Path string
}

type Translator

type Translator interface {
	Locale() string
	Translation(string) string
}

type WebUI

type WebUI struct {
	sparq.Pusher
	StartedAt time.Time
	Binding   string
	// contains filtered or unexported fields
}

func NewWeb

func NewWeb(p sparq.Pusher, binding string) *WebUI

func (*WebUI) Embed

func (ui *WebUI) Embed(root *mux.Router, prefix string) *mux.Router

Jump to

Keyboard shortcuts

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