infrastructure

package
v0.0.1-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2020 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IRouter

type IRouter interface {
	InitializeRouter(router *chi.Mux) *chi.Mux
	SetRoutes(router *chi.Mux)
}

IRouter HTTP Router interface

type Router

type Router struct {
	DB    *sql.DB
	Redis *redis.Client
}

Router HTTP Router implementation

func NewHTTPRouter

func NewHTTPRouter(db *sql.DB, redis *redis.Client) *Router

NewHTTPRouter Returns an HTTP Router instance

func (*Router) InitializeRouter

func (r *Router) InitializeRouter(router *chi.Mux) *chi.Mux

InitializeRouter Starts the given router with required configs

func (*Router) SetRoutes

func (r *Router) SetRoutes(router *chi.Mux)

SetRoutes Mounts resources into the given router

Jump to

Keyboard shortcuts

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