Documentation ¶
Index ¶
- type APIClient
- func (c *APIClient) CallAPI(path string, method string, postBody interface{}, ...) (*resty.Response, error)
- func (c *APIClient) ParameterToString(obj interface{}, collectionFormat string) string
- func (c *APIClient) SelectHeaderAccept(accepts []string) string
- func (c *APIClient) SelectHeaderContentType(contentTypes []string) string
- type APIResponse
- type Category
- type Configuration
- type ModelApiResponse
- type Order
- type Pet
- type PetApi
- func (a PetApi) AddPet(body Pet) (*APIResponse, error)
- func (a PetApi) DeletePet(petId int64, apiKey string) (*APIResponse, error)
- func (a PetApi) FindPetsByStatus(status []string) ([]Pet, *APIResponse, error)
- func (a PetApi) FindPetsByTags(tags []string) ([]Pet, *APIResponse, error)
- func (a PetApi) GetPetById(petId int64) (*Pet, *APIResponse, error)
- func (a PetApi) UpdatePet(body Pet) (*APIResponse, error)
- func (a PetApi) UpdatePetWithForm(petId int64, name string, status string) (*APIResponse, error)
- func (a PetApi) UploadFile(petId int64, additionalMetadata string, file *os.File) (*ModelApiResponse, *APIResponse, error)
- type StoreApi
- type Tag
- type User
- type UserApi
- func (a UserApi) CreateUser(body User) (*APIResponse, error)
- func (a UserApi) CreateUsersWithArrayInput(body []User) (*APIResponse, error)
- func (a UserApi) CreateUsersWithListInput(body []User) (*APIResponse, error)
- func (a UserApi) DeleteUser(username string) (*APIResponse, error)
- func (a UserApi) GetUserByName(username string) (*User, *APIResponse, error)
- func (a UserApi) LoginUser(username string, password string) (*string, *APIResponse, error)
- func (a UserApi) LogoutUser() (*APIResponse, error)
- func (a UserApi) UpdateUser(username string, body User) (*APIResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIClient ¶
type APIClient struct { }
func (*APIClient) ParameterToString ¶
func (*APIClient) SelectHeaderAccept ¶
func (*APIClient) SelectHeaderContentType ¶
type APIResponse ¶
func NewAPIResponse ¶
func NewAPIResponse(r *http.Response) *APIResponse
func NewAPIResponseWithError ¶
func NewAPIResponseWithError(errorMessage string) *APIResponse
type Configuration ¶
type Configuration struct { UserName string `json:"userName,omitempty"` Password string `json:"password,omitempty"` APIKeyPrefix map[string]string `json:"APIKeyPrefix,omitempty"` APIKey map[string]string `json:"APIKey,omitempty"` DebugFile string `json:"debugFile,omitempty"` OAuthToken string `json:"oAuthToken,omitempty"` Timeout int `json:"timeout,omitempty"` BasePath string `json:"basePath,omitempty"` Host string `json:"host,omitempty"` Scheme string `json:"scheme,omitempty"` AccessToken string `json:"accessToken,omitempty"` DefaultHeader map[string]string `json:"defaultHeader,omitempty"` UserAgent string `json:"userAgent,omitempty"` APIClient APIClient `json:"APIClient,omitempty"` // contains filtered or unexported fields }
func NewConfiguration ¶
func NewConfiguration() *Configuration
func (*Configuration) AddDefaultHeader ¶
func (c *Configuration) AddDefaultHeader(key string, value string)
func (*Configuration) GetAPIKeyWithPrefix ¶
func (c *Configuration) GetAPIKeyWithPrefix(APIKeyIdentifier string) string
func (*Configuration) GetBasicAuthEncodedString ¶
func (c *Configuration) GetBasicAuthEncodedString() string
func (*Configuration) GetDebug ¶
func (c *Configuration) GetDebug() bool
func (*Configuration) SetDebug ¶
func (c *Configuration) SetDebug(enable bool)
type ModelApiResponse ¶
type PetApi ¶
type PetApi struct {
Configuration Configuration
}
func NewPetApiWithBasePath ¶
func (PetApi) AddPet ¶
func (a PetApi) AddPet(body Pet) (*APIResponse, error)
*
- Add a new pet to the store * *
- @param body Pet object that needs to be added to the store
- @return void
func (PetApi) DeletePet ¶
func (a PetApi) DeletePet(petId int64, apiKey string) (*APIResponse, error)
*
- Deletes a pet * *
- @param petId Pet id to delete
- @param apiKey
- @return void
func (PetApi) FindPetsByStatus ¶
func (a PetApi) FindPetsByStatus(status []string) ([]Pet, *APIResponse, error)
*
- Finds Pets by status
- Multiple status values can be provided with comma separated strings *
- @param status Status values that need to be considered for filter
- @return []Pet
func (PetApi) FindPetsByTags ¶
func (a PetApi) FindPetsByTags(tags []string) ([]Pet, *APIResponse, error)
*
- Finds Pets by tags
- Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. *
- @param tags Tags to filter by
- @return []Pet
func (PetApi) GetPetById ¶
func (a PetApi) GetPetById(petId int64) (*Pet, *APIResponse, error)
*
- Find pet by ID
- Returns a single pet *
- @param petId ID of pet to return
- @return *Pet
func (PetApi) UpdatePet ¶
func (a PetApi) UpdatePet(body Pet) (*APIResponse, error)
*
- Update an existing pet * *
- @param body Pet object that needs to be added to the store
- @return void
func (PetApi) UpdatePetWithForm ¶
*
- Updates a pet in the store with form data * *
- @param petId ID of pet that needs to be updated
- @param name Updated name of the pet
- @param status Updated status of the pet
- @return void
func (PetApi) UploadFile ¶
func (a PetApi) UploadFile(petId int64, additionalMetadata string, file *os.File) (*ModelApiResponse, *APIResponse, error)
*
- uploads an image * *
- @param petId ID of pet to update
- @param additionalMetadata Additional data to pass to server
- @param file file to upload
- @return *ModelApiResponse
type StoreApi ¶
type StoreApi struct {
Configuration Configuration
}
func NewStoreApi ¶
func NewStoreApi() *StoreApi
func NewStoreApiWithBasePath ¶
func (StoreApi) DeleteOrder ¶
func (a StoreApi) DeleteOrder(orderId string) (*APIResponse, error)
*
- Delete purchase order by ID
- For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors *
- @param orderId ID of the order that needs to be deleted
- @return void
func (StoreApi) GetInventory ¶
func (a StoreApi) GetInventory() (*map[string]int32, *APIResponse, error)
*
- Returns pet inventories by status
- Returns a map of status codes to quantities *
- @return *map[string]int32
func (StoreApi) GetOrderById ¶
func (a StoreApi) GetOrderById(orderId int64) (*Order, *APIResponse, error)
*
- Find purchase order by ID
- For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions *
- @param orderId ID of pet that needs to be fetched
- @return *Order
func (StoreApi) PlaceOrder ¶
func (a StoreApi) PlaceOrder(body Order) (*Order, *APIResponse, error)
*
- Place an order for a pet * *
- @param body order placed for purchasing the pet
- @return *Order
type User ¶
type User struct { Id int64 `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 {
Configuration Configuration
}
func NewUserApi ¶
func NewUserApi() *UserApi
func NewUserApiWithBasePath ¶
func (UserApi) CreateUser ¶
func (a UserApi) CreateUser(body User) (*APIResponse, error)
*
- Create user
- This can only be done by the logged in user. *
- @param body Created user object
- @return void
func (UserApi) CreateUsersWithArrayInput ¶
func (a UserApi) CreateUsersWithArrayInput(body []User) (*APIResponse, error)
*
- Creates list of users with given input array * *
- @param body List of user object
- @return void
func (UserApi) CreateUsersWithListInput ¶
func (a UserApi) CreateUsersWithListInput(body []User) (*APIResponse, error)
*
- Creates list of users with given input array * *
- @param body List of user object
- @return void
func (UserApi) DeleteUser ¶
func (a UserApi) DeleteUser(username string) (*APIResponse, error)
*
- Delete user
- This can only be done by the logged in user. *
- @param username The name that needs to be deleted
- @return void
func (UserApi) GetUserByName ¶
func (a UserApi) GetUserByName(username string) (*User, *APIResponse, error)
*
- Get user by user name * *
- @param username The name that needs to be fetched. Use user1 for testing.
- @return *User
func (UserApi) LoginUser ¶
*
- Logs user into the system * *
- @param username The user name for login
- @param password The password for login in clear text
- @return *string
func (UserApi) LogoutUser ¶
func (a UserApi) LogoutUser() (*APIResponse, error)
*
- Logs out current logged in user session * *
- @return void
func (UserApi) UpdateUser ¶
func (a UserApi) UpdateUser(username string, body User) (*APIResponse, error)
*
- Updated user
- This can only be done by the logged in user. *
- @param username name that need to be deleted
- @param body Updated user object
- @return void
Click to show internal directories.
Click to hide internal directories.