Documentation ¶
Index ¶
- type Address
- type ApiResponse
- type Category
- type Customer
- type CustomerClient
- type Order
- type Pet
- type PetClient
- func (receiver *PetClient) GetPetFindByStatus(ctx context.Context, queryParams struct{ ... }) (ret []Pet, err error)
- func (receiver *PetClient) GetPetFindByTags(ctx context.Context, queryParams struct{ ... }) (ret []Pet, err error)
- func (receiver *PetClient) GetPetPetId(ctx context.Context, petId int64) (ret Pet, err error)
- func (receiver *PetClient) PostPet(ctx context.Context, bodyJson Pet) (ret Pet, err error)
- func (receiver *PetClient) PostPetPetIdUploadImage(ctx context.Context, queryParams struct{ ... }, petId int64, ...) (ret ApiResponse, err error)
- func (receiver *PetClient) PutPet(ctx context.Context, bodyJson Pet) (ret Pet, err error)
- func (receiver *PetClient) SetClient(client *resty.Client)
- func (receiver *PetClient) SetProvider(provider ddhttp.IServiceProvider)
- type StoreClient
- func (receiver *StoreClient) GetStoreInventory(ctx context.Context) (ret struct{}, err error)
- func (receiver *StoreClient) GetStoreOrderOrderId(ctx context.Context, orderId int64) (ret Order, err error)
- func (receiver *StoreClient) PostStoreOrder(ctx context.Context, bodyJson Order) (ret Order, err error)
- func (receiver *StoreClient) SetClient(client *resty.Client)
- func (receiver *StoreClient) SetProvider(provider ddhttp.IServiceProvider)
- type Tag
- type UnipayClient
- type User
- type UserClient
- func (receiver *UserClient) GetUserLogin(ctx context.Context, queryParams struct{ ... }) (ret string, err error)
- func (receiver *UserClient) GetUserUsername(ctx context.Context, username string) (ret User, err error)
- func (receiver *UserClient) PostUserCreateWithList(ctx context.Context, bodyJson []User) (ret User, err error)
- func (receiver *UserClient) SetClient(client *resty.Client)
- func (receiver *UserClient) SetProvider(provider ddhttp.IServiceProvider)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiResponse ¶
type CustomerClient ¶
type CustomerClient struct {
// contains filtered or unexported fields
}
func NewCustomer ¶
func NewCustomer(opts ...ddhttp.DdClientOption) *CustomerClient
func (*CustomerClient) GetCustomerValidateToken ¶
func (*CustomerClient) SetClient ¶
func (receiver *CustomerClient) SetClient(client *resty.Client)
func (*CustomerClient) SetProvider ¶
func (receiver *CustomerClient) SetProvider(provider ddhttp.IServiceProvider)
type Order ¶
type Order struct { Complete bool `json:"complete,omitempty" url:"complete"` // 客户信息结构体 // 用于描述客户相关的信息 Customer struct { // 用户ID Id int64 `json:"id,omitempty" url:"id"` // 用户名 Username string `json:"username,omitempty" url:"username"` // 用户地址 // 例如:北京海淀区xxx街道 // 某某小区 Address []Address `json:"address,omitempty" url:"address"` } `json:"customer,omitempty" url:"customer"` Id int64 `json:"id,omitempty" url:"id"` PetId int64 `json:"petId,omitempty" url:"petId"` Quantity int `json:"quantity,omitempty" url:"quantity"` ShipDate *time.Time `json:"shipDate,omitempty" url:"shipDate"` // Order Status Status string `json:"status,omitempty" url:"status"` }
type Pet ¶
type Pet struct { Category Category `json:"category,omitempty" url:"category"` Id int64 `json:"id,omitempty" url:"id"` // required Name string `json:"name,omitempty" url:"name"` // required PhotoUrls []string `json:"photoUrls,omitempty" url:"photoUrls"` // pet status in the store // this is another line for test use Status string `json:"status,omitempty" url:"status"` Tags []Tag `json:"tags,omitempty" url:"tags"` }
type PetClient ¶
type PetClient struct {
// contains filtered or unexported fields
}
func NewPet ¶
func NewPet(opts ...ddhttp.DdClientOption) *PetClient
func (*PetClient) GetPetFindByStatus ¶
func (receiver *PetClient) GetPetFindByStatus(ctx context.Context, queryParams struct { Status string `json:"status,omitempty" url:"status"` }) (ret []Pet, err error)
Finds Pets by status Multiple status values can be provided with comma separated strings
func (*PetClient) GetPetFindByTags ¶
func (receiver *PetClient) GetPetFindByTags(ctx context.Context, queryParams struct { Tags []string `json:"tags,omitempty" url:"tags"` }) (ret []Pet, err error)
Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
func (*PetClient) GetPetPetId ¶
Find pet by ID Returns a single pet
func (*PetClient) PostPetPetIdUploadImage ¶
func (receiver *PetClient) PostPetPetIdUploadImage(ctx context.Context, queryParams struct { AdditionalMetadata string `json:"additionalMetadata,omitempty" url:"additionalMetadata"` }, petId int64, _uploadFile *multipart.FileHeader) (ret ApiResponse, err error)
uploads an image
func (*PetClient) SetProvider ¶
func (receiver *PetClient) SetProvider(provider ddhttp.IServiceProvider)
type StoreClient ¶
type StoreClient struct {
// contains filtered or unexported fields
}
func NewStore ¶
func NewStore(opts ...ddhttp.DdClientOption) *StoreClient
func (*StoreClient) GetStoreInventory ¶
func (receiver *StoreClient) GetStoreInventory(ctx context.Context) (ret struct { }, err error)
Returns pet inventories by status Returns a map of status codes to quantities
func (*StoreClient) GetStoreOrderOrderId ¶
func (receiver *StoreClient) GetStoreOrderOrderId(ctx context.Context, orderId int64) (ret Order, err error)
Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
func (*StoreClient) PostStoreOrder ¶
func (receiver *StoreClient) PostStoreOrder(ctx context.Context, bodyJson Order) (ret Order, err error)
Place an order for a pet Place a new order in the store
func (*StoreClient) SetClient ¶
func (receiver *StoreClient) SetClient(client *resty.Client)
func (*StoreClient) SetProvider ¶
func (receiver *StoreClient) SetProvider(provider ddhttp.IServiceProvider)
type UnipayClient ¶
type UnipayClient struct {
// contains filtered or unexported fields
}
func NewUnipay ¶
func NewUnipay(opts ...ddhttp.DdClientOption) *UnipayClient
func (*UnipayClient) GetUnipayStartUnionPay ¶
func (receiver *UnipayClient) GetUnipayStartUnionPay(ctx context.Context, queryParams struct { // required TxnAmt string `json:"txnAmt,omitempty" url:"txnAmt"` // required Token string `json:"token,omitempty" url:"token"` // required CompanyId string `json:"companyId,omitempty" url:"companyId"` // required FrontUrl string `json:"frontUrl,omitempty" url:"frontUrl"` }) (ret string, err error)
func (*UnipayClient) SetClient ¶
func (receiver *UnipayClient) SetClient(client *resty.Client)
func (*UnipayClient) SetProvider ¶
func (receiver *UnipayClient) SetProvider(provider ddhttp.IServiceProvider)
type User ¶
type User struct { Additional1 struct { } `json:"additional1,omitempty" url:"additional1"` Additional2 struct { } `json:"additional2,omitempty" url:"additional2"` Avatar *os.File `json:"avatar,omitempty" url:"avatar"` Email string `json:"email,omitempty" url:"email"` FirstName string `json:"firstName,omitempty" url:"firstName"` Id int64 `json:"id,omitempty" url:"id"` LastName string `json:"lastName,omitempty" url:"lastName"` Password string `json:"password,omitempty" url:"password"` Phone string `json:"phone,omitempty" url:"phone"` // User Status UserStatus int `json:"userStatus,omitempty" url:"userStatus"` Username string `json:"username,omitempty" url:"username"` }
type UserClient ¶
type UserClient struct {
// contains filtered or unexported fields
}
func NewUser ¶
func NewUser(opts ...ddhttp.DdClientOption) *UserClient
func (*UserClient) GetUserLogin ¶
func (receiver *UserClient) GetUserLogin(ctx context.Context, queryParams struct { Username string `json:"username,omitempty" url:"username"` Password string `json:"password,omitempty" url:"password"` }) (ret string, err error)
Logs user into the system
func (*UserClient) GetUserUsername ¶
func (receiver *UserClient) GetUserUsername(ctx context.Context, username string) (ret User, err error)
Get user by user name
func (*UserClient) PostUserCreateWithList ¶
func (receiver *UserClient) PostUserCreateWithList(ctx context.Context, bodyJson []User) (ret User, err error)
Creates list of users with given input array Creates list of users with given input array
func (*UserClient) SetClient ¶
func (receiver *UserClient) SetClient(client *resty.Client)
func (*UserClient) SetProvider ¶
func (receiver *UserClient) SetProvider(provider ddhttp.IServiceProvider)