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 AdditionalPropertiesClass
- type Animal
- type AnimalFarm
- type ArrayOfArrayOfNumberOnly
- type ArrayOfNumberOnly
- type Capitalization
- type Cat
- type Category
- type ClassModel
- type Client
- type Configuration
- type Dog
- type EnumArrays
- type EnumClass
- type FakeApi
- func (a FakeApi) TestClientModel(body Client) (*Client, *APIResponse, error)
- func (a FakeApi) TestEndpointParameters(number float32, double float64, patternWithoutDelimiter string, byte_ string, ...) (*APIResponse, error)
- func (a FakeApi) TestEnumParameters(enumFormStringArray []string, enumFormString string, ...) (*APIResponse, error)
- type HasOnlyReadOnly
- type List
- type MixedPropertiesAndAdditionalPropertiesClass
- type Model200Response
- type ModelApiResponse
- type ModelReturn
- type Name
- type NumberOnly
- type Order
- type OuterEnum
- 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 ReadOnlyFirst
- type SpecialModelName
- 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 {
// contains filtered or unexported fields
}
func (*APIClient) ParameterToString ¶
func (*APIClient) SelectHeaderAccept ¶
func (*APIClient) SelectHeaderContentType ¶
type APIResponse ¶
type APIResponse struct { *http.Response `json:"-"` Message string `json:"message,omitempty"` // Operation is the name of the swagger operation. Operation string `json:"operation,omitempty"` // RequestURL is the request URL. This value is always available, even if the // embedded *http.Response is nil. RequestURL string `json:"url,omitempty"` // Method is the HTTP method used for the request. This value is always // available, even if the embedded *http.Response is nil. Method string `json:"method,omitempty"` // Payload holds the contents of the response body (which may be nil or empty). // This is provided here as the raw response.Body() reader will have already // been drained. Payload []byte `json:"-"` }
func NewAPIResponse ¶
func NewAPIResponse(r *http.Response) *APIResponse
func NewAPIResponseWithError ¶
func NewAPIResponseWithError(errorMessage string) *APIResponse
type AnimalFarm ¶
type AnimalFarm struct { }
type ArrayOfArrayOfNumberOnly ¶
type ArrayOfArrayOfNumberOnly struct {
ArrayArrayNumber [][]float32 `json:"ArrayArrayNumber,omitempty"`
}
type ArrayOfNumberOnly ¶
type ArrayOfNumberOnly struct {
ArrayNumber []float32 `json:"ArrayNumber,omitempty"`
}
type Capitalization ¶
type Capitalization struct { SmallCamel string `json:"smallCamel,omitempty"` CapitalCamel string `json:"CapitalCamel,omitempty"` SmallSnake string `json:"small_Snake,omitempty"` CapitalSnake string `json:"Capital_Snake,omitempty"` SCAETHFlowPoints string `json:"SCA_ETH_Flow_Points,omitempty"` // Name of the pet ATT_NAME string `json:"ATT_NAME,omitempty"` }
type ClassModel ¶
type ClassModel struct {
Class string `json:"_class,omitempty"`
}
Model for testing model with \"_class\" property
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"` Debug bool `json:"debug,omitempty"` DebugFile string `json:"debugFile,omitempty"` OAuthToken string `json:"oAuthToken,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 Transport *http.Transport Timeout *time.Duration `json:"timeout,omitempty"` }
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
type EnumArrays ¶
type FakeApi ¶
type FakeApi struct {
Configuration *Configuration
}
func NewFakeApi ¶
func NewFakeApi() *FakeApi
func NewFakeApiWithBasePath ¶
func (FakeApi) TestClientModel ¶
func (a FakeApi) TestClientModel(body Client) (*Client, *APIResponse, error)
*
- To test \"client\" model
- To test \"client\" model *
- @param body client model
- @return *Client
func (FakeApi) TestEndpointParameters ¶
func (a FakeApi) TestEndpointParameters(number float32, double float64, patternWithoutDelimiter string, byte_ string, integer int32, int32_ int32, int64_ int64, float float32, string_ string, binary string, date time.Time, dateTime time.Time, password string, callback string) (*APIResponse, error)
*
- Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
- Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *
- @param number None
- @param double None
- @param patternWithoutDelimiter None
- @param byte_ None
- @param integer None
- @param int32_ None
- @param int64_ None
- @param float None
- @param string_ None
- @param binary None
- @param date None
- @param dateTime None
- @param password None
- @param callback None
- @return void
func (FakeApi) TestEnumParameters ¶
func (a FakeApi) TestEnumParameters(enumFormStringArray []string, enumFormString string, enumHeaderStringArray []string, enumHeaderString string, enumQueryStringArray []string, enumQueryString string, enumQueryInteger int32, enumQueryDouble float64) (*APIResponse, error)
*
- To test enum parameters
- To test enum parameters *
- @param enumFormStringArray Form parameter enum test (string array)
- @param enumFormString Form parameter enum test (string)
- @param enumHeaderStringArray Header parameter enum test (string array)
- @param enumHeaderString Header parameter enum test (string)
- @param enumQueryStringArray Query parameter enum test (string array)
- @param enumQueryString Query parameter enum test (string)
- @param enumQueryInteger Query parameter enum test (double)
- @param enumQueryDouble Query parameter enum test (double)
- @return void
type HasOnlyReadOnly ¶
type Model200Response ¶
type Model200Response struct { Name int32 `json:"name,omitempty"` Class string `json:"class,omitempty"` }
Model for testing model name starting with number
type ModelApiResponse ¶
type ModelReturn ¶
type ModelReturn struct {
Return_ int32 `json:"return,omitempty"`
}
Model for testing reserved words
type Name ¶
type Name struct { Name int32 `json:"name"` SnakeCase int32 `json:"snake_case,omitempty"` Property string `json:"property,omitempty"` Var123Number int32 `json:"123Number,omitempty"` }
Model for testing model name same as property name
type NumberOnly ¶
type NumberOnly struct {
JustNumber float32 `json:"JustNumber,omitempty"`
}
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 ReadOnlyFirst ¶
type SpecialModelName ¶
type SpecialModelName struct {
SpecialPropertyName int64 `json:"$special[property.name],omitempty"`
}
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
Source Files ¶
- additional_properties_class.go
- animal.go
- animal_farm.go
- api_client.go
- api_response.go
- array_of_array_of_number_only.go
- array_of_number_only.go
- capitalization.go
- cat.go
- category.go
- class_model.go
- client.go
- configuration.go
- dog.go
- enum_arrays.go
- enum_class.go
- fake_api.go
- has_only_read_only.go
- list.go
- mixed_properties_and_additional_properties_class.go
- model_200_response.go
- model_api_response.go
- model_return.go
- name.go
- number_only.go
- order.go
- outer_enum.go
- pet.go
- pet_api.go
- read_only_first.go
- special_model_name.go
- store_api.go
- tag.go
- user.go
- user_api.go
Click to show internal directories.
Click to hide internal directories.