goauthserver

package
v0.0.0-...-c36fa23 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Error

func Error(w http.ResponseWriter, code int, message string)

Error will be used to out put error

func JSON

func JSON(w http.ResponseWriter, code int, payload interface{})

JSON will parse payload and send the response back to client

func NewUserRouter

func NewUserRouter(u goauthpkg.UserCollection, router *mux.Router, rc goauthpkg.UserSession) *mux.Router

NewUserRouter used to create new user router

Types

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server represents a server object with router

func NewServer

NewServer create a new server with user collection service

func (*Server) Start

func (s *Server) Start()

Start activate new server and listen to port 4040

Jump to

Keyboard shortcuts

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