server

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AuthMiddleware = middleware.Auth

Functions

This section is empty.

Types

type Options

type Options struct {
	// Deprecated: use NoPlanIdMiddleWare instead
	NoTrustFundMiddleware     bool
	NoPlanIdMiddleware        bool
	NoIntegrationIdMiddleware bool
	HealthChecks              health.Config
	PubsubName                string
}

func (Options) UsePlanIdMiddleware

func (o Options) UsePlanIdMiddleware() bool

type Server

type Server struct {
	Engine *gin.Engine
	// contains filtered or unexported fields
}

func CreateServer

func CreateServer(options Options) Server

func (*Server) AddMiddleware

func (s *Server) AddMiddleware(middleware gin.HandlerFunc)

func (*Server) AddRoute

func (s *Server) AddRoute(route api.ApiRoute)

func (*Server) AddRoutes

func (s *Server) AddRoutes(routes []api.ApiRoute)

func (*Server) AddSubscription

func (s *Server) AddSubscription(route api.EventRoute)

func (*Server) AddSubscriptions

func (s *Server) AddSubscriptions(routes []api.EventRoute)

func (*Server) Init

func (s *Server) Init(options Options)

func (*Server) Start

func (s *Server) Start(port int)

Jump to

Keyboard shortcuts

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