request

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2021 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewContext

func NewContext(ctx context.Context, metrics base.Metrics) context.Context

NewContext wraps the supplied context and associates a git protocol-specific context value to it.

Types

type Context

type Context struct {
	Request      Request
	UpdatedFiles map[string]io.Reader
	Metrics      base.Metrics
}

Context stores a few variables that are request-specific.

func FromContext

func FromContext(ctx context.Context) *Context

FromContext unwraps a Context from the provided context.Context.

type Request added in v1.4.4

type Request struct {
	ProblemName string
	Username    string
	Create      bool
	IsSystem    bool
	IsAdmin     bool
	CanView     bool
	CanEdit     bool
	HasSolved   bool
	ReviewRef   string
}

Request stores the request-specific part of the Context, to make it easier to serialize.

Jump to

Keyboard shortcuts

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