Discover Packages
github.com/jkaninda/okapi
examples
route-definition
models
package
Version:
v0.0.17
Opens a new window with list of versions in this module.
Published: Jul 12, 2025
License: MIT
Opens a new window with license information.
Imports: 0
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
type AuthRequest struct {
Username string `json:"username" required:"true" description:"Username for authentication"`
Password string `json:"password" required:"true" description:"Password for authentication"`
}
type AuthResponse struct {
Success bool `json:"success"`
Message string `json:"message"`
Token string `json:"token,omitempty"`
ExpiresAt int64 `json:"expires,omitempty"`
}
type Book struct {
Id int `json:"id"`
Name string `json:"name" form:"name" max:"50" required:"true" description:"Book name"`
Price int `json:"price" form:"price" query:"price" yaml:"price" required:"true" description:"Book price"`
}
type ErrorResponse struct {
Success bool `json:"success"`
Status int `json:"status"`
Details any `json:"details"`
}
type Response struct {
Success bool `json:"success"`
Message string `json:"message"`
Data Book `json:"data"`
}
type UserInfo struct {
Name string `json:"name"`
Email string `json:"email"`
Role string `json:"role"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.