Documentation ¶
Index ¶
- Variables
- func GetSessionName(userAgent string) (string, error)
- func Init(api huma.API, db database.DBTX)
- type AuthController
- func (controller *AuthController) Im(ctx context.Context, request *ImRequest) (*ImResponse, error)
- func (c *AuthController) SignIn(ctx context.Context, request *SignInRequest) (*SignInResponse, error)
- func (controller *AuthController) SignOut(ctx context.Context, request *SignOutRequest) (*SignOutResponse, error)
- func (controller *AuthController) SignUp(ctx context.Context, request *SignUpRequest) (*SignUpResponse, error)
- func (controller *AuthController) Test(ctx context.Context, request *TestRequest) (*TestResponse, error)
- type AuthService
- type GetUserParams
- type ImRequest
- type ImResponse
- type SignInRequest
- type SignInResponse
- type SignOutRequest
- type SignOutResponse
- type SignUpRequest
- type SignUpResponse
- type TestRequest
- type TestResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var EmptyUsernameOrPasswordError = huma.Error400BadRequest("empty username or password")
View Source
var InvalidUsernameOrPasswordError = huma.Error403Forbidden("invalid username or password")
Functions ¶
func GetSessionName ¶
Types ¶
type AuthController ¶
type AuthController struct {
// contains filtered or unexported fields
}
func (*AuthController) Im ¶
func (controller *AuthController) Im(ctx context.Context, request *ImRequest) (*ImResponse, error)
func (*AuthController) SignIn ¶
func (c *AuthController) SignIn(ctx context.Context, request *SignInRequest) (*SignInResponse, error)
func (*AuthController) SignOut ¶
func (controller *AuthController) SignOut(ctx context.Context, request *SignOutRequest) (*SignOutResponse, error)
func (*AuthController) SignUp ¶
func (controller *AuthController) SignUp(ctx context.Context, request *SignUpRequest) (*SignUpResponse, error)
func (*AuthController) Test ¶
func (controller *AuthController) Test(ctx context.Context, request *TestRequest) (*TestResponse, error)
type AuthService ¶
type GetUserParams ¶
type GetUserParams struct {
Id int64
}
func (GetUserParams) GetId ¶
func (params GetUserParams) GetId() int64
func (GetUserParams) GetUsername ¶
func (params GetUserParams) GetUsername() string
type ImResponse ¶
type SignInRequest ¶
type SignInRequest struct { UserAgent string `header:"User-Agent"` Body struct { Username string `json:"username"` Password string `json:"password"` } }
func (*SignInRequest) GetId ¶
func (request *SignInRequest) GetId() int64
func (*SignInRequest) GetPassword ¶
func (request *SignInRequest) GetPassword() string
func (*SignInRequest) GetUsername ¶
func (request *SignInRequest) GetUsername() string
type SignInResponse ¶
type SignOutRequest ¶
type SignOutResponse ¶
type SignOutResponse struct { Body struct { Ok bool `json:"ok"` } }
type SignUpRequest ¶
type SignUpResponse ¶
type TestRequest ¶
type TestRequest struct{}
type TestResponse ¶
type TestResponse struct {
Body string
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.