restgenerator

package
v0.2.13 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Rest

type Rest struct {
	Schema gw_model.Config
	// contains filtered or unexported fields
}

Rest handles OpenAPI schema generation and sample data serving.

func New

func New(
	schema gw_model.Config,
	prefix string,
) (*Rest, error)

New initializes a new Rest instance.

func (*Rest) DiscoverDataHandler added in v0.1.0

func (r *Rest) DiscoverDataHandler() gin.HandlerFunc

DiscoverDataHandler discovers data structure for connected gateway

func (*Rest) Handler

func (r *Rest) Handler(endpoint gw_model.Endpoint) gin.HandlerFunc

func (*Rest) ListTablesHandler added in v0.1.0

func (r *Rest) ListTablesHandler() gin.HandlerFunc

ListTablesHandler returns a list of available tables

func (*Rest) PrepareQueryHandler added in v0.1.0

func (r *Rest) PrepareQueryHandler() gin.HandlerFunc

PrepareQueryHandler verifies query and prepares output structure

func (*Rest) QueryHandler added in v0.1.0

func (r *Rest) QueryHandler() gin.HandlerFunc

QueryHandler executes a query against the database

func (*Rest) RegisterRoutes

func (r *Rest) RegisterRoutes(mux *http.ServeMux, disableSwagger bool, rawMode bool, addresses ...string) error

RegisterRoutes registers Rest endpoints.

Jump to

Keyboard shortcuts

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