Documentation
¶
Index ¶
- func ExtractToken(bearToken string) string
- func GetConnection() *sql.DB
- func ReturnMessage(message string) []byte
- func SessionCreate(access Access, writer http.ResponseWriter)
- func SessionRefresh(bearToken string, writer http.ResponseWriter)
- func SetContextData(r *http.Request, d *Access) (ro *http.Request)
- type Access
- type Auth
- type Message
- type MyError
- type Session
- type TokenAuth
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractToken ¶
func GetConnection ¶
func SessionRefresh ¶
func SessionRefresh(bearToken string, writer http.ResponseWriter)
SessionRefresh .
Types ¶
type Access ¶
type Access struct {
ID int64 `json:"id"`
Login string `json:"login"`
Password string `json:"password"`
Email string `json:"email"`
}
Access .
func GetContextData ¶ added in v1.0.5
type Auth ¶
type Auth struct {
Token string `json:"token"`
Refresh string `json:"refresh"`
Type string `json:"type"`
}
Auth .
type MyError ¶
type MyError struct {
Code pq.ErrorCode `json:"code"`
Error string `json:"error"`
Message string `json:"message"`
InternalQuery error `json:"internalQuery"`
}
MyError .
Click to show internal directories.
Click to hide internal directories.