Documentation ¶
Index ¶
- Variables
- func CheckRegexp(reg, str string) bool
- func GenerateJWTToken(UserID string) (string, error)
- func MakeErrorResponseBody(statusCode int, detail string) []byte
- type Argon2Params
- type CreatePostParams
- type ErrorPayload
- type Handler
- func (h *Handler) CheckUniqueEmail(EMail string) (bool, error)
- func (h *Handler) CheckUniqueUserID(UserID string) (bool, error)
- func (h *Handler) CreatePosts(w http.ResponseWriter, r *http.Request)
- func (h *Handler) InsertPost(Claims jwt.MapClaims, requestData *CreatePostParams) error
- func (h *Handler) InsertUserData(User *RegisterParams) error
- func (h *Handler) Login(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Register(w http.ResponseWriter, r *http.Request)
- func (h *Handler) RoadPasswordAndUserID(RequestUserID string) (string, string, error)
- func (h *Handler) UpdateAt(RequestUserID string) error
- type LoginParams
- type LoginResponseBody
- type RegisterParams
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvaildHash = errors.New("the encoded hash is not in the correct format.") ErrIncompatibleVersion = errors.New("incompatible version of argon2") )
Functions ¶
func CheckRegexp ¶
func GenerateJWTToken ¶
func MakeErrorResponseBody ¶
Types ¶
type Argon2Params ¶
type Argon2Params struct {
// contains filtered or unexported fields
}
type CreatePostParams ¶
type CreatePostParams struct {
Body string `json:"body" validate:"required"`
}
type ErrorPayload ¶
type Handler ¶
func (*Handler) CheckUniqueUserID ¶
func (*Handler) CreatePosts ¶
func (h *Handler) CreatePosts(w http.ResponseWriter, r *http.Request)
func (*Handler) InsertPost ¶
func (h *Handler) InsertPost(Claims jwt.MapClaims, requestData *CreatePostParams) error
func (*Handler) InsertUserData ¶
func (h *Handler) InsertUserData(User *RegisterParams) error
func (*Handler) RoadPasswordAndUserID ¶
type LoginParams ¶
type LoginResponseBody ¶
type LoginResponseBody struct {
Token string
}
Click to show internal directories.
Click to hide internal directories.