Documentation ¶
Index ¶
- func DecodeLogInRequest(_ context.Context, r *http.Request) (interface{}, error)
- func DecodeLogOutRequest(_ context.Context, r *http.Request) (interface{}, error)
- func DecodeSignUpRequest(_ context.Context, r *http.Request) (interface{}, error)
- func MakeSignInEndpoint(s Service) endpoint.Endpoint
- func MakeSignOutEndpoint(s Service) endpoint.Endpoint
- func MakeSignUpEndpoint(s Service) endpoint.Endpoint
- func Transport(auth interfaces.Auth, transport interfaces.HTTPTransport, ...)
- type Config
- type Service
- type SignInRequest
- type SignInResponse
- type SignOutRequest
- type SignOutResponse
- type SignUpRequest
- type SignUpResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeLogInRequest ¶
func DecodeLogOutRequest ¶
func DecodeSignUpRequest ¶
func MakeSignInEndpoint ¶
func MakeSignOutEndpoint ¶
func MakeSignUpEndpoint ¶
func Transport ¶
func Transport( auth interfaces.Auth, transport interfaces.HTTPTransport, session interfaces.Session, router interfaces.Http, srv Service, logger *logrus.Logger, )
Types ¶
type Service ¶
type Service interface { SignUp(ctx context.Context, req SignUpRequest) (resp *SignUpResponse) SignIn(ctx context.Context, req SignInRequest) (resp *SignInResponse) SignOut(ctx context.Context, req SignOutRequest) (resp *SignOutResponse) }
func NewService ¶
func NewService( auth interfaces.Auth, session interfaces.Session, cfg *Config, log *logrus.Logger, db database.Database, ) Service
type SignInRequest ¶
LogIn Request
func (SignInRequest) Validate ¶
func (r SignInRequest) Validate() error
type SignInResponse ¶
type SignInResponse struct { Id uint64 Token string User database.AuthModel MFA string HttpStatusCode int Err error }
LogInResponse
func (*SignInResponse) Error ¶
func (d *SignInResponse) Error() error
func (*SignInResponse) StatusCode ¶
func (d *SignInResponse) StatusCode() int
type SignOutResponse ¶
LogOut Response
func (*SignOutResponse) Error ¶
func (d *SignOutResponse) Error() error
func (*SignOutResponse) StatusCode ¶
func (d *SignOutResponse) StatusCode() int
type SignUpRequest ¶
SignUp Request
func (SignUpRequest) Validate ¶
func (r SignUpRequest) Validate() error
type SignUpResponse ¶
SignUpResponse
func (*SignUpResponse) Error ¶
func (d *SignUpResponse) Error() error
func (*SignUpResponse) StatusCode ¶
func (d *SignUpResponse) StatusCode() int
Source Files ¶
Click to show internal directories.
Click to hide internal directories.