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
Click to show internal directories.
Click to hide internal directories.