controllers

package
v0.0.0-...-64c63ee Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2021 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseHandler

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

func NewBaseHandler

func NewBaseHandler(userRepo models.UserRepository, contactRepo models.ContactRepository) *BaseHandler

Return a new BaseHandler

func (*BaseHandler) CheckUsername

func (h *BaseHandler) CheckUsername(w http.ResponseWriter, r *http.Request)

Check if a username is available This endpoint is a query

func (*BaseHandler) CreateNewSession

func (h *BaseHandler) CreateNewSession(w http.ResponseWriter, r *http.Request)

Issue a new session token for a user by verifying their signed login token

func (*BaseHandler) CreateRouter

func (h *BaseHandler) CreateRouter() chi.Router

func (*BaseHandler) DeleteContact

func (h *BaseHandler) DeleteContact(w http.ResponseWriter, r *http.Request)

Delete specific contact for a user

func (*BaseHandler) FetchContacts

func (h *BaseHandler) FetchContacts(w http.ResponseWriter, r *http.Request)

Fetch all account contacts

func (*BaseHandler) FetchEncryptedAccount

func (h *BaseHandler) FetchEncryptedAccount(w http.ResponseWriter, r *http.Request)

Fetch an encrypted account for a username

func (*BaseHandler) GetLoginToken

func (h *BaseHandler) GetLoginToken(w http.ResponseWriter, r *http.Request)

Generate and return an ephemeral login token

func (*BaseHandler) GetRegistrationToken

func (h *BaseHandler) GetRegistrationToken(w http.ResponseWriter, r *http.Request)

Generate and return an ephemeral registration token

func (*BaseHandler) NewContact

func (h *BaseHandler) NewContact(w http.ResponseWriter, r *http.Request)

Add new individual contact

func (*BaseHandler) Register

func (h *BaseHandler) Register(w http.ResponseWriter, r *http.Request)

Handle a register request

func (*BaseHandler) UserCount

func (h *BaseHandler) UserCount(w http.ResponseWriter, r *http.Request)

Endpoint to return the amount of registered users for the platform

Jump to

Keyboard shortcuts

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