handlers

package
v0.0.0-...-64a628e Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionHandler

type ActionHandler struct {
	HandlerBase
	CreateAction createAction
}

ActionHandler is the handler for CRUD operations on a system intake action

func NewActionHandler

func NewActionHandler(
	base HandlerBase,
	create createAction,
) ActionHandler

NewActionHandler is a constructor for ActionHandler

func (ActionHandler) Handle

func (h ActionHandler) Handle() http.HandlerFunc

Handle handles a request for the system intake action

type BusinessCaseHandler

type BusinessCaseHandler struct {
	HandlerBase
	FetchBusinessCaseByID fetchBusinessCaseByID
	CreateBusinessCase    createBusinessCase
	UpdateBusinessCase    updateBusinessCase
}

BusinessCaseHandler is the handler for CRUD operations on business case

func NewBusinessCaseHandler

func NewBusinessCaseHandler(
	base HandlerBase,
	fetch fetchBusinessCaseByID,
	create createBusinessCase,
	update updateBusinessCase,
) BusinessCaseHandler

NewBusinessCaseHandler is a constructor for BusinessCaseHandler

func (BusinessCaseHandler) Handle

Handle handles a request for the business case form

type CatchAllHandler

type CatchAllHandler struct {
	HandlerBase
}

CatchAllHandler returns 404

func NewCatchAllHandler

func NewCatchAllHandler(base HandlerBase) CatchAllHandler

NewCatchAllHandler is a constructor for CatchAllHanlder

func (CatchAllHandler) Handle

func (h CatchAllHandler) Handle() http.HandlerFunc

Handle returns 404 on unexpected routes

type HandlerBase

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

HandlerBase is for shared handler utilities

func NewHandlerBase

func NewHandlerBase() HandlerBase

NewHandlerBase is a constructor for HandlerBase

func (HandlerBase) WriteErrorResponse

func (b HandlerBase) WriteErrorResponse(ctx context.Context, w http.ResponseWriter, appErr error)

WriteErrorResponse writes a response for a given application error

type HealthCheckHandler

type HealthCheckHandler struct {
	HandlerBase
	Config *viper.Viper
}

HealthCheckHandler returns the API status

func NewHealthCheckHandler

func NewHealthCheckHandler(base HandlerBase, config *viper.Viper) HealthCheckHandler

NewHealthCheckHandler is a constructor for HealthCheckHandler

func (HealthCheckHandler) Handle

func (h HealthCheckHandler) Handle() http.HandlerFunc

Handle handles a web request and returns a healthcheck JSON payload

Jump to

Keyboard shortcuts

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