emailAuthRestAPI

package module
v0.0.0-...-c2393ec Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

README

email-auth-rest-api

Provides Rest API for server side

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitRouter

func InitRouter(router *mux.Router, service Service)

InitRouter is an entry point

Types

type Response

type Response struct {
	Status  int
	Headers map[string]string
	Body    map[string]interface{}
}

Response describes HTTP response

func (*Response) Write

func (r *Response) Write(w http.ResponseWriter)

type Service

type Service interface {
	Request(email string, params map[string]interface{}) Response
	Token(req, code string) Response
	Refresh(token string) Response
}

Service is an interface for REST API

Jump to

Keyboard shortcuts

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