umapi

package module
v0.0.0-...-9360ad4 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitRouter

func InitRouter(router *mux.Router, s Service,
	getSessionOperation func(next http.HandlerFunc) http.HandlerFunc,
	getSession func(r *http.Request) Session)

InitRouter is an entry point

Types

type Service

type Service interface {
	// CreateAccount is called in POST /accounts
	CreateAccount(identifier, password string, params map[string]interface{}) entity.Response

	// ChangePassword is called in PUT /password
	ChangePassword(session Session, oldPassword, newPassword string) entity.Response

	// ResetPasswordRequest is called in POST /password/reset
	ResetPasswordRequest(identifier string) entity.Response

	// ResetPasswordRequest is called in GET /password/reset/{token}
	GetResetPasswordRequest(token string) entity.Response

	// ResetPasswordRequest is called in POST /password/reset/{token}
	ResetPassword(token, newPassword string) entity.Response
}

Service is service

type Session

type Session interface {
	// AccountID
	AccountID() string
}

Session has Account ID

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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