当前位置: 首页>>代码示例>>Golang>>正文


Golang autorest.WithPath函数代码示例

本文整理汇总了Golang中github.com/Azure/go-autorest/autorest.WithPath函数的典型用法代码示例。如果您正苦于以下问题:Golang WithPath函数的具体用法?Golang WithPath怎么用?Golang WithPath使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了WithPath函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。

示例1: ListRequestPreparer

// Create a Preparer by which to prepare the List request.
func (client StorageAccountsClient) ListRequestPreparer() autorest.Preparer {
	return autorest.CreatePreparer(
		autorest.AsJSON(),
		autorest.AsGet(),
		autorest.WithBaseURL(client.BaseUri),
		autorest.WithPath("/subscriptions/{subscriptionId}/providers/Microsoft.Storage/storageAccounts"))
}
开发者ID:ritazh,项目名称:azure_storage_service_broker,代码行数:8,代码来源:storageaccounts.go

示例2: ListAllPreparer

// ListAllPreparer prepares the ListAll request.
func (client RecordSetsClient) ListAllPreparer(resourceGroupName string, zoneName string, top string, filter string) (*http.Request, error) {
	pathParameters := map[string]interface{}{
		"resourceGroupName": url.QueryEscape(resourceGroupName),
		"subscriptionId":    url.QueryEscape(client.SubscriptionID),
		"zoneName":          url.QueryEscape(zoneName),
	}

	queryParameters := map[string]interface{}{
		"api-version": APIVersion,
	}
	if len(top) > 0 {
		queryParameters["$top"] = top
	}
	if len(filter) > 0 {
		queryParameters["$filter"] = filter
	}

	return autorest.Prepare(&http.Request{},
		autorest.AsJSON(),
		autorest.AsGet(),
		autorest.WithBaseURL(client.BaseURI),
		autorest.WithPath("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnszones/{zoneName}/recordsets"),
		autorest.WithPathParameters(pathParameters),
		autorest.WithQueryParameters(queryParameters))
}
开发者ID:daemonfire300,项目名称:azure-sdk-for-go,代码行数:26,代码来源:recordsets.go

示例3: RegenerateSecretKeyRequestPreparer

// Create a Preparer by which to prepare the RegenerateSecretKey request.
func (client WorkflowAccessKeysClient) RegenerateSecretKeyRequestPreparer() autorest.Preparer {
	return autorest.CreatePreparer(
		autorest.AsJSON(),
		autorest.AsPost(),
		autorest.WithBaseURL(client.BaseUri),
		autorest.WithPath("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/accessKeys/{accessKeyName}/regenerate"))
}
开发者ID:Nepomuceno,项目名称:azure-sdk-for-go,代码行数:8,代码来源:workflowaccesskeys.go

示例4: LogoutUserPreparer

// LogoutUserPreparer prepares the LogoutUser request.
func (client ManagementClient) LogoutUserPreparer() (*http.Request, error) {
	preparer := autorest.CreatePreparer(
		autorest.AsGet(),
		autorest.WithBaseURL(client.BaseURI),
		autorest.WithPath("/user/logout"))
	return preparer.Prepare(&http.Request{})
}
开发者ID:garimakhulbe,项目名称:autorest,代码行数:8,代码来源:client.go

示例5: ListJobHistoryRequestPreparer

// Create a Preparer by which to prepare the ListJobHistory request.
func (client JobsClient) ListJobHistoryRequestPreparer() autorest.Preparer {
	return autorest.CreatePreparer(
		autorest.AsJSON(),
		autorest.AsGet(),
		autorest.WithBaseURL(client.BaseUri),
		autorest.WithPath("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/jobs/{jobName}/history"))
}
开发者ID:Nepomuceno,项目名称:azure-sdk-for-go,代码行数:8,代码来源:jobs.go

示例6: CreateOrUpdateRequestPreparer

// Create a Preparer by which to prepare the CreateOrUpdate request.
func (client ResourceGroupsClient) CreateOrUpdateRequestPreparer() autorest.Preparer {
	return autorest.CreatePreparer(
		autorest.AsJSON(),
		autorest.AsPut(),
		autorest.WithBaseURL(client.BaseUri),
		autorest.WithPath("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}"))
}
开发者ID:ritazh,项目名称:azure_storage_service_broker,代码行数:8,代码来源:resourcegroups.go

示例7: ListRequestPreparer

// Create a Preparer by which to prepare the List request.
func (client LocalNetworkGatewaysClient) ListRequestPreparer() autorest.Preparer {
	return autorest.CreatePreparer(
		autorest.AsJSON(),
		autorest.AsGet(),
		autorest.WithBaseURL(client.BaseUri),
		autorest.WithPath("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways"))
}
开发者ID:Nepomuceno,项目名称:azure-sdk-for-go,代码行数:8,代码来源:localnetworkgateways.go

示例8: ListRequestPreparer

// Create a Preparer by which to prepare the List request.
func (client ProvidersClient) ListRequestPreparer() autorest.Preparer {
	return autorest.CreatePreparer(
		autorest.AsJSON(),
		autorest.AsGet(),
		autorest.WithBaseURL(client.BaseUri),
		autorest.WithPath("/subscriptions/{subscriptionId}/providers"))
}
开发者ID:ritazh,项目名称:azure_storage_service_broker,代码行数:8,代码来源:providers.go

示例9: UnregisterRequestPreparer

// Create a Preparer by which to prepare the Unregister request.
func (client ProvidersClient) UnregisterRequestPreparer() autorest.Preparer {
	return autorest.CreatePreparer(
		autorest.AsJSON(),
		autorest.AsPost(),
		autorest.WithBaseURL(client.BaseUri),
		autorest.WithPath("/subscriptions/{subscriptionId}/providers/{resourceProviderNamespace}/unregister"))
}
开发者ID:ritazh,项目名称:azure_storage_service_broker,代码行数:8,代码来源:providers.go

示例10: ListPreparer

// ListPreparer prepares the List request.
func (client VirtualMachineScaleSetVMsClient) ListPreparer(resourceGroupName string, virtualMachineScaleSetName string, filter string, selectParameter string, expand string) (*http.Request, error) {
	pathParameters := map[string]interface{}{
		"resourceGroupName":          url.QueryEscape(resourceGroupName),
		"subscriptionId":             url.QueryEscape(client.SubscriptionID),
		"virtualMachineScaleSetName": url.QueryEscape(virtualMachineScaleSetName),
	}

	queryParameters := map[string]interface{}{
		"api-version": APIVersion,
	}
	if len(filter) > 0 {
		queryParameters["$filter"] = filter
	}
	if len(selectParameter) > 0 {
		queryParameters["$select"] = selectParameter
	}
	if len(expand) > 0 {
		queryParameters["$expand"] = expand
	}

	return autorest.Prepare(&http.Request{},
		autorest.AsJSON(),
		autorest.AsGet(),
		autorest.WithBaseURL(client.BaseURI),
		autorest.WithPath("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines"),
		autorest.WithPathParameters(pathParameters),
		autorest.WithQueryParameters(queryParameters))
}
开发者ID:RMeharg,项目名称:prometheus,代码行数:29,代码来源:virtualmachinescalesetvms.go

示例11: GetRequestPreparer

// Create a Preparer by which to prepare the Get request.
func (client WorkflowTriggerHistoriesClient) GetRequestPreparer() autorest.Preparer {
	return autorest.CreatePreparer(
		autorest.AsJSON(),
		autorest.AsGet(),
		autorest.WithBaseURL(client.BaseUri),
		autorest.WithPath("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName}"))
}
开发者ID:Nepomuceno,项目名称:azure-sdk-for-go,代码行数:8,代码来源:workflowtriggerhistories.go

示例12: ListPreparer

// ListPreparer prepare the List request.
func (client VirtualMachineScaleSetVMsClient) ListPreparer(resourceGroupName string, virtualMachineScaleSetName string, filter *string, selectParameter *string, expand *string) (*http.Request, error) {
	pathParameters := map[string]interface{}{}

	pathParameters["resourceGroupName"] = url.QueryEscape(resourceGroupName)
	pathParameters["virtualMachineScaleSetName"] = url.QueryEscape(virtualMachineScaleSetName)

	pathParameters["subscriptionId"] = client.GetSubscriptionId()

	queryParameters := map[string]interface{}{}

	queryParameters["api-version"] = client.GetApiVersion()

	if filter != nil {
		queryParameters["$filter"] = filter
	}
	if selectParameter != nil {
		queryParameters["$select"] = selectParameter
	}
	if expand != nil {
		queryParameters["$expand"] = expand
	}

	return autorest.Prepare(&http.Request{},
		autorest.AsJSON(),
		autorest.AsGet(),
		autorest.WithBaseURL(client.BaseURI),
		autorest.WithPath("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines"),
		autorest.WithPathParameters(pathParameters),
		autorest.WithQueryParameters(queryParameters))

}
开发者ID:anuchandy,项目名称:swagger-generated,代码行数:32,代码来源:VirtualMachineScaleSetVMsClient.go

示例13: ListPreparer

// ListPreparer prepares the List request.
func (client VirtualMachineImagesClient) ListPreparer(location string, publisherName string, offer string, skus string, filter string, top *int, orderby string) (*http.Request, error) {
	pathParameters := map[string]interface{}{
		"location":       url.QueryEscape(location),
		"offer":          url.QueryEscape(offer),
		"publisherName":  url.QueryEscape(publisherName),
		"skus":           url.QueryEscape(skus),
		"subscriptionId": url.QueryEscape(client.SubscriptionID),
	}

	queryParameters := map[string]interface{}{
		"api-version": APIVersion,
	}
	if len(filter) > 0 {
		queryParameters["$filter"] = filter
	}
	if top != nil {
		queryParameters["$top"] = top
	}
	if len(orderby) > 0 {
		queryParameters["$orderby"] = orderby
	}

	return autorest.Prepare(&http.Request{},
		autorest.AsJSON(),
		autorest.AsGet(),
		autorest.WithBaseURL(client.BaseURI),
		autorest.WithPath("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions"),
		autorest.WithPathParameters(pathParameters),
		autorest.WithQueryParameters(queryParameters))
}
开发者ID:containerx,项目名称:machine,代码行数:31,代码来源:virtualmachineimages.go

示例14: RegenerateKeyRequestPreparer

// Create a Preparer by which to prepare the RegenerateKey request.
func (client StorageAccountsClient) RegenerateKeyRequestPreparer() autorest.Preparer {
	return autorest.CreatePreparer(
		autorest.AsJSON(),
		autorest.AsPost(),
		autorest.WithBaseURL(client.BaseUri),
		autorest.WithPath("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/regenerateKey"))
}
开发者ID:ritazh,项目名称:azure_storage_service_broker,代码行数:8,代码来源:storageaccounts.go

示例15: ListRequestPreparer

// Create a Preparer by which to prepare the List request.
func (client ResourceProviderOperationDetailsClient) ListRequestPreparer() autorest.Preparer {
	return autorest.CreatePreparer(
		autorest.AsJSON(),
		autorest.AsGet(),
		autorest.WithBaseURL(client.BaseUri),
		autorest.WithPath("/providers/{resourceProviderNamespace}/operations"))
}
开发者ID:ritazh,项目名称:azure_storage_service_broker,代码行数:8,代码来源:resourceprovideroperationdetails.go


注:本文中的github.com/Azure/go-autorest/autorest.WithPath函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。