Documentation ¶
Index ¶
- func CheckPasswordHash(password, hash string) bool
- func DecodeAuthUserRequest(ctx context.Context, r *http.Request) (interface{}, error)
- func DecodeGetAllRequest(ctx context.Context, r *http.Request) (interface{}, error)
- func DecodeLoginRequest(ctx context.Context, r *http.Request) (interface{}, error)
- func DecodeRegisterRequest(ctx context.Context, r *http.Request) (interface{}, error)
- func EncodeResponse(ctx context.Context, w http.ResponseWriter, response interface{}) error
- func GetAuthToken(r *http.Request) (string, error)
- func HashPassword(password string) (string, error)
- func MakeAuthUserEndpoint(svc service.Service) endpoint.Endpoint
- func MakeGetAllEndpoint(svc service.Service) endpoint.Endpoint
- func MakeLoginEndpoint(svc service.Service) endpoint.Endpoint
- func MakeRegisterEndpoint(svc service.Service) endpoint.Endpoint
- type AuthUserRequest
- type AuthUserResponse
- type EndpointSet
- type GetAllRequest
- type GetAllResponse
- type LoginRequest
- type LoginResponse
- type RegisterRequest
- type RegisterResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPasswordHash ¶
func DecodeAuthUserRequest ¶
func DecodeGetAllRequest ¶
func DecodeLoginRequest ¶
func DecodeRegisterRequest ¶
func EncodeResponse ¶
func EncodeResponse(ctx context.Context, w http.ResponseWriter, response interface{}) error
func HashPassword ¶
Types ¶
type AuthUserRequest ¶
type AuthUserRequest struct { }
type AuthUserResponse ¶
type EndpointSet ¶
type EndpointSet struct { LoginEndpoint endpoint.Endpoint RegisterEndpoint endpoint.Endpoint GetAllEndpoint endpoint.Endpoint AuthUserEndpoint endpoint.Endpoint }
func NewEndpointSet ¶
func NewEndpointSet(svc service.Service) EndpointSet
type GetAllRequest ¶
type GetAllRequest struct { }
type GetAllResponse ¶
type LoginRequest ¶
type LoginResponse ¶
type RegisterRequest ¶
type RegisterResponse ¶
Click to show internal directories.
Click to hide internal directories.