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


Golang azure.WithErrorUnlessStatusCode函数代码示例

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


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

示例1: UpdateUserResponder

// UpdateUserResponder handles the response to the UpdateUser request. The method always
// closes the http.Response Body.
func (client ManagementClient) UpdateUserResponder(resp *http.Response) (result autorest.Response, err error) {
	err = autorest.Respond(
		resp,
		client.ByInspecting(),
		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound, http.StatusBadRequest),
		autorest.ByClosing())
	result.Response = resp
	return
}
开发者ID:garimakhulbe,项目名称:autorest,代码行数:11,代码来源:client.go

示例2: DeleteResponder

// DeleteResponder handles the response to the Delete request. The method always
// closes the http.Response Body.
func (client RouteTablesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
	err = autorest.Respond(
		resp,
		client.ByInspecting(),
		azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK, http.StatusAccepted),
		autorest.ByClosing())
	result.Response = resp
	return
}
开发者ID:RaulKite,项目名称:machine,代码行数:11,代码来源:routetables.go

示例3: MoveResourcesResponder

// MoveResourcesResponder handles the response to the MoveResources request. The method always
// closes the http.Response Body.
func (client GlobalResourceGroupsClient) MoveResourcesResponder(resp *http.Response) (result autorest.Response, err error) {
	err = autorest.Respond(
		resp,
		client.ByInspecting(),
		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
		autorest.ByClosing())
	result.Response = resp
	return
}
开发者ID:daemonfire300,项目名称:azure-sdk-for-go,代码行数:11,代码来源:globalresourcegroups.go

示例4: ListEffectiveNetworkSecurityGroupsResponder

// ListEffectiveNetworkSecurityGroupsResponder handles the response to the ListEffectiveNetworkSecurityGroups request. The method always
// closes the http.Response Body.
func (client InterfacesClient) ListEffectiveNetworkSecurityGroupsResponder(resp *http.Response) (result autorest.Response, err error) {
	err = autorest.Respond(
		resp,
		client.ByInspecting(),
		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
		autorest.ByClosing())
	result.Response = resp
	return
}
开发者ID:BSick7,项目名称:terraform,代码行数:11,代码来源:interfaces.go

示例5: CreateOrUpdateResponder

// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
// closes the http.Response Body.
func (client VirtualMachineExtensionsClient) CreateOrUpdateResponder(resp *http.Response) (result autorest.Response, err error) {
	err = autorest.Respond(
		resp,
		client.ByInspecting(),
		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
		autorest.ByClosing())
	result.Response = resp
	return
}
开发者ID:CodeJuan,项目名称:kubernetes,代码行数:11,代码来源:virtualmachineextensions.go

示例6: PowerOffResponder

// PowerOffResponder handles the response to the PowerOff request. The method always
// closes the http.Response Body.
func (client VirtualMachinesClient) PowerOffResponder(resp *http.Response) (result autorest.Response, err error) {
	err = autorest.Respond(
		resp,
		client.ByInspecting(),
		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
		autorest.ByClosing())
	result.Response = resp
	return
}
开发者ID:containerx,项目名称:machine,代码行数:11,代码来源:virtualmachines.go

示例7: DeleteAuthorizationRuleResponder

// DeleteAuthorizationRuleResponder handles the response to the DeleteAuthorizationRule request. The method always
// closes the http.Response Body.
func (client Client) DeleteAuthorizationRuleResponder(resp *http.Response) (result autorest.Response, err error) {
	err = autorest.Respond(
		resp,
		client.ByInspecting(),
		azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK),
		autorest.ByClosing())
	result.Response = resp
	return
}
开发者ID:colemickens,项目名称:azure-sdk-for-go,代码行数:11,代码来源:notificationhubs.go

示例8: CreateOrUpdateResponder

// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
// closes the http.Response Body.
func (client SecurityAlertPolicyClient) CreateOrUpdateResponder(resp *http.Response) (result autorest.Response, err error) {
	err = autorest.Respond(
		resp,
		client.ByInspecting(),
		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
		autorest.ByClosing())
	result.Response = resp
	return
}
开发者ID:garimakhulbe,项目名称:azure-sdk-for-go,代码行数:11,代码来源:securityalertpolicy.go

示例9: DeleteIfExistsResponder

// DeleteIfExistsResponder handles the response to the DeleteIfExists request. The method always
// closes the http.Response Body.
func (client CustomDomainsClient) DeleteIfExistsResponder(resp *http.Response) (result autorest.Response, err error) {
	err = autorest.Respond(
		resp,
		client.ByInspecting(),
		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
		autorest.ByClosing())
	result.Response = resp
	return
}
开发者ID:RezaDKhan,项目名称:terraform,代码行数:11,代码来源:customdomains.go

示例10: AddAppForMAMPolicyResponder

// AddAppForMAMPolicyResponder handles the response to the AddAppForMAMPolicy request. The method always
// closes the http.Response Body.
func (client AndroidClient) AddAppForMAMPolicyResponder(resp *http.Response) (result autorest.Response, err error) {
	err = autorest.Respond(
		resp,
		client.ByInspecting(),
		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
		autorest.ByClosing())
	result.Response = resp
	return
}
开发者ID:daemonfire300,项目名称:azure-sdk-for-go,代码行数:11,代码来源:android.go

示例11: ListRoutesTableSummaryResponder

// ListRoutesTableSummaryResponder handles the response to the ListRoutesTableSummary request. The method always
// closes the http.Response Body.
func (client ExpressRouteCircuitsClient) ListRoutesTableSummaryResponder(resp *http.Response) (result autorest.Response, err error) {
	err = autorest.Respond(
		resp,
		client.ByInspecting(),
		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
		autorest.ByClosing())
	result.Response = resp
	return
}
开发者ID:curiositycasualty,项目名称:packer,代码行数:11,代码来源:expressroutecircuits.go

示例12: PurgeContentResponder

// PurgeContentResponder handles the response to the PurgeContent request. The method always
// closes the http.Response Body.
func (client EndpointsClient) PurgeContentResponder(resp *http.Response) (result autorest.Response, err error) {
	err = autorest.Respond(
		resp,
		client.ByInspecting(),
		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
		autorest.ByClosing())
	result.Response = resp
	return
}
开发者ID:RezaDKhan,项目名称:terraform,代码行数:11,代码来源:endpoints.go

示例13: AddPetResponder

// AddPetResponder handles the response to the AddPet request. The method always
// closes the http.Response Body.
func (client ManagementClient) AddPetResponder(resp *http.Response) (result autorest.Response, err error) {
	err = autorest.Respond(
		resp,
		client.ByInspecting(),
		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusMethodNotAllowed),
		autorest.ByClosing())
	result.Response = resp
	return
}
开发者ID:garimakhulbe,项目名称:autorest,代码行数:11,代码来源:client.go

示例14: LogoutUserResponder

// LogoutUserResponder handles the response to the LogoutUser request. The method always
// closes the http.Response Body.
func (client ManagementClient) LogoutUserResponder(resp *http.Response) (result autorest.Response, err error) {
	err = autorest.Respond(
		resp,
		client.ByInspecting(),
		azure.WithErrorUnlessStatusCode(http.StatusOK),
		autorest.ByClosing())
	result.Response = resp
	return
}
开发者ID:garimakhulbe,项目名称:autorest,代码行数:11,代码来源:client.go

示例15: SynchronizeAutoStorageKeysResponder

// SynchronizeAutoStorageKeysResponder handles the response to the SynchronizeAutoStorageKeys request. The method always
// closes the http.Response Body.
func (client AccountClient) SynchronizeAutoStorageKeysResponder(resp *http.Response) (result autorest.Response, err error) {
	err = autorest.Respond(
		resp,
		client.ByInspecting(),
		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
		autorest.ByClosing())
	result.Response = resp
	return
}
开发者ID:colemickens,项目名称:azure-sdk-for-go,代码行数:11,代码来源:account.go


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