Documentation
¶
Index ¶
- Constants
- func NewMsClientRequestIdPolicy() policy.Policy
- func NewMsCorrelationPolicy() policy.Policy
- func NewMsGraphCorrelationPolicy() policy.Policy
- func NewUserAgentPolicy(userAgent string) policy.Policy
- type DeployResponse
- type DeployStatus
- type DeployStatusResponse
- type FuncAppHostClient
- type PublishBuildSummary
- type PublishOptions
- type PublishResponse
- type PublishStatus
- type ZipDeployClient
- func (c *ZipDeployClient) BeginDeploy(ctx context.Context, zipFile io.ReadSeeker) (*runtime.Poller[*DeployResponse], error)
- func (c *ZipDeployClient) BeginDeployTrackStatus(ctx context.Context, zipFile io.ReadSeeker, ...) (...)
- func (c *ZipDeployClient) Deploy(ctx context.Context, zipFile io.ReadSeeker) (*DeployResponse, error)
- func (c *ZipDeployClient) DeployTrackStatus(ctx context.Context, zipFile io.ReadSeeker, subscriptionId string, ...) error
Constants ¶
const MsClientRequestIdHeader = "x-ms-client-request-id"
const MsCorrelationIdHeader = "x-ms-correlation-request-id"
Variables ¶
This section is empty.
Functions ¶
func NewMsClientRequestIdPolicy ¶
NewMsClientRequestIdPolicy creates a policy that sets the x-ms-client-request-id header on HTTP requests. This is used by Azure services to log and correlate individual requests for diagnostics.
func NewMsCorrelationPolicy ¶
NewMsCorrelationPolicy creates a policy that sets Microsoft correlation ID headers on HTTP requests. This works for Azure REST API, and could also work for other Microsoft-hosted services that do not yet honor distributed tracing.
func NewMsGraphCorrelationPolicy ¶
NewMsGraphCorrelationPolicy creates a policy that sets Microsoft Graph correlation ID headers on HTTP requests.
func NewUserAgentPolicy ¶
Policy to ensure the AZD custom user agent is set on all HTTP requests.
Types ¶
type DeployResponse ¶
type DeployResponse struct {
DeployStatus
}
type DeployStatus ¶
type DeployStatus struct {
Id string `json:"id"`
Status int `json:"status"`
StatusText string `json:"status_text"`
Message string `json:"message"`
Progress *string `json:"progress"`
ReceivedTime *time.Time `json:"received_time"`
StartTime *time.Time `json:"start_time"`
EndTime *time.Time `json:"end_time"`
Complete bool `json:"complete"`
Active bool `json:"active"`
LogUrl string `json:"log_url"`
SiteName string `json:"site_name"`
}
type DeployStatusResponse ¶
type DeployStatusResponse struct {
DeployStatus
}
type FuncAppHostClient ¶
type FuncAppHostClient struct {
// contains filtered or unexported fields
}
FuncAppHostClient contains methods for interacting with the Azure Functions application host, usually located at *.scm.azurewebsites.net
func NewFuncAppHostClient ¶
func NewFuncAppHostClient( hostName string, credential azcore.TokenCredential, options *arm.ClientOptions, ) (*FuncAppHostClient, error)
func (*FuncAppHostClient) Publish ¶
func (c *FuncAppHostClient) Publish( ctx context.Context, zipFile io.ReadSeeker, options *PublishOptions) (PublishResponse, error)
Publish deploys an application zip file to the function app host. This is currently only supported for flexconsumption plans.
type PublishBuildSummary ¶
type PublishOptions ¶
type PublishOptions struct {
// If true, the remote host will run Oryx remote build steps after publishing.
// This would run steps like `npm i` or `npm run build` for Node apps,
// or activating the virtual environment for Python apps.
RemoteBuild bool
}
type PublishResponse ¶
type PublishResponse struct {
Id string `json:"id"`
Status PublishStatus `json:"status"`
StatusText string `json:"status_text"`
AuthorEmail string `json:"author_email"`
Author string `json:"author"`
Deployer string `json:"deployer"`
RemoteBuild bool `json:"remoteBuild"`
Message string `json:"message"`
Progress string `json:"progress"`
ReceivedTime time.Time `json:"received_time"`
StartTime time.Time `json:"start_time"`
EndTime time.Time `json:"end_time"`
LastSuccessEndTime time.Time `json:"last_success_end_time"`
Complete bool `json:"complete"`
Active bool `json:"active"`
IsTemp bool `json:"is_temp"`
IsReadonly bool `json:"is_readonly"`
Url string `json:"url"`
LogUrl string `json:"log_url"`
SiteName string `json:"site_name"`
BuildSummary PublishBuildSummary `json:"build_summary"`
}
The response for a deployment located at api/deployments/{id} that represents the deployment initiated by api/publish.
type PublishStatus ¶
type PublishStatus int
const ( PublishStatusCancelled PublishStatus = -1 PublishStatusPending PublishStatus = 0 PublishStatusBuilding PublishStatus = 1 PublishStatusDeploying PublishStatus = 2 PublishStatusFailed PublishStatus = 3 PublishStatusSuccess PublishStatus = 4 PublishStatusConflict PublishStatus = 5 PublishStatusPartialSuccess PublishStatus = 6 )
type ZipDeployClient ¶
type ZipDeployClient struct {
// contains filtered or unexported fields
}
ZipDeployClient wraps usage of app service zip deploy used for application deployments More info can be found at the following: https://github.com/MicrosoftDocs/azure-docs/blob/main/includes/app-service-deploy-zip-push-rest.md https://github.com/projectkudu/kudu/wiki/REST-API
func NewZipDeployClient ¶
func NewZipDeployClient( hostName string, credential azcore.TokenCredential, armClientOptions *arm.ClientOptions, ) (*ZipDeployClient, error)
Creates a new ZipDeployClient instance
func (*ZipDeployClient) BeginDeploy ¶
func (c *ZipDeployClient) BeginDeploy( ctx context.Context, zipFile io.ReadSeeker, ) (*runtime.Poller[*DeployResponse], error)
Begins a zip deployment and returns a poller to check for status
func (*ZipDeployClient) BeginDeployTrackStatus ¶
func (c *ZipDeployClient) BeginDeployTrackStatus( ctx context.Context, zipFile io.ReadSeeker, subscriptionId, resourceGroup, appName string, ) (*runtime.Poller[armappservice.WebAppsClientGetProductionSiteDeploymentStatusResponse], error)
Deploys the specified application zip to the azure app service using deployment status api and waits for completion
func (*ZipDeployClient) Deploy ¶
func (c *ZipDeployClient) Deploy(ctx context.Context, zipFile io.ReadSeeker) (*DeployResponse, error)
Deploys the specified application zip to the azure app service and waits for completion
func (*ZipDeployClient) DeployTrackStatus ¶
func (c *ZipDeployClient) DeployTrackStatus( ctx context.Context, zipFile io.ReadSeeker, subscriptionId string, resourceGroup string, appName string, progressLog func(string)) error