Documentation ¶
Index ¶
- Variables
- func Certificate(ctx context.Context, w http.ResponseWriter, r *http.Request) (int, error)
- func ChallengeByKey(ctx context.Context, w http.ResponseWriter, r *http.Request) (status int, err error)
- func CollectTokens(ctx context.Context, w http.ResponseWriter, r *http.Request) (int, error)
- func CreateChallenge(ctx context.Context, w http.ResponseWriter, r *http.Request) (status int, err error)
- func CreateResult(ctx context.Context, w http.ResponseWriter, r *http.Request) (int, error)
- func DeleteProfile(ctx context.Context, w http.ResponseWriter, r *http.Request) (int, error)
- func FinalSubmission(ctx context.Context, w http.ResponseWriter, r *http.Request) (status int, err error)
- func GetChallengesForCompany(ctx context.Context, w http.ResponseWriter, r *http.Request) (status int, err error)
- func GetChallengesForProfile(ctx context.Context, w http.ResponseWriter, r *http.Request) (status int, err error)
- func GetCompanyByUser(ctx context.Context, w http.ResponseWriter, r *http.Request) (int, error)
- func GetProfileByKey(ctx context.Context, w http.ResponseWriter, r *http.Request) (int, error)
- func GetProfileForUser(ctx context.Context, w http.ResponseWriter, r *http.Request) (status int, err error)
- func GetResult(ctx context.Context, w http.ResponseWriter, r *http.Request) (int, error)
- func GetResultForUserChallenge(ctx context.Context, w http.ResponseWriter, r *http.Request) (int, error)
- func GetResultsByChallenge(ctx context.Context, w http.ResponseWriter, r *http.Request) (int, error)
- func GetSubmissionByKey(ctx context.Context, w http.ResponseWriter, r *http.Request) (status int, err error)
- func GetSubmissionsForResult(ctx context.Context, w http.ResponseWriter, r *http.Request) (status int, err error)
- func GetTestResultsForSubmission(ctx context.Context, w http.ResponseWriter, r *http.Request) (status int, err error)
- func GetUser(ctx context.Context, w http.ResponseWriter, r *http.Request) (status int, err error)
- func GetUsersByCompany(ctx context.Context, w http.ResponseWriter, r *http.Request) (int, error)
- func Handler() http.Handler
- func Invitation(ctx context.Context, w http.ResponseWriter, r *http.Request) (status int, err error)
- func Mock(w http.ResponseWriter, req *http.Request)
- func MockFrequentisChallenge(ctx context.Context, company *datastore.Key, w http.ResponseWriter, ...)
- func PostCompany(ctx context.Context, w http.ResponseWriter, r *http.Request) (status int, err error)
- func PostSubmission(ctx context.Context, w http.ResponseWriter, r *http.Request) (status int, err error)
- func ReceiveMail(ctx context.Context, w http.ResponseWriter, r *http.Request) (int, error)
- func Status(w http.ResponseWriter, r *http.Request)
- func Subscriptions(w http.ResponseWriter, r *http.Request)
- func TaskByKey(ctx context.Context, w http.ResponseWriter, r *http.Request) (status int, err error)
- func Tasks(ctx context.Context, w http.ResponseWriter, r *http.Request) (status int, err error)
- func Templates(ctx context.Context, w http.ResponseWriter, r *http.Request) (int, error)
- func TestsByTaskKey(ctx context.Context, w http.ResponseWriter, r *http.Request) (status int, err error)
- func Tokens(ctx context.Context, w http.ResponseWriter, r *http.Request) (status int, err error)
- func User(ctx context.Context, w http.ResponseWriter, r *http.Request) (status int, err error)
- func WhoAmI(ctx context.Context, w http.ResponseWriter, r *http.Request) (int, error)
- type ContextHandlerFunc
- type Subscription
Constants ¶
This section is empty.
Variables ¶
var InvitationTemplatePath string
var SubTemplatePath string
Functions ¶
func Certificate ¶
Certificate will return all public certificates assigned by App Engine in PEM format.
func ChallengeByKey ¶
func ChallengeByKey(ctx context.Context, w http.ResponseWriter, r *http.Request) (status int, err error)
ChallengeByKey loads a challenge by key.
func CollectTokens ¶
CollectTokens runs a query against Datastore to find expired Tokens and deletes them.
func CreateChallenge ¶
func CreateChallenge(ctx context.Context, w http.ResponseWriter, r *http.Request) (status int, err error)
CreateChallenge will put a new entity of kind Challenge to Datastore.
func CreateResult ¶
CreateResult saves a new result when a coder starts a challenge.
func DeleteProfile ¶
func FinalSubmission ¶
func FinalSubmission(ctx context.Context, w http.ResponseWriter, r *http.Request) (status int, err error)
FinalSubmission makes the last submission final.
func GetChallengesForCompany ¶
func GetChallengesForCompany(ctx context.Context, w http.ResponseWriter, r *http.Request) (status int, err error)
GetChallengesForCompany queries all the challenges defined by a company.
func GetChallengesForProfile ¶
func GetCompanyByUser ¶
func GetProfileByKey ¶
func GetProfileForUser ¶
func GetResultsByChallenge ¶
func GetResultsByChallenge(ctx context.Context, w http.ResponseWriter, r *http.Request) (int, error)
GetResultsByChallenge queries the results for a certain challenge to be reviewed by a company.
func GetSubmissionByKey ¶
func GetSubmissionsForResult ¶
func GetUsersByCompany ¶
GetUsersByCompany queries the user accounts belonging to a company.
func Invitation ¶
func Invitation(ctx context.Context, w http.ResponseWriter, r *http.Request) (status int, err error)
Invitation handles the creation of a new invitation and sends an e-mail to the user.
func MockFrequentisChallenge ¶
func PostCompany ¶
func PostCompany(ctx context.Context, w http.ResponseWriter, r *http.Request) (status int, err error)
PostCompany creates a new company after validating by key.
func PostSubmission ¶
func PostSubmission(ctx context.Context, w http.ResponseWriter, r *http.Request) (status int, err error)
PostSubmission creates a new submission.
func ReceiveMail ¶
ReceiveMail will receive an e-mail and echo it back to the sender.
func Status ¶
func Status(w http.ResponseWriter, r *http.Request)
Status gathers a quick overview of the system state and dumps it in JSON format.
func Subscriptions ¶
func Subscriptions(w http.ResponseWriter, r *http.Request)
func TestsByTaskKey ¶
Types ¶
type ContextHandlerFunc ¶
ContextHandlerFunc is similar to a http.HandlerFunc, but also gets passed the current context. To ease error handling, a ContextHandleFunc must return a HTTP status code and an error. Still, the handler is allowed to write a response.
func (ContextHandlerFunc) ServeHTTP ¶
func (h ContextHandlerFunc) ServeHTTP(w http.ResponseWriter, r *http.Request)
type Subscription ¶
type Subscription struct { Address mail.Address EntryTime time.Time Token []byte VerificationTime time.Time }
func (Subscription) RequestConfirmation ¶
func (sub Subscription) RequestConfirmation(ctx context.Context) error