Help us shape the future of Go! Take the 2026 Go Developer Survey

admin

package
v3.1.61 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2026 License: MIT, MIT Imports: 68 Imported by: 0

Documentation

Index

Constants

View Source
const UserSearchDefaultAdminSort = "alphabetically"

UserSearchDefaultAdminSort is the default sort type for admin view

Variables

This section is empty.

Functions

func AILearning

func AILearning(ctx *context.Context)

AILearning shows the AI Learning patterns admin page

func AILearningDelete

func AILearningDelete(ctx *context.Context)

AILearningDelete handles deletion of error patterns

func AILearningDeleteMultiple

func AILearningDeleteMultiple(ctx *context.Context)

AILearningDeleteMultiple handles bulk deletion of error patterns

func AILearningEdit

func AILearningEdit(ctx *context.Context)

AILearningEdit shows the edit form for an error pattern

func AILearningEditPost

func AILearningEditPost(ctx *context.Context)

AILearningEditPost handles the edit form submission

func ActivateEmail

func ActivateEmail(ctx *context.Context)

ActivateEmail serves a POST request for activating/deactivating a user's email

func AdoptOrDeleteRepository

func AdoptOrDeleteRepository(ctx *context.Context)

AdoptOrDeleteRepository adopts or deletes a repository

func Applications

func Applications(ctx *context.Context)

Applications render org applications page (for org, at the moment, there are only OAuth2 applications)

func ApplicationsPost

func ApplicationsPost(ctx *context.Context)

ApplicationsPost response for adding an oauth2 application

func ApplicationsRegenerateSecret

func ApplicationsRegenerateSecret(ctx *context.Context)

ApplicationsRegenerateSecret handles the post request for regenerating the secret

func Authentications

func Authentications(ctx *context.Context)

Authentications show authentication config page

func AvatarPost

func AvatarPost(ctx *context.Context)

AvatarPost response for change user's avatar request

func BulkAutoMatch added in v3.1.37

func BulkAutoMatch(ctx *context.Context)

BulkAutoMatch automatically matches packages to repositories

func BulkSetGlobal added in v3.1.37

func BulkSetGlobal(ctx *context.Context)

BulkSetGlobal sets/unsets global flag on multiple packages

func ChangeConfig

func ChangeConfig(ctx *context.Context)

func ChangeThemeIcon

func ChangeThemeIcon(ctx *context.Context)

ChangeThemeIcon handles site icon (favicon + navbar) upload and custom URL

func ChangeThemeLogo(ctx *context.Context)

ChangeThemeLogo handles homepage logo upload and custom URL

func CleanupExpiredData

func CleanupExpiredData(ctx *context.Context)

func Config

func Config(ctx *context.Context)

Config show admin config page

func ConfigSettings

func ConfigSettings(ctx *context.Context)

func CronTasks

func CronTasks(ctx *context.Context)

func Dashboard

func Dashboard(ctx *context.Context)

Dashboard show admin panel dashboard

func DashboardPost

func DashboardPost(ctx *context.Context)

DashboardPost run an admin operation

func DashboardServerStats

func DashboardServerStats(ctx *context.Context)

ServerStats returns the server stats partial for HTMX refresh

func DefaultOrSystemWebhooks

func DefaultOrSystemWebhooks(ctx *context.Context)

DefaultOrSystemWebhooks renders both admin default and system webhook list pages

func DeleteApplication

func DeleteApplication(ctx *context.Context)

DeleteApplication deletes the given oauth2 application

func DeleteAuthSource

func DeleteAuthSource(ctx *context.Context)

DeleteAuthSource response for deleting an auth source

func DeleteAvatar

func DeleteAvatar(ctx *context.Context)

DeleteAvatar render delete avatar page

func DeleteDefaultOrSystemWebhook

func DeleteDefaultOrSystemWebhook(ctx *context.Context)

DeleteDefaultOrSystemWebhook handler to delete an admin-defined system or default webhook

func DeleteEmail

func DeleteEmail(ctx *context.Context)

DeleteEmail serves a POST request for delete a user's email

func DeleteNotices

func DeleteNotices(ctx *context.Context)

DeleteNotices delete the specific notices

func DeletePackageVersion

func DeletePackageVersion(ctx *context.Context)

DeletePackageVersion deletes a package version

func DeleteRepo

func DeleteRepo(ctx *context.Context)

DeleteRepo delete one repository

func DeleteUser

func DeleteUser(ctx *context.Context)

DeleteUser response for deleting a user

func EditApplication

func EditApplication(ctx *context.Context)

EditApplication displays the given application

func EditApplicationPost

func EditApplicationPost(ctx *context.Context)

EditApplicationPost response for editing oauth2 application

func EditAuthSource

func EditAuthSource(ctx *context.Context)

EditAuthSource render editing auth source page

func EditAuthSourcePost

func EditAuthSourcePost(ctx *context.Context)

EditAuthSourcePost response for editing auth source

func EditUser

func EditUser(ctx *context.Context)

EditUser show editing user page

func EditUserPost

func EditUserPost(ctx *context.Context)

EditUserPost response for editing user

func Emails

func Emails(ctx *context.Context)

Emails show all emails

func EmptyNotices

func EmptyNotices(ctx *context.Context)

EmptyNotices delete all the notices

func FormatBytes

func FormatBytes(bytes uint64) string

FormatBytes formats bytes to human readable string

func MonitorDiagnosis

func MonitorDiagnosis(ctx *context.Context)

func MonitorStats

func MonitorStats(ctx *context.Context)

func NewAuthSource

func NewAuthSource(ctx *context.Context)

NewAuthSource render adding a new auth source page

func NewAuthSourcePost

func NewAuthSourcePost(ctx *context.Context)

NewAuthSourcePost response for adding an auth source

func NewUser

func NewUser(ctx *context.Context)

NewUser render adding a new user page

func NewUserPost

func NewUserPost(ctx *context.Context)

NewUserPost response for adding a new user

func Notices

func Notices(ctx *context.Context)

Notices show notices for admin

func Organizations

func Organizations(ctx *context.Context)

Organizations show all the organizations

func Packages

func Packages(ctx *context.Context)

Packages shows all packages

func PerfTrace

func PerfTrace(ctx *context.Context)

func Plugins

func Plugins(ctx *context.Context)

Plugins shows the admin plugins page

func QueueManage

func QueueManage(ctx *context.Context)

QueueManage shows details for a specific queue

func QueueRemoveAllItems

func QueueRemoveAllItems(ctx *context.Context)

func QueueSet

func QueueSet(ctx *context.Context)

QueueSet sets the maximum number of workers and other settings for this queue

func Queues

func Queues(ctx *context.Context)

func RedirectToDefaultSetting

func RedirectToDefaultSetting(ctx *context.Context)

func Repos

func Repos(ctx *context.Context)

Repos show all the repositories

func SelfCheck

func SelfCheck(ctx *context.Context)

func SelfCheckPost

func SelfCheckPost(ctx *context.Context)

func SendTestMail

func SendTestMail(ctx *context.Context)

SendTestMail send test mail to confirm mail service is OK

func SingleAutoMatch added in v3.1.37

func SingleAutoMatch(ctx *context.Context)

SingleAutoMatch automatically matches a single package to a repository

func Stacktrace

func Stacktrace(ctx *context.Context)

Stacktrace show admin monitor goroutines page

func StacktraceCancel

func StacktraceCancel(ctx *context.Context)

StacktraceCancel cancels a process

func SystemStatus

func SystemStatus(ctx *context.Context)

func TestCache

func TestCache(ctx *context.Context)

TestCache test the cache settings

func UnadoptedRepos

func UnadoptedRepos(ctx *context.Context)

UnadoptedRepos lists the unadopted repositories

func Users

func Users(ctx *context.Context)

Users show all the users

func ViewUser

func ViewUser(ctx *context.Context)

Types

type AILearningStats

type AILearningStats struct {
	TotalPatterns    int64
	TotalOccurrences int64
	TotalSuccesses   int64
	SuccessRate      float64
	TopRunnerTypes   []string
	TopProjectTypes  []string
}

AILearningStats holds statistics for the AI Learning dashboard

type PluginInfo

type PluginInfo struct {
	Name        string
	Version     string
	Description string
	Features    []string
	LicenseInfo *plugins.LicenseInfo
}

PluginInfo contains display information about a plugin

type ServerStats

type ServerStats struct {
	CPULoad      float64
	NumCPU       int
	NumGoroutine int
	MemTotal     int64
	MemUsed      int64
	MemPercent   float64
	DiskTotal    int64
	DiskUsed     int64
	DiskFree     int64
	DiskPercent  float64
	Uptime       time.Duration
	StartTime    time.Time
	Status       string
}

ServerStats holds server system statistics

func GetServerStats

func GetServerStats() *ServerStats

GetServerStats collects current server statistics

Source Files

  • admin.go
  • ai_learning.go
  • applications.go
  • auths.go
  • config.go
  • diagnosis.go
  • emails.go
  • hooks.go
  • notice.go
  • orgs.go
  • packages.go
  • perftrace.go
  • plugins.go
  • queue.go
  • queue_tester.go
  • repos.go
  • runners.go
  • server_stats.go
  • server_stats_unix.go
  • stacktrace.go
  • users.go

Jump to

Keyboard shortcuts

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