controllers

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2022 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertClassificationToHumanString

func ConvertClassificationToHumanString(classification int) string

func ConvertClassificationToString

func ConvertClassificationToString(classification int) string

Types

type App

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

func NewApp

func NewApp(cfg *cfg.Config, fsTemplates, fsStatic *embed.FS) *App

func (*App) AdminEditDetailsHandler

func (app *App) AdminEditDetailsHandler(w http.ResponseWriter, r *http.Request)

func (*App) AdminEditGroupDetailHandler

func (app *App) AdminEditGroupDetailHandler(w http.ResponseWriter, r *http.Request)

func (*App) AdminEditGroupsHandler

func (app *App) AdminEditGroupsHandler(w http.ResponseWriter, r *http.Request)

func (*App) AdminHandler

func (app *App) AdminHandler(w http.ResponseWriter, r *http.Request)

func (*App) AdminUsersHandler

func (app *App) AdminUsersHandler(w http.ResponseWriter, r *http.Request)

func (*App) ApiConfigHandler added in v0.0.4

func (app *App) ApiConfigHandler(w http.ResponseWriter, r *http.Request)

func (*App) ApiCronStatsHandler

func (app *App) ApiCronStatsHandler(w http.ResponseWriter, r *http.Request)

func (*App) ApiEditCreateHandler

func (app *App) ApiEditCreateHandler(w http.ResponseWriter, r *http.Request)

func (*App) ApiEditGetHandler

func (app *App) ApiEditGetHandler(w http.ResponseWriter, r *http.Request)

func (*App) ApiEditGroupCreateHandler

func (app *App) ApiEditGroupCreateHandler(w http.ResponseWriter, r *http.Request)

func (*App) ApiEditGroupGetHandler

func (app *App) ApiEditGroupGetHandler(w http.ResponseWriter, r *http.Request)

func (*App) ApiEditGroupListHandler

func (app *App) ApiEditGroupListHandler(w http.ResponseWriter, r *http.Request)

func (*App) ApiEditGroupUpdateHandler

func (app *App) ApiEditGroupUpdateHandler(w http.ResponseWriter, r *http.Request)

func (*App) ApiEditListHandler

func (app *App) ApiEditListHandler(w http.ResponseWriter, r *http.Request)

func (*App) ApiEditNextHandler

func (app *App) ApiEditNextHandler(w http.ResponseWriter, r *http.Request)

func (*App) ApiEditUpdateHandler

func (app *App) ApiEditUpdateHandler(w http.ResponseWriter, r *http.Request)

func (*App) ApiExportDoneHandler

func (app *App) ApiExportDoneHandler(w http.ResponseWriter, r *http.Request)

func (*App) ApiExportDoneJsonHandler

func (app *App) ApiExportDoneJsonHandler(w http.ResponseWriter, r *http.Request)

func (*App) ApiExportDumpHandler

func (app *App) ApiExportDumpHandler(w http.ResponseWriter, r *http.Request)

func (*App) ApiExportDumpJsonHandler

func (app *App) ApiExportDumpJsonHandler(w http.ResponseWriter, r *http.Request)

func (*App) ApiExportTrainerJsonHandler added in v0.0.13

func (app *App) ApiExportTrainerJsonHandler(w http.ResponseWriter, r *http.Request)

func (*App) ApiReportExportHandler

func (app *App) ApiReportExportHandler(w http.ResponseWriter, r *http.Request)

func (*App) ApiReportImportHandler

func (app *App) ApiReportImportHandler(w http.ResponseWriter, r *http.Request)

func (*App) ApiTrainingDataHandler added in v0.0.15

func (app *App) ApiTrainingDataHandler(w http.ResponseWriter, r *http.Request)

func (*App) ApiTrainingImportHandler added in v0.0.15

func (app *App) ApiTrainingImportHandler(w http.ResponseWriter, r *http.Request)

func (*App) ApiUserClassificationCreateHandler

func (app *App) ApiUserClassificationCreateHandler(w http.ResponseWriter, r *http.Request)

func (*App) ApiUserClassificationGetHandler

func (app *App) ApiUserClassificationGetHandler(w http.ResponseWriter, r *http.Request)

func (*App) ApiUserClassificationListHandler

func (app *App) ApiUserClassificationListHandler(w http.ResponseWriter, r *http.Request)

func (*App) ApiUserCreateHandler

func (app *App) ApiUserCreateHandler(w http.ResponseWriter, r *http.Request)

func (*App) ApiUserGetHandler

func (app *App) ApiUserGetHandler(w http.ResponseWriter, r *http.Request)

func (*App) ApiUserListHandler

func (app *App) ApiUserListHandler(w http.ResponseWriter, r *http.Request)

func (*App) ApiUserUpdateHandler

func (app *App) ApiUserUpdateHandler(w http.ResponseWriter, r *http.Request)

func (*App) LoginCallbackHandler

func (app *App) LoginCallbackHandler(w http.ResponseWriter, r *http.Request)

func (*App) LoginHandler

func (app *App) LoginHandler(w http.ResponseWriter, r *http.Request)

func (*App) LogoutHandler

func (app *App) LogoutHandler(w http.ResponseWriter, r *http.Request)

func (*App) ReviewHandler

func (app *App) ReviewHandler(w http.ResponseWriter, r *http.Request)

func (*App) RunForever

func (app *App) RunForever(addr string)

func (*App) WelcomeHandler

func (app *App) WelcomeHandler(w http.ResponseWriter, r *http.Request)

type Data

type Data struct {
	EditGroups []EditGroup `xml:"EditGroups>EditGroup,omitempty"`
	Users      []User      `xml:"Users>User,omitempty"`
}

type Edit

type Edit struct {
	Key                    int
	Id                     int
	Weight                 int
	Required               int
	Constructive           int
	Skipped                int
	Vandalism              int
	OriginalClassification string
	RealClassification     string
	Comments               []string `xml:"Comments>Comment,omitempty"`
	Users                  []string `xml:"Users>User,omitempty"`
}

type EditGroup

type EditGroup struct {
	Key      int
	Name     string
	Weight   int
	Edits    []Edit `xml:"Edits>Edit,omitempty"`
	Reviewed []Edit `xml:"Reviewed>Edit,omitempty"`
	Done     []Edit `xml:"Done>Edit,omitempty"`
}

type NoIndexFileSystem

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

func (NoIndexFileSystem) Open

func (nfs NoIndexFileSystem) Open(path string) (http.File, error)

type TrainedData added in v0.0.13

type TrainedData map[int]map[int]bool

type User

type User struct {
	Key             int
	Nick            string
	Classifications int
}

Jump to

Keyboard shortcuts

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