internalhttp

package
v0.0.0-...-e6f2c53 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KeyLoggerID ctxKeyID = iota
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger interface {
	Fatalf(format string, a ...interface{})
	Errorf(format string, a ...interface{})
	Warningf(format string, a ...interface{})
	Infof(format string, a ...interface{})
	Debugf(format string, a ...interface{})
}

type MiddlewareLogger

type MiddlewareLogger struct{}

func NewMiddlewareLogger

func NewMiddlewareLogger() *MiddlewareLogger

type Server

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

func NewServer

func NewServer(log Logger, app server.Application, host, port string) *Server

func (*Server) GetEvents

func (s *Server) GetEvents(w http.ResponseWriter, r *http.Request)

@Summary Get events @Tags events @Description Get events by show ID @ID get-events @Accept json @Produce json @Param id path int true "show ID" @Success 200 {object} EventListResponse @Failure 400,404 {object} server.ErrorResponse @Failure 500 {object} server.ErrorResponse @Router /shows/{id}/events [get].

func (*Server) GetPlaces

func (s *Server) GetPlaces(w http.ResponseWriter, r *http.Request)

@Summary Get places @Tags places @Description Get places by event ID @ID get-places @Accept json @Produce json @Param id path int true "event ID" @Success 200 {object} PlaceListResponse @Failure 400,404 {object} server.ErrorResponse @Failure 500 {object} server.ErrorResponse @Router /events/{id}/places [get].

func (*Server) GetShows

func (s *Server) GetShows(w http.ResponseWriter, r *http.Request)

@Summary Get shows @Tags shows @Description Get shows from remote API and store them in the local service @ID get-shows @Accept json @Produce json @Success 200 {object} ShowListResponse @Failure 400,404 {object} server.ErrorResponse @Failure 500 {object} server.ErrorResponse @Router /shows [get].

func (*Server) Start

func (s *Server) Start(ctx context.Context) error

@title Ticket API @version 1 @description API Server for remote Tickets Application.

func (*Server) Stop

func (s *Server) Stop(ctx context.Context) error

Jump to

Keyboard shortcuts

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