api

package
v0.0.0-...-76b4bc4 Latest Latest
Warning

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

Go to latest
Published: May 9, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Constellations = map[string]*regexp.Regexp{
		"oneweb":   regexp.MustCompile("ONEWEB-[0-9]+"),
		"starlink": regexp.MustCompile("STARLINK-[0-9]+"),
	}
)

Functions

This section is empty.

Types

type Server

type Server struct {
	Port                   int
	DataRefreshRate        time.Duration
	CelestrakRefreshRate   time.Duration
	FileRefreshRateSeconds time.Duration
	// contains filtered or unexported fields
}

func NewServer

func NewServer(port int, source data.Source, refreshRate time.Duration) *Server

func (*Server) AddMiddlewares

func (s *Server) AddMiddlewares(middlewares ...func(handler http.Handler) http.Handler)

func (*Server) InitializeRoutes

func (s *Server) InitializeRoutes()

func (*Server) Run

func (s *Server) Run() error

func (*Server) SubRoutes

func (s *Server) SubRoutes(baseURL string, r chi.Router)

func (*Server) UpdateAllValues

func (s *Server) UpdateAllValues(sats []data.Satellite)

Jump to

Keyboard shortcuts

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