answers

package
v1.13.2 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package answers provides API services for task answers managing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	*service.Base
}

Service is the mount point for services related to `answers`.

func (*Service) SetRoutes

func (srv *Service) SetRoutes(router chi.Router)

SetRoutes defines the routes for this package in a route answers.

type SubmitRequest

type SubmitRequest struct {
	TaskToken *token.Task `json:"task_token"`
	Answer    *string     `json:"answer"`

	PublicKey *rsa.PublicKey
}

SubmitRequest represents a JSON request body format needed by answers.submit() swagger:ignore

func (*SubmitRequest) Bind

func (requestData *SubmitRequest) Bind(r *http.Request) error

Bind checks that all the needed request parameters (task_token & answer) are present and all the needed values are valid.

func (*SubmitRequest) UnmarshalJSON

func (requestData *SubmitRequest) UnmarshalJSON(raw []byte) error

UnmarshalJSON loads SubmitRequest from JSON passing a public key into TaskToken.

Jump to

Keyboard shortcuts

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