server

package
v0.0.0-...-f894a38 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthMiddleware

func AuthMiddleware(next http.Handler) http.Handler

func InitMiddlewares

func InitMiddlewares(mux *chi.Mux) *chi.Mux

func PrometheusMetrics

func PrometheusMetrics(next http.Handler) http.Handler

func ResponseWithError

func ResponseWithError(w http.ResponseWriter, e error)

func ResponseWithList

func ResponseWithList(w http.ResponseWriter, payload interface{})

func ResponseWithOk

func ResponseWithOk(w http.ResponseWriter, payload interface{})

Types

type ListResponse

type ListResponse struct {
	Object string      `json:"object"`
	Data   interface{} `json:"data"`
}

type Server

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

func NewServer

func NewServer(ca entities.ConsulAgent) *Server

func (*Server) MountRoutes

func (s *Server) MountRoutes(pattern string, router *chi.Mux)

func (*Server) Serve

func (s *Server) Serve(port string) error

func (*Server) Shutdown

func (s *Server) Shutdown()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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