Documentation
¶
Index ¶
- func CreateAccountHandler(w http.ResponseWriter, r *http.Request)
- func CreateProjectHandler(w http.ResponseWriter, r *http.Request)
- func CreateResponseModelHandler(w http.ResponseWriter, r *http.Request)
- func CreateURLConfigHandler(w http.ResponseWriter, r *http.Request)
- func CreateURLHTTPStatusHandler(w http.ResponseWriter, r *http.Request)
- func DeleteAccountHandler(w http.ResponseWriter, r *http.Request)
- func DeleteProjectHandler(w http.ResponseWriter, r *http.Request)
- func DeleteResponseModelHandler(w http.ResponseWriter, r *http.Request)
- func DeleteURLConfigHandler(w http.ResponseWriter, r *http.Request)
- func DeleteURLHTTPStatusHandler(w http.ResponseWriter, r *http.Request)
- func GetAccountHandler(w http.ResponseWriter, r *http.Request)
- func GetAllAccountsHandler(w http.ResponseWriter, r *http.Request)
- func GetAllProjectsHandler(w http.ResponseWriter, r *http.Request)
- func GetAllResponseModelsHandler(w http.ResponseWriter, r *http.Request)
- func GetAllURLConfigsHandler(w http.ResponseWriter, r *http.Request)
- func GetAllURLHTTPStatusesHandler(w http.ResponseWriter, r *http.Request)
- func GetProjectHandler(w http.ResponseWriter, r *http.Request)
- func GetResponseModelHandler(w http.ResponseWriter, r *http.Request)
- func GetURLConfigHandler(w http.ResponseWriter, r *http.Request)
- func LoginHandler(w http.ResponseWriter, r *http.Request)
- func MockHandler(w http.ResponseWriter, r *http.Request)
- func UpdateAccountHandler(w http.ResponseWriter, r *http.Request)
- func UpdateProjectHandler(w http.ResponseWriter, r *http.Request)
- func UpdateResponseModelHandler(w http.ResponseWriter, r *http.Request)
- func UpdateURLConfigHandler(w http.ResponseWriter, r *http.Request)
- func UpdateURLHTTPStatusHandler(w http.ResponseWriter, r *http.Request)
- type Account
- type Claims
- type Credentials
- type Project
- type ResponseModel
- type URLConfig
- type URLHTTPStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateAccountHandler ¶
func CreateAccountHandler(w http.ResponseWriter, r *http.Request)
CreateAccountHandler handles the creation of a new account
func CreateProjectHandler ¶
func CreateProjectHandler(w http.ResponseWriter, r *http.Request)
CreateProjectHandler handles the creation of a new project
func CreateResponseModelHandler ¶
func CreateResponseModelHandler(w http.ResponseWriter, r *http.Request)
func CreateURLConfigHandler ¶
func CreateURLConfigHandler(w http.ResponseWriter, r *http.Request)
CreateURLConfigHandler handles the creation of a new URL config
func CreateURLHTTPStatusHandler ¶
func CreateURLHTTPStatusHandler(w http.ResponseWriter, r *http.Request)
func DeleteAccountHandler ¶
func DeleteAccountHandler(w http.ResponseWriter, r *http.Request)
DeleteAccountHandler handles deleting an account
func DeleteProjectHandler ¶
func DeleteProjectHandler(w http.ResponseWriter, r *http.Request)
func DeleteResponseModelHandler ¶
func DeleteResponseModelHandler(w http.ResponseWriter, r *http.Request)
DeleteResponseModelHandler handles deleting a response model
func DeleteURLConfigHandler ¶
func DeleteURLConfigHandler(w http.ResponseWriter, r *http.Request)
DeleteURLConfigHandler handles deleting a URL config
func DeleteURLHTTPStatusHandler ¶
func DeleteURLHTTPStatusHandler(w http.ResponseWriter, r *http.Request)
DeleteURLHTTPStatusHandler handles deleting an HTTP status
func GetAccountHandler ¶
func GetAccountHandler(w http.ResponseWriter, r *http.Request)
GetAccountHandler retrieves a single account by ID from the database
func GetAllAccountsHandler ¶
func GetAllAccountsHandler(w http.ResponseWriter, r *http.Request)
GetAllAccountsHandler retrieves all accounts from the database
func GetAllProjectsHandler ¶
func GetAllProjectsHandler(w http.ResponseWriter, r *http.Request)
GetAllProjectsHandler retrieves all projects from the database
func GetAllResponseModelsHandler ¶
func GetAllResponseModelsHandler(w http.ResponseWriter, r *http.Request)
GetAllResponseModelsHandler retrieves all response models from the database
func GetAllURLConfigsHandler ¶
func GetAllURLConfigsHandler(w http.ResponseWriter, r *http.Request)
GetAllURLConfigsHandler retrieves all URL configs from the database
func GetAllURLHTTPStatusesHandler ¶
func GetAllURLHTTPStatusesHandler(w http.ResponseWriter, r *http.Request)
GetAllURLHTTPStatusesHandler retrieves all HTTP statuses from the database
func GetProjectHandler ¶
func GetProjectHandler(w http.ResponseWriter, r *http.Request)
GetProjectHandler retrieves a single project by ID from the database
func GetResponseModelHandler ¶
func GetResponseModelHandler(w http.ResponseWriter, r *http.Request)
GetResponseModelHandler retrieves a single response model by ID from the database
func GetURLConfigHandler ¶
func GetURLConfigHandler(w http.ResponseWriter, r *http.Request)
GetURLConfigHandler retrieves a single URL config by ID from the database
func LoginHandler ¶
func LoginHandler(w http.ResponseWriter, r *http.Request)
LoginHandler handles user login and generates JWT token
func MockHandler ¶
func MockHandler(w http.ResponseWriter, r *http.Request)
func UpdateAccountHandler ¶
func UpdateAccountHandler(w http.ResponseWriter, r *http.Request)
UpdateAccountHandler handles updating an existing account
func UpdateProjectHandler ¶
func UpdateProjectHandler(w http.ResponseWriter, r *http.Request)
func UpdateResponseModelHandler ¶
func UpdateResponseModelHandler(w http.ResponseWriter, r *http.Request)
func UpdateURLConfigHandler ¶
func UpdateURLConfigHandler(w http.ResponseWriter, r *http.Request)
func UpdateURLHTTPStatusHandler ¶
func UpdateURLHTTPStatusHandler(w http.ResponseWriter, r *http.Request)
Types ¶
type Account ¶
type Account struct {
ID int64 `json:"id"`
Email string `json:"email"`
Password string `json:"password"`
}
Account represents the account structure
type Claims ¶
type Claims struct {
Email string `json:"email"`
AccountID int64 `json:"account_id"`
jwt.RegisteredClaims
}
Claims represents the structure of the JWT claims, including account_id
type Credentials ¶
Credentials represents the user's login credentials
type Project ¶
type Project struct {
ID int64 `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
OwnerID int64 `json:"owner_id"` // Changed AccountID to OwnerID
}
Project represents the project structure
type ResponseModel ¶
type ResponseModel struct {
ID int64 `json:"id"`
URLHTTPStatusID int `json:"url_http_status_id"`
Model interface{} `json:"model"` // Assuming model is JSONB in the database
Description string `json:"description"`
}
ResponseModel represents a structure for a response model