httpServer

package
v0.0.0-...-88eafc7 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRouter

func NewRouter(ctx context.Context, routers ...Router) *mux.Router

NewRouter creates a new router for any number of api routers

func StartAPI

func StartAPI(ctx context.Context)

Types

type DefaultApiController

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

A DefaultApiController binds http requests to an api service and writes the service results to the http response

func (*DefaultApiController) Routes

Routes returns all of the api route for the DefaultApiController

type DefaultApiService

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

DefaultApiService is a service that implents the logic for the DefaultApiServicer This service should implement the business logic for every endpoint for the DefaultApi API. Include any external packages or services that will be required by this service.

func NewDefaultApiService

func NewDefaultApiService(ctx context.Context) *DefaultApiService

NewDefaultApiService creates a default api service

type Router

type Router interface {
	Routes(ctx context.Context) utils.Routes
}

Router defines the required methods for retrieving api routes

func NewDefaultApiController

func NewDefaultApiController(d *DefaultApiService) Router

NewDefaultApiController creates a default api controller

Jump to

Keyboard shortcuts

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