util

package
v0.0.0-...-5733806 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2023 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// UserKey is the key to be used for adding user objects to context
	UserKey = KNContextType("user")
	// ProblemKey is the key to be used for adding problems to context
	ProblemKey = KNContextType("problem")
	// ProblemKey is the key to be used for adding blog posts to context
	BlogPostKey = KNContextType("blogPost")
	// SubKey is the key to be used for adding submissions to context
	SubKey = KNContextType("submission")
	// PasteKey is the key to be used for adding pastes to context
	PasteKey = KNContextType("paste")
	// TestKey is the key to be used for adding tests to context
	TestKey = KNContextType("test")
	// SubTaskKey is the key to be used for adding subtasks to context
	SubTaskKey = KNContextType("subtask")
	// ProblemListKey is the key to be used for adding problem lists to context
	ProblemListKey = KNContextType("problemList")
	// AttachmentKey is the key to be used for adding attachments to context
	AttachmentKey = KNContextType("attachment")
	// TagKey is the key to be used for adding tags to context
	TagKey = KNContextType("tag")
	// ContestKey is the key to be used for adding contests to context
	ContestKey = KNContextType("contest")
	// LangKey is the key to be used for adding the user language to context
	LangKey = KNContextType("language")
	// ThemeKey is the key to be used for adding the user's preferred theme to context
	ThemeKey = KNContextType("theme")
)

Variables

This section is empty.

Functions

func Attachment

func Attachment(r *http.Request) *kilonova.Attachment

func BlogPost

func BlogPost(r *http.Request) *kilonova.BlogPost

func BlogPostContext

func BlogPostContext(ctx context.Context) *kilonova.BlogPost

func Contest

func Contest(r *http.Request) *kilonova.Contest

func ContestContext

func ContestContext(ctx context.Context) *kilonova.Contest

func Language

func Language(r *http.Request) string

func Paste

func Problem

func Problem(r *http.Request) *kilonova.Problem

func ProblemContext

func ProblemContext(ctx context.Context) *kilonova.Problem

func ProblemList

func ProblemList(r *http.Request) *kilonova.ProblemList

func SubTask

func SubTask(r *http.Request) *kilonova.SubTask

func Submission

func Submission(r *http.Request) *kilonova.FullSubmission

func SubmissionContext

func SubmissionContext(ctx context.Context) *kilonova.FullSubmission

func Tag

func Tag(r *http.Request) *kilonova.Tag

func Test

func Test(r *http.Request) *kilonova.Test

func Theme

func UserBrief

func UserBrief(r *http.Request) *kilonova.UserBrief

func UserBriefContext

func UserBriefContext(ctx context.Context) *kilonova.UserBrief

func UserFull

func UserFull(r *http.Request) *kilonova.UserFull

Types

type KNContextType

type KNContextType string

KNContextType is the string type for all context values

Jump to

Keyboard shortcuts

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