signin

package
v0.0.0-...-5d4c5b8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 4, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SignIn

func SignIn(c *gin.Context, log *logger.Logger, db *database.Database)

SignIn signs in a user SignIn godoc @Summary Signs in a user @Description Signs in a user @Tags signin @Accept json @Produce json @Param request body SignInRequest true "Signin Request Payload" @Success 200 {object} SignInResponse "User signed in successfully" @Failure 400 {object} GeneralErrorResponse "Error message" @Failure 401 {object} GeneralErrorResponse "Unauthorized" @Failure 404 {object} UserNotFoundResponse "User not found" @Failure 422 {object} SignInInvalidPasswordResponse "Invalid sign in request Password" @Failure 500 {object} GeneralErrorResponse "Internal Server Error" @Router /signin [post]

Types

type GeneralErrorResponse

type GeneralErrorResponse struct {
	Message    string `json:"message"`
	StatusCode int    `json:"status_code"`
}

type SignInInvalidPasswordResponse

type SignInInvalidPasswordResponse struct {
	Email   string `json:"email"`
	Message string `json:"message"`
}

type SignInRequest

type SignInRequest struct {
	Email    string `json:"email" binding:"required"`
	Password string `json:"password" binding:"required"`
}

type SignInResponse

type SignInResponse struct {
	ID             string `json:"id"`
	Email          string `json:"email"`
	FirstName      string `json:"first_name"`
	LastName       string `json:"last_name"`
	CreatedAt      string `json:"created_at"`
	UpdatedAt      string `json:"updated_at"`
	OrganizationID string `json:"organization_id"`
	Role           string `json:"role"`
	APIKey         string `json:"apikey"`
}

type UserNotFoundResponse

type UserNotFoundResponse struct {
	Message string `json:"message"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL