本文整理匯總了Golang中github.com/dragonfax/aws-sdk-go/service/devicefarm.New函數的典型用法代碼示例。如果您正苦於以下問題:Golang New函數的具體用法?Golang New怎麽用?Golang New使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了New函數的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: ExampleDeviceFarm_CreateDevicePool
func ExampleDeviceFarm_CreateDevicePool() {
svc := devicefarm.New(nil)
params := &devicefarm.CreateDevicePoolInput{
Name: aws.String("Name"), // Required
ProjectArn: aws.String("AmazonResourceName"), // Required
Rules: []*devicefarm.Rule{ // Required
{ // Required
Attribute: aws.String("DeviceAttribute"),
Operator: aws.String("RuleOperator"),
Value: aws.String("String"),
},
// More values...
},
Description: aws.String("Message"),
}
resp, err := svc.CreateDevicePool(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
示例2: ExampleDeviceFarm_ScheduleRun
func ExampleDeviceFarm_ScheduleRun() {
svc := devicefarm.New(nil)
params := &devicefarm.ScheduleRunInput{
AppArn: aws.String("AmazonResourceName"), // Required
DevicePoolArn: aws.String("AmazonResourceName"), // Required
ProjectArn: aws.String("AmazonResourceName"), // Required
Test: &devicefarm.ScheduleRunTest{ // Required
Type: aws.String("TestType"), // Required
Filter: aws.String("Filter"),
Parameters: map[string]*string{
"Key": aws.String("String"), // Required
// More values...
},
TestPackageArn: aws.String("AmazonResourceName"),
},
Configuration: &devicefarm.ScheduleRunConfiguration{
AuxiliaryApps: []*string{
aws.String("AmazonResourceName"), // Required
// More values...
},
BillingMethod: aws.String("BillingMethod"),
ExtraDataPackageArn: aws.String("AmazonResourceName"),
Locale: aws.String("String"),
Location: &devicefarm.Location{
Latitude: aws.Float64(1.0), // Required
Longitude: aws.Float64(1.0), // Required
},
NetworkProfileArn: aws.String("AmazonResourceName"),
Radios: &devicefarm.Radios{
Bluetooth: aws.Bool(true),
Gps: aws.Bool(true),
Nfc: aws.Bool(true),
Wifi: aws.Bool(true),
},
},
Name: aws.String("Name"),
}
resp, err := svc.ScheduleRun(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
示例3: ExampleDeviceFarm_GetAccountSettings
func ExampleDeviceFarm_GetAccountSettings() {
svc := devicefarm.New(nil)
var params *devicefarm.GetAccountSettingsInput
resp, err := svc.GetAccountSettings(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
示例4: ExampleDeviceFarm_CreateProject
func ExampleDeviceFarm_CreateProject() {
svc := devicefarm.New(nil)
params := &devicefarm.CreateProjectInput{
Name: aws.String("Name"), // Required
}
resp, err := svc.CreateProject(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
示例5: ExampleDeviceFarm_GetUpload
func ExampleDeviceFarm_GetUpload() {
svc := devicefarm.New(nil)
params := &devicefarm.GetUploadInput{
Arn: aws.String("AmazonResourceName"), // Required
}
resp, err := svc.GetUpload(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
示例6: ExampleDeviceFarm_ListUniqueProblems
func ExampleDeviceFarm_ListUniqueProblems() {
svc := devicefarm.New(nil)
params := &devicefarm.ListUniqueProblemsInput{
Arn: aws.String("AmazonResourceName"), // Required
NextToken: aws.String("PaginationToken"),
}
resp, err := svc.ListUniqueProblems(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
示例7: ExampleDeviceFarm_GetDevicePoolCompatibility
func ExampleDeviceFarm_GetDevicePoolCompatibility() {
svc := devicefarm.New(nil)
params := &devicefarm.GetDevicePoolCompatibilityInput{
AppArn: aws.String("AmazonResourceName"), // Required
DevicePoolArn: aws.String("AmazonResourceName"), // Required
TestType: aws.String("TestType"),
}
resp, err := svc.GetDevicePoolCompatibility(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
示例8: ExampleDeviceFarm_CreateUpload
func ExampleDeviceFarm_CreateUpload() {
svc := devicefarm.New(nil)
params := &devicefarm.CreateUploadInput{
Name: aws.String("Name"), // Required
ProjectArn: aws.String("AmazonResourceName"), // Required
Type: aws.String("UploadType"), // Required
ContentType: aws.String("ContentType"),
}
resp, err := svc.CreateUpload(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
示例9: TestInterface
func TestInterface(t *testing.T) {
assert.Implements(t, (*devicefarmiface.DeviceFarmAPI)(nil), devicefarm.New(nil))
}
示例10: init
func init() {
Before("@devicefarm", func() {
// FIXME remove custom region
World["client"] = devicefarm.New(aws.NewConfig().WithRegion("us-west-2"))
})
}