Documentation
¶
Index ¶
- Constants
- func DefaultHandleFunc(c *gin.Context)
- func Index(c *gin.Context)
- func NewRouter(handleFunctions ApiHandleFunctions) *gin.Engine
- func NewRouterWithGinEngine(router *gin.Engine, handleFunctions ApiHandleFunctions) *gin.Engine
- func Version(c *gin.Context)
- type Address
- type ApiHandleFunctions
- type ApiResponse
- type Category
- type Customer
- type Order
- type Pet
- type PetAPI
- func (api *PetAPI) AddPet(c *gin.Context)
- func (api *PetAPI) DeletePet(c *gin.Context)
- func (api *PetAPI) FindPetsByStatus(c *gin.Context)
- func (api *PetAPI) FindPetsByTags(c *gin.Context)
- func (api *PetAPI) GetPetById(c *gin.Context)
- func (api *PetAPI) UpdatePet(c *gin.Context)
- func (api *PetAPI) UpdatePetWithForm(c *gin.Context)
- func (api *PetAPI) UploadFile(c *gin.Context)
- type Route
- type StoreAPI
- type Tag
- type User
- type UserAPI
- func (api *UserAPI) CreateUser(c *gin.Context)
- func (api *UserAPI) CreateUsersWithListInput(c *gin.Context)
- func (api *UserAPI) DeleteUser(c *gin.Context)
- func (api *UserAPI) GetUserByName(c *gin.Context)
- func (api *UserAPI) LoginUser(c *gin.Context)
- func (api *UserAPI) LogoutUser(c *gin.Context)
- func (api *UserAPI) UpdateUser(c *gin.Context)
Constants ¶
const PATH_PARAM_USERNAME = "username"
Variables ¶
This section is empty.
Functions ¶
func DefaultHandleFunc ¶
Default handler for not yet implemented routes
func NewRouter ¶
func NewRouter(handleFunctions ApiHandleFunctions) *gin.Engine
NewRouter returns a new router.
func NewRouterWithGinEngine ¶
func NewRouterWithGinEngine(router *gin.Engine, handleFunctions ApiHandleFunctions) *gin.Engine
NewRouter add routes to existing gin engine.
Types ¶
type ApiHandleFunctions ¶
type ApiResponse ¶
type PetAPI ¶
type PetAPI struct {
}
func (*PetAPI) FindPetsByStatus ¶
Get /api/v3/pet/findByStatus Finds Pets by status
func (*PetAPI) FindPetsByTags ¶
Get /api/v3/pet/findByTags Finds Pets by tags
func (*PetAPI) GetPetById ¶
Get /api/v3/pet/:petId Find pet by ID
func (*PetAPI) UpdatePetWithForm ¶
Post /api/v3/pet/:petId Updates a pet in the store with form data
func (*PetAPI) UploadFile ¶
Post /api/v3/pet/:petId/uploadImage uploads an image
type Route ¶
type Route struct {
// Name is the name of this Route.
Name string
// Method is the string for the HTTP method. ex) GET, POST etc..
Method string
// Pattern is the pattern of the URI.
Pattern string
// HandlerFunc is the handler function of this route.
HandlerFunc gin.HandlerFunc
}
Route is the information for every URI.
type StoreAPI ¶
type StoreAPI struct {
}
func (*StoreAPI) DeleteOrder ¶
Delete /api/v3/store/order/:orderId Delete purchase order by ID
func (*StoreAPI) GetInventory ¶
Get /api/v3/store/inventory Returns pet inventories by status
func (*StoreAPI) GetOrderById ¶
Get /api/v3/store/order/:orderId Find purchase order by ID
func (*StoreAPI) PlaceOrder ¶
Post /api/v3/store/order Place an order for a pet
type User ¶
type User struct {
Id string `json:"id,omitempty"`
Username string `json:"username,omitempty"`
FirstName string `json:"firstName,omitempty"`
LastName string `json:"lastName,omitempty"`
Email string `json:"email,omitempty"`
Password string `json:"password,omitempty"`
Phone string `json:"phone,omitempty"`
// User Status
UserStatus int32 `json:"userStatus,omitempty"`
}
type UserAPI ¶
type UserAPI struct {
}
func (*UserAPI) CreateUser ¶
Post /api/v3/user Create user
func (*UserAPI) CreateUsersWithListInput ¶
Post /api/v3/user/createWithList Creates list of users with given input array
func (*UserAPI) DeleteUser ¶
Delete /api/v3/user/:username Delete user
func (*UserAPI) GetUserByName ¶
Get /api/v3/user/:username Get user by user name
func (*UserAPI) LogoutUser ¶
Get /api/v3/user/logout Logs out current logged in user session
func (*UserAPI) UpdateUser ¶
Put /api/v3/user/:username Update user