controllers

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	Mux *http.ServeMux
	// contains filtered or unexported fields
}

Server is a struct that contains the variables necessary to handle the necessary routes of the rest API

func (*Server) HandleInit

func (server *Server) HandleInit() rest.Handler

HandleInit handles initialization on the server

func (*Server) Init

func (s *Server) Init()

Init - configures the server

func (*Server) Refresh

func (server *Server) Refresh() rest.Handler

Refresh returns the refreshing endpoint. This entpoint receives a refresh token and a refresh url, it returns a refreshed token.

func (*Server) Run

func (s *Server) Run(addr string)

Run starts the server on the port given in addr

func (*Server) Tokenize

func (server *Server) Tokenize() rest.Handler

Tokenize receives a token's payload and encodes it in a jwt

Jump to

Keyboard shortcuts

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