api

package
v0.0.0-...-26e86c7 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultModule

type DefaultModule interface {
	Default() bool
}

DefaultModule is extension to Module that specify whether is default loaded TODO: consider more proper interface that can be customized its behaviour inside the framework

type Endpoint

type Endpoint struct {
	Middlewares []Middleware
	Path        string
	Method      string
	Handler     http.Handler
}

type Middleware

type Middleware interface {
	Handle(h http.Handler) http.Handler
}

type MiddlewareFunc

type MiddlewareFunc func(h http.Handler) http.Handler

func (MiddlewareFunc) Handle

func (m MiddlewareFunc) Handle(h http.Handler) http.Handler

type Module

type Module interface {
	Init(ctx context.Context, config config.Config) error
	Close(ctx context.Context) error
}

type SkipDefaultMiddlewaresExt

type SkipDefaultMiddlewaresExt interface {
	SkipDefaultMiddlewares() bool
}

type SkipMiddlewaresExt

type SkipMiddlewaresExt interface {
	SkipMiddlewares() bool
}

type WebService

type WebService interface {
	CreateEndpoints(middlewares ...Middleware) []Endpoint
}

Jump to

Keyboard shortcuts

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