router

package
v0.0.0-...-8ae4d99 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: MIT Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MAGIC_VALUE = [4]byte{0x16, 0x26, 0xba, 0x7e}
)

Functions

func HealthMiddleware

func HealthMiddleware(next http.Handler) http.Handler

HealthMiddleware is a middleware that responds to health checks

func OptionsMiddleware

func OptionsMiddleware(h http.Handler) http.Handler

OptionsMiddleware ensures that we return the correct headers for CORS requests

func RequestSizeLimitMiddleware

func RequestSizeLimitMiddleware(limit int64) func(http.Handler) http.Handler

Types

type BodyEncoding

type BodyEncoding string
const (
	BodyEncodingBase64 BodyEncoding = "base64"
)

type Router

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

func NewServer

func NewServer(chainId *big.Int, evm indexer.EVMRequester, db *db.DB, useropq *queue.Service, b *bucket.Bucket, firebase *firebase.PushService) *Router

func (*Router) CreateHandler

func (r *Router) CreateHandler() (http.Handler, error)

func (*Router) Start

func (r *Router) Start(port int, handler http.Handler) error

func (*Router) StartTLS

func (r *Router) StartTLS(certpath string, handler http.Handler) error

Jump to

Keyboard shortcuts

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