constants

package
v0.0.0-...-79683fd Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2023 License: MIT Imports: 0 Imported by: 4

Documentation

Index

Constants

View Source
const (
	ActionComment              = "comment"
	ActionApprove              = "approve"
	ActionRequestChanges       = "request-changes"
	ActionMarkAdded            = "mark-added"
	ActionUpload               = "upload-file"
	ActionVerify               = "verify"
	ActionAssignTesting        = "assign-testing"
	ActionUnassignTesting      = "unassign-testing"
	ActionAssignVerification   = "assign-verification"
	ActionUnassignVerification = "unassign-verification"
	ActionSystem               = "system"
	ActionReject               = "reject"
	ActionAuditionUpload       = "audition-upload"
	ActionAuditionSubscribe    = "audition-subscribe"
)
View Source
const (
	SubmissionLevelAudition = "audition"
	SubmissionLevelTrial    = "trial"
	SubmissionLevelStaff    = "staff"
)
View Source
const (
	ResourceKeySubmissionID          = "submission-id"
	ResourceKeySubmissionIDs         = "submission-ids"
	ResourceKeyFileID                = "file-id"
	ResourceKeyFileIDs               = "file-ids"
	ResourceKeyCommentID             = "comment-id"
	ResourceKeyCurationImageID       = "curation-image-id"
	ResourceKeyFlashfreezeRootFileID = "flashfreeze-root-file-id"
	ResourceKeyFixID                 = "fix-id"
	ResourceKeyFixFileID             = "fix-file-id"
	ResourceKeyUserID                = "user-id"
	ResourceKeyTempName              = "temp-name"
)
View Source
const (
	NotificationDefault      = "notification"
	NotificationCurationFeed = "curation-feed"
)
View Source
const (
	RequestWeb  = "web"
	RequestJSON = "json"
	RequestData = "data"
)
View Source
const (
	SubmissionStatusReceived   = "received"
	SubmissionStatusFailed     = "failed"
	SubmissionStatusCopying    = "copying"
	SubmissionStatusValidating = "validating"
	SubmissionStatusFinalizing = "finalizing"
	SubmissionStatusSuccess    = "success"
)
View Source
const (
	ErrorCannotDeleteLastSubmissionFile = "cannot delete last submission file for a given submission"
	ErrorFailedToBeginTransaction       = "failed to begin transaction"
)
View Source
const (
	RoleAdministrator = "Administrator"
	RoleModerator     = "Moderator"
	RoleCurator       = "Curator"
	RoleHacker        = "Hacker"
	RoleTester        = "Tester"
	RoleArchivist     = "Archivist"
	RoleMechanic      = "Mechanic"
	RoleHunter        = "Hunter"
	RoleTrialCurator  = "Trial Curator"
	RoleTheBlue       = "The Blue"
	RoleTheD          = "The D"
)
View Source
const SystemID = 844246603102945333
View Source
const UserInAuditSubmissionMaxFilesize = 500000000
View Source
const ValidatorID = 810112564787675166

Variables

This section is empty.

Functions

func AdderRoles

func AdderRoles() []string

func DeciderRoles

func DeciderRoles() []string

func DeleterRoles

func DeleterRoles() []string

func GetActionsWithMandatoryMessage

func GetActionsWithMandatoryMessage() []string

func GetActionsWithNotification

func GetActionsWithNotification() []string

func GetAllowedActions

func GetAllowedActions() []string

func GodRoles

func GodRoles() []string

func HasAnyRole

func HasAnyRole(has, needs []string) bool

func IsAdder

func IsAdder(roles []string) bool

IsAdder allows user to mark submission as added to flashpoint

func IsDecider

func IsDecider(roles []string) bool

IsDecider allows user to decide the state of submissions (approve, request changes, accept, reject)

func IsDeleter

func IsDeleter(roles []string) bool

IsDeleter allows users to soft delete things

func IsGod

func IsGod(roles []string) bool

IsGod allows user to do various things

func IsInAudit

func IsInAudit(roles []string) bool

IsInAudit allows users to access to submit one curation and interact only with it

func IsStaff

func IsStaff(roles []string) bool

IsStaff allows users to access and interact with all submissions, to a degree

func IsTrialCurator

func IsTrialCurator(roles []string) bool

IsTrialCurator allows user to submit submissions and see only his own submissions

func StaffRoles

func StaffRoles() []string

func TrialCuratorRoles

func TrialCuratorRoles() []string

Types

type DatabaseError

type DatabaseError struct {
	Err error
}

func (DatabaseError) Error

func (e DatabaseError) Error() string

func (DatabaseError) Unwrap

func (e DatabaseError) Unwrap() error

type PublicError

type PublicError struct {
	Msg    string `json:"message"`
	Status int    `json:"status"`
}

func (PublicError) Error

func (e PublicError) Error() string

type PublicResponse

type PublicResponse struct {
	Msg    *string `json:"message"`
	Status int     `json:"status"`
}

Jump to

Keyboard shortcuts

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