api

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package api contains the endpoints to manage finding tickets.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	Options Options
	// contains filtered or unexported fields
}

API represents an API services and all the stuff needed to work.

func New

func New(ticketServer tracking.TicketServer, ticketTrackerBuilder tracking.TicketTrackerBuilder,
	storage storage.Storage, options Options) *API

New instantiates a new API.

func (*API) CreateTicket

func (api *API) CreateTicket(c echo.Context) error

CreateTicket creates a ticket and returns a JSON containing the new ticket.

func (*API) GetFindingTicket

func (api *API) GetFindingTicket(c echo.Context) error

GetFindingTicket checks if a ticket was created and retrieves it if it is found.

func (*API) GetTicket

func (api *API) GetTicket(c echo.Context) error

GetTicket returns a JSON containing a specific ticket.

func (*API) Healthcheck

func (api *API) Healthcheck(c echo.Context) error

Healthcheck performs a simple query and returns an OK response.

type Options

type Options struct {
	MaxSize     int
	DefaultSize int
}

Options represents size options for the API requests.

Jump to

Keyboard shortcuts

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