webservice

package
v0.0.0-...-4d08361 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const SwaggerUIHTML = `` /* 890-byte string literal not displayed */

Variables

This section is empty.

Functions

This section is empty.

Types

type ProblemDetails

type ProblemDetails struct {
	// Type is a URI reference that identifies the problem type.
	Type string `json:"type,omitempty"`
	// Title is a short, human-readable summary of the problem type.
	Title string `json:"title,omitempty"`
	// Status is the HTTP status code generated by the origin server for this occurrence of the problem.
	Status int `json:"status,omitempty"`
	// Detail is a human-readable explanation specific to this occurrence of the problem.
	Detail string `json:"detail,omitempty"`
	// Instance is a URI reference that identifies the specific occurrence of the problem.
	Instance string `json:"instance,omitempty"`
}

ProblemDetails represents the problem details as per RFC 7807

func (*ProblemDetails) Error

func (pd *ProblemDetails) Error() string

type WebService

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

func NewWebService

func NewWebService(
	cfg config.YHSConfig,
	repository repository.Repository,
	eventRepository repository.EventRepository,
	healthService health.Interface,
) *WebService

func (*WebService) LivenessHealthcheck

func (ws *WebService) LivenessHealthcheck(req *restful.Request, resp *restful.Response)

func (*WebService) ReadinessHealthcheck

func (ws *WebService) ReadinessHealthcheck(req *restful.Request, resp *restful.Response)

func (*WebService) Shutdown

func (ws *WebService) Shutdown(ctx context.Context) error

func (*WebService) Start

func (ws *WebService) Start(ctx context.Context) error

Start performs a blocking call to start the REST API server.

Jump to

Keyboard shortcuts

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