router

package
v0.0.0-...-683a4be Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2020 License: GPL-3.0 Imports: 3 Imported by: 1

Documentation

Overview

Package router is the package where we define web routes on elasthink

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RouterWrap

type RouterWrap struct {
	Router *mux.Router
}

RouterWrap is a custom wrapper type for router, you can add more configuration fields here

func InitializeRoute

func InitializeRoute() *RouterWrap

InitializeRoute is a function which returns new RouterWrap which has a mux's router inside

func (*RouterWrap) RegisterAppHandler

func (rw *RouterWrap) RegisterAppHandler()

RegisterAppHandler register app handlers (external endpoints)

func (*RouterWrap) RegisterHandler

func (rw *RouterWrap) RegisterHandler()

RegisterHandler is a RouterWrap 'method' to register your API endpoints. Usually handler calls services module

func (*RouterWrap) RegisterInternalHandler

func (rw *RouterWrap) RegisterInternalHandler()

RegisterInternalHandler registers internal handlers (internal endpoints)

Jump to

Keyboard shortcuts

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