api

package
v0.0.0-...-5c7a00c Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetRoutes

func SetRoutes(db *sql.DB, h *ws.Hub) *chi.Mux

SetRoutes will instantiate the REST routes

Types

type API

type API struct {
	APIConfig  *config.APIConfig
	DB         *sql.DB
	HTTPServer *http.Server
	Hub        *ws.Hub
}

API holds the relevant information of the backend API

func SetupAPI

func SetupAPI(db *sql.DB, APIConfig *config.APIConfig) *API

SetupAPI will instantiate an API and return it

func (*API) Start

func (a *API) Start()

Start will start the backend API

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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