rest

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

README

BindPlane Rest API

Swagger

The Rest API endpoints are documented with gin-swagger.


Generating Documentation:

First make sure you have swag cli installed with make install-tools or install directly with:

go get -u github.com/swaggo/swag/cmd/swag

Generate docs.

make swagger

Viewing Documentation:

Run bindplane server

bindplane serve

By default docs will be at localhost:3001/swagger/index.html

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddRestRoutes

func AddRestRoutes(router gin.IRouter, bindplane server.BindPlane)

AddRestRoutes adds all API routes to the gin HTTP router

Types

type ErrorResponse

type ErrorResponse struct {
	Errors []string `json:"errors"`
}

ErrorResponse TODO(doc)

func NewErrorResponse

func NewErrorResponse(err error) ErrorResponse

NewErrorResponse returns a new ErrorResponse from a given error.

Jump to

Keyboard shortcuts

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