admin

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrLastAdmin = errors.New("cannot demote the last admin")

ErrLastAdmin is returned when trying to demote the only remaining admin.

View Source
var ErrTagNameTaken = errors.New("a tag with that name already exists")

ErrTagNameTaken is returned when creating or renaming a tag to an existing name.

View Source
var ErrUserNotApproved = errors.New("user must be approved before assigning tags")

ErrUserNotApproved is returned when trying to assign tags to an unapproved user.

View Source
var StaticFS embed.FS

Functions

This section is empty.

Types

type Handler

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

func NewHandler

func NewHandler(db *gorm.DB, tools []tool.Tool, configsSvc *configs.Service, ssoSvc *sso.Service, svc JobListProvider) *Handler

func (*Handler) Register

func (h *Handler) Register(mux *http.ServeMux, sessionMidd *login.Middleware)

type JobListProvider

type JobListProvider interface {
	ListJobs(ctx context.Context) ([]entity.Job, error)
}

JobListProvider is the subset of manager.Service that the admin panel needs.

type ToolPerm

type ToolPerm struct {
	Path       string
	Visibility entity.ToolVisibility
	Disabled   bool
	TagIDs     []string
}

Directories

Path Synopsis
templ: version: v0.3.1001
templ: version: v0.3.1001

Jump to

Keyboard shortcuts

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