Documentation ¶
Index ¶
- Constants
- func Attachment(r *http.Request) *kilonova.Attachment
- func AttachmentContext(ctx context.Context) *kilonova.Attachment
- func BlogPost(r *http.Request) *kilonova.BlogPost
- func BlogPostContext(ctx context.Context) *kilonova.BlogPost
- func BucketContext(ctx context.Context) *datastore.Bucket
- func ContentUser(r *http.Request) *kilonova.UserFull
- func ContentUserContext(ctx context.Context) *kilonova.UserFull
- func Contest(r *http.Request) *kilonova.Contest
- func ContestContext(ctx context.Context) *kilonova.Contest
- func Language(r *http.Request) string
- func Paste(r *http.Request) *kilonova.SubmissionPaste
- func Problem(r *http.Request) *kilonova.Problem
- func ProblemContext(ctx context.Context) *kilonova.Problem
- func ProblemList(r *http.Request) *kilonova.ProblemList
- func ProblemListContext(ctx context.Context) *kilonova.ProblemList
- func SubTask(r *http.Request) *kilonova.SubTask
- func Submission(r *http.Request) *kilonova.FullSubmission
- func SubmissionContext(ctx context.Context) *kilonova.FullSubmission
- func Tag(r *http.Request) *kilonova.Tag
- func Test(r *http.Request) *kilonova.Test
- func TestContext(ctx context.Context) *kilonova.Test
- func Theme(r *http.Request) kilonova.PreferredTheme
- func UserBrief(r *http.Request) *kilonova.UserBrief
- func UserBriefContext(ctx context.Context) *kilonova.UserBrief
- func UserFull(r *http.Request) *kilonova.UserFull
- func UserFullContext(ctx context.Context) *kilonova.UserFull
- type KNContextType
Constants ¶
View Source
const ( // AuthedUserKey is the key to be used for adding (AUTHENTICATED) user objects to context AuthedUserKey = KNContextType("authed") // AuthedUserKey is the key to be used for adding CONTENT user objects to context ContentUserKey = 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") // BucketKey is the key to be used for adding the requested bucket to context BucketKey = KNContextType("bucket") // 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 AttachmentContext ¶
func AttachmentContext(ctx context.Context) *kilonova.Attachment
func ContentUserContext ¶ added in v0.25.0
func ProblemList ¶
func ProblemList(r *http.Request) *kilonova.ProblemList
func ProblemListContext ¶
func ProblemListContext(ctx context.Context) *kilonova.ProblemList
func Submission ¶
func Submission(r *http.Request) *kilonova.FullSubmission
func SubmissionContext ¶
func SubmissionContext(ctx context.Context) *kilonova.FullSubmission
Types ¶
type KNContextType ¶
type KNContextType string
KNContextType is the string type for all context values
Click to show internal directories.
Click to hide internal directories.