questions

package
v0.0.0-...-95c9f63 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Router

func Router(h *Handler) http.Handler

Router - A completely separate router the questions data storage handle

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

Handler - Context for Handling of Questions routes

func NewHandler

NewHandler - Initialize Handler

func (*Handler) DeleteQuestionSet

func (h *Handler) DeleteQuestionSet(w http.ResponseWriter, r *http.Request)

DeleteQuestionSet - DELETE question set id from question sets

func (*Handler) DeleteResponse

func (h *Handler) DeleteResponse(w http.ResponseWriter, r *http.Request)

DeleteResponse - DELETE question id from questions

func (*Handler) GetQuestionSet

func (h *Handler) GetQuestionSet(w http.ResponseWriter, r *http.Request)

GetQuestionSet - GET list of all questions

func (*Handler) GetResponseID

func (h *Handler) GetResponseID(w http.ResponseWriter, r *http.Request)

GetResponseID - Fetch a question from givin ID in url

func (*Handler) GetResponses

func (h *Handler) GetResponses(w http.ResponseWriter, r *http.Request)

GetResponses - GET list of all questions/responses

func (*Handler) SaveQuestionSet

func (h *Handler) SaveQuestionSet(w http.ResponseWriter, r *http.Request)

SaveQuestionSet - Save Set of Questions to database

func (*Handler) SaveResponse

func (h *Handler) SaveResponse(w http.ResponseWriter, r *http.Request)

SaveResponse - write out question to database

func (*Handler) UpdateResponse

func (h *Handler) UpdateResponse(w http.ResponseWriter, r *http.Request)

UpdateResponse - PUT question updated with additional answers

Jump to

Keyboard shortcuts

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