Documentation
¶
Overview ¶
Package classification of Account API
Documentation for Account API
Schemes: http BasePath: / Version: 1.0.0 Consumes: - application/json Produces: - application/json
swagger:meta
Index ¶
- type Accounts
- func (a *Accounts) ListSingle(rw http.ResponseWriter, r *http.Request)
- func (a *Accounts) Login(rw http.ResponseWriter, r *http.Request)
- func (a *Accounts) MiddlewareValidateAccount(next http.Handler) http.Handler
- func (a *Accounts) MiddlewareValidateToken(next http.Handler) http.Handler
- func (a *Accounts) Refresh(rw http.ResponseWriter, r *http.Request)
- func (a *Accounts) Register(rw http.ResponseWriter, r *http.Request)
- type KeyAccount
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Accounts ¶
type Accounts struct {
// contains filtered or unexported fields
}
Accounts handler for getting, creating and updating accounts
func NewAccounts ¶
NewAccounts returns a new accounts handler with the given logger
func (*Accounts) ListSingle ¶
func (a *Accounts) ListSingle(rw http.ResponseWriter, r *http.Request)
ListSingle handles get requests and returns single account by id
func (*Accounts) Login ¶
func (a *Accounts) Login(rw http.ResponseWriter, r *http.Request)
Login lets the user login with a valid json structure defined in the credentials struct
func (*Accounts) MiddlewareValidateAccount ¶
MiddlewareValidateAccount checks wether the input is a valid json formatted account. When it is it will pass the next http handler
func (*Accounts) MiddlewareValidateToken ¶
MiddlewareValidateToken validates if the jwt in the cookie is valid
Click to show internal directories.
Click to hide internal directories.