api

package
v0.0.0-...-7b47575 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package api provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.0.0-00010101000000-000000000000 DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterHandlers

func RegisterHandlers(router fiber.Router, si ServerInterface)

RegisterHandlers creates http.Handler with routing matching OpenAPI spec.

func RegisterHandlersWithOptions

func RegisterHandlersWithOptions(router fiber.Router, si ServerInterface, options FiberServerOptions)

RegisterHandlersWithOptions creates http.Handler with additional options

Types

type FiberServerOptions

type FiberServerOptions struct {
	BaseURL     string
	Middlewares []MiddlewareFunc
}

FiberServerOptions provides options for the Fiber server.

type MiddlewareFunc

type MiddlewareFunc fiber.Handler

type Pong

type Pong struct {
	Ping string `json:"ping"`
}

Pong defines model for Pong.

type Server

type Server struct{}

func NewServer

func NewServer() Server

func (Server) GetPing

func (Server) GetPing(ctx *fiber.Ctx) error

(GET /ping)

type ServerInterface

type ServerInterface interface {

	// (GET /ping)
	GetPing(c *fiber.Ctx) error
}

ServerInterface represents all server handlers.

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler ServerInterface
}

ServerInterfaceWrapper converts contexts to parameters.

func (*ServerInterfaceWrapper) GetPing

func (siw *ServerInterfaceWrapper) GetPing(c *fiber.Ctx) error

GetPing operation middleware

Jump to

Keyboard shortcuts

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