api

package
v0.0.0-...-de52b65 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleRequest

func HandleRequest[T any](c echo.Context, handler RequestHandler[T]) error

HandleRequest processes standard requests

func NewServer

func NewServer() *echo.Echo

NewServer initializes the Echo server and sets up middleware

func SetupEventRoutes

func SetupEventRoutes(e *echo.Echo, controller *EventController)

Types

type EventController

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

func NewEventController

func NewEventController(usecase domain.EventUsecase) *EventController

func (*EventController) CreateAWSEvent

func (c *EventController) CreateAWSEvent(ctx echo.Context) error

func (*EventController) CreateGCPEvent

func (c *EventController) CreateGCPEvent(ctx echo.Context) error

type RequestHandler

type RequestHandler[T any] func(T) (any, error)

RequestHandler is a function type for handling standard requests

type StandardResponse

type StandardResponse struct {
	Message string `json:"message"`
	Data    any    `json:"data,omitempty"`
}

StandardResponse defines a simplified standard response structure

Jump to

Keyboard shortcuts

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