accounts

package
v0.0.0-...-65f7e0b Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AccountsService = IAccountsService{}

AccountsService Singleton instance of AccountsService

View Source
var URLPatterns = []core.URLHandler{
	core.URLHandler{
		URL:     "/me",
		Handler: getUser,
		Methods: []string{"GET"},
		Middlewares: []core.Middleware{
			middlewares.AuthenticationMiddleware(),
		},
	},
	core.URLHandler{
		URL:     "/register",
		Handler: registerUser,
		Methods: []string{"POST"},
	},
	core.URLHandler{
		URL:     "/login",
		Handler: login,
		Methods: []string{"POST"},
	},
}

URLPatterns Array of url handlers containing patterns and their corresponding handlers

Functions

This section is empty.

Types

type IAccountsService

type IAccountsService struct {
}

IAccountsService Service exposing accounts related operations

type LoginSerializer

type LoginSerializer struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

LoginSerializer Serializer for login form

type UserDetailsSerializer

type UserDetailsSerializer struct {
	Username string `json:"username"`
	Name     string `json:"name"`
}

UserDetailsSerializer Serializer for user details

type UserLoginSerializer

type UserLoginSerializer struct {
	Username string `json:"username"`
	Name     string `json:"name"`
	Token    string `json:"token"`
}

UserLoginSerializer Serializer for user details on login

Jump to

Keyboard shortcuts

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