openapi

package
v0.0.0-...-fc03dd6 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

Handler knows how to respond to requests for the OpenAPI metadata. Don't create instances of this type directly, use the NewHandler function instead.

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP is the implementation of the object HTTP handler interface.

type HandlerBuilder

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

HandlerBuilder contains the data and logic needed to create a new handler for the OpenAPI metadata. Don't create instances of this type directly, use the NewHandler function instead.

func NewHandler

func NewHandler() *HandlerBuilder

NewHandler creates a builder that can then be used to configure and create a handler for the OpenAPI metadata.

func (*HandlerBuilder) Build

func (b *HandlerBuilder) Build() (result *Handler, err error)

Build uses the data stored in the builder to create and configure a new handler.

func (*HandlerBuilder) SetLogger

func (b *HandlerBuilder) SetLogger(value *slog.Logger) *HandlerBuilder

SetLogger sets the logger that the handler will use to write to the log. This is mandatory.

Jump to

Keyboard shortcuts

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