當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。