contracts

package
v0.0.0-...-059d9f2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 1, 2026 License: MIT Imports: 5 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	DependencyConnector   = "connector"
	DependencyNetworkList = "network_list"
)

Dependency types of a Function.

View Source
const (
	PhaseRequest  = "request"
	PhaseResponse = "response"
)

Rule phases of an Application.

View Source
const ManifestVersionV6 = 6

ManifestVersionV6 is the "version" of a manifest the bundler writes with --config-version 6.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	Address string `json:"address"`
	Weight  int    `json:"weight,omitempty"`
}

type ApplicationAcceleratorSettings

type ApplicationAcceleratorSettings struct {
	CacheVaryByMethod      []string                  `json:"cache_vary_by_method,omitempty"`
	CacheVaryByQuerystring *QuerystringCacheSettings `json:"cache_vary_by_querystring,omitempty"`
	CacheVaryByCookies     *CookiesCacheSettings     `json:"cache_vary_by_cookies,omitempty"`
	CacheVaryByDevices     *DevicesCacheSettings     `json:"cache_vary_by_devices,omitempty"`
}

type Applications

type Applications struct {
	Name               string                             `json:"name"`
	Modules            *edgesdk.ApplicationModulesRequest `json:"modules,omitempty"`
	Active             *bool                              `json:"active,omitempty"`
	Debug              *bool                              `json:"debug,omitempty"`
	Rules              []ManifestRulesEngine              `json:"rules"`
	CacheSettings      []ManifestCacheSetting             `json:"cache_settings"`
	FunctionsInstances []FunctionInstance                 `json:"functions_instances,omitempty"`
}

type AzionApplicationOptions

type AzionApplicationOptions struct {
	Test          func(path string) error      `json:"-"`
	Name          string                       `json:"name"`
	Bucket        string                       `json:"bucket"`
	Preset        string                       `json:"preset"` // framework: react, next, vue, angular and etc
	Env           string                       `json:"env"`
	Prefix        string                       `json:"prefix"`
	RotatePrefix  *bool                        `json:"rotate-prefix,omitempty"`
	SkipDeletion  *bool                        `json:"skip-deletion,omitempty"`
	NotFirstRun   bool                         `json:"not-first-run,omitempty"`
	Function      []AzionJsonDataFunction      `json:"function"`
	Application   AzionJsonDataApplication     `json:"application"`
	Domain        AzionJsonDataDomain          `json:"domain"`
	RtPurge       AzionJsonDataPurge           `json:"rt-purge"`
	Origin        []AzionJsonDataOrigin        `json:"origin"`
	RulesEngine   AzionJsonDataRulesEngine     `json:"rules-engine"`
	CacheSettings []AzionJsonDataCacheSettings `json:"cache-settings"`
	Workloads     AzionJsonDataWorkload        `json:"workloads"`
	Connectors    []AzionJsonDataConnectors    `json:"connectors"`
	Firewalls     []AzionJsonDataFirewall      `json:"firewalls,omitempty"`
}

type AzionApplicationOptionsV3

type AzionApplicationOptionsV3 struct {
	Test          func(path string) error      `json:"-"`
	Name          string                       `json:"name"`
	Bucket        string                       `json:"bucket"`
	Preset        string                       `json:"preset"` // framework: react, next, vue, angular and etc
	Env           string                       `json:"env"`
	Prefix        string                       `json:"prefix"`
	RotatePrefix  *bool                        `json:"rotate-prefix,omitempty"`
	SkipDeletion  *bool                        `json:"skip-deletion,omitempty"`
	NotFirstRun   bool                         `json:"not-first-run"`
	Function      AzionJsonDataFunction        `json:"function"`
	Application   AzionJsonDataApplication     `json:"application"`
	Domain        AzionJsonDataDomain          `json:"domain"`
	RtPurge       AzionJsonDataPurge           `json:"rt-purge"`
	Origin        []AzionJsonDataOrigin        `json:"origin"`
	RulesEngine   AzionJsonDataRulesEngine     `json:"rules-engine"`
	CacheSettings []AzionJsonDataCacheSettings `json:"cache-settings"`
}

type AzionApplicationOptionsV6

type AzionApplicationOptionsV6 struct {
	Test         func(path string) error `json:"-"`
	Name         string                  `json:"name"`
	Bucket       string                  `json:"bucket"`
	Preset       string                  `json:"preset"`
	Env          string                  `json:"env"`
	Prefix       string                  `json:"prefix"`
	RotatePrefix *bool                   `json:"rotate-prefix,omitempty"`
	NotFirstRun  bool                    `json:"not-first-run,omitempty"`

	// Environments and Deployments are the ones the manifest declares, by
	// name, with the ids this project resolved them to.
	Environments []AzionJsonV6Environment `json:"environments,omitempty"`
	Deployments  []AzionJsonV6Deployment  `json:"deployments,omitempty"`
	Workloads    []AzionJsonV6Workload    `json:"workloads,omitempty"`

	Applications []AzionJsonV6Resource `json:"applications,omitempty"`
	Functions    []AzionJsonV6Resource `json:"functions,omitempty"`
	Connectors   []AzionJsonV6Resource `json:"connectors,omitempty"`
	Firewalls    []AzionJsonV6Resource `json:"firewalls,omitempty"`
	CustomPages  []AzionJsonV6Resource `json:"custom-pages,omitempty"`
	NetworkLists []AzionJsonV6Resource `json:"network-lists,omitempty"`
	WAFs         []AzionJsonV6Resource `json:"wafs,omitempty"`
}

AzionApplicationOptionsV6 is azion.json for a v6 project. It is written after every step, so a run that stops halfway leaves enough to continue from.

type AzionApplicationSimple

type AzionApplicationSimple struct {
	Name        string                   `json:"name"`
	Type        string                   `json:"type"`
	Domain      AzionJsonDataDomain      `json:"domain"`
	Application AzionJsonDataApplication `json:"application"`
}

type AzionConfig

type AzionConfig struct {
	FileName    string `json:"file_name"`
	FileContent string `json:"file_content"`
}

type AzionJsonDataApplication

type AzionJsonDataApplication struct {
	ID   int64  `json:"id"`
	Name string `json:"name"`
}

type AzionJsonDataCacheSettings

type AzionJsonDataCacheSettings struct {
	Id   int64  `json:"id"`
	Name string `json:"name"`
}

type AzionJsonDataConnectors

type AzionJsonDataConnectors struct {
	Id      int64             `json:"id"`
	Name    string            `json:"name"`
	Address []edgesdk.Address `json:"address,omitempty"`
}

type AzionJsonDataDomain

type AzionJsonDataDomain struct {
	Id         int64  `json:"id"`
	Name       string `json:"name"`
	DomainName string `json:"domain_name"`
	Url        string `json:"url"`
}

type AzionJsonDataFirewall

type AzionJsonDataFirewall struct {
	Id                int64                                   `json:"id"`
	Name              string                                  `json:"name"`
	Rules             []AzionJsonDataFirewallRule             `json:"rules,omitempty"`
	FunctionInstances []AzionJsonDataFirewallFunctionInstance `json:"function_instances,omitempty"`
}

type AzionJsonDataFirewallFunctionInstance

type AzionJsonDataFirewallFunctionInstance struct {
	Id         int64                  `json:"id"`
	Name       string                 `json:"name"`
	FunctionId int64                  `json:"function_id"`
	Args       map[string]interface{} `json:"args,omitempty"`
	Active     bool                   `json:"active"`
}

AzionJsonDataFirewallFunctionInstance represents a firewall function instance in azion.json

type AzionJsonDataFirewallRule

type AzionJsonDataFirewallRule struct {
	Id   int64  `json:"id"`
	Name string `json:"name"`
}

type AzionJsonDataFunction

type AzionJsonDataFunction struct {
	ID           int64  `json:"id"`
	Name         string `json:"name"`
	File         string `json:"file"`
	Args         string `json:"args"`
	InstanceID   int64  `json:"instance-id"`
	InstanceName string `json:"instance-name"`
	CacheId      int64  `json:"cache-id"`
}

type AzionJsonDataOrigin

type AzionJsonDataOrigin struct {
	OriginId  int64    `json:"origin-id"`
	OriginKey string   `json:"origin-key"`
	Name      string   `json:"name"`
	Address   []string `json:"address,omitempty"`
}

type AzionJsonDataPurge

type AzionJsonDataPurge struct {
	PurgeOnPublish bool `json:"purge_on_publish"`
}

type AzionJsonDataRules

type AzionJsonDataRules struct {
	Id    int64  `json:"id"`
	Name  string `json:"name"`
	Phase string `json:"phase"`
}

type AzionJsonDataRulesEngine

type AzionJsonDataRulesEngine struct {
	Created bool                 `json:"created"`
	Rules   []AzionJsonDataRules `json:"rules"`
}

type AzionJsonDataWorkload

type AzionJsonDataWorkload struct {
	Id          int64         `json:"id"`
	Name        string        `json:"name"`
	Domains     []string      `json:"domains"`
	Url         string        `json:"url"`
	Deployments []Deployments `json:"deployment_id"`
}

type AzionJsonV6Deployment

type AzionJsonV6Deployment struct {
	ID      int64              `json:"id"`
	Name    string             `json:"name"`
	Policy  string             `json:"policy,omitempty"`
	Release AzionJsonV6Release `json:"release"`
}

AzionJsonV6Deployment is one Deployment of the project and the last release the CLI made on it.

type AzionJsonV6Environment

type AzionJsonV6Environment struct {
	ID     int64  `json:"id"`
	Name   string `json:"name"`
	Policy string `json:"policy,omitempty"`
}

type AzionJsonV6Release

type AzionJsonV6Release struct {
	ID        string `json:"id,omitempty"`
	State     string `json:"state,omitempty"`
	Activated bool   `json:"activated,omitempty"`
}

type AzionJsonV6Resource

type AzionJsonV6Resource struct {
	ID           int64  `json:"id"`
	Name         string `json:"name"`
	VersionID    string `json:"version-id,omitempty"`
	VersionState string `json:"version-state,omitempty"`
}

AzionJsonV6Resource is one versioned resource the project owns: which one, and the version this project last wrote or built.

type AzionJsonV6Workload

type AzionJsonV6Workload struct {
	ID   int64  `json:"id"`
	Name string `json:"name"`
	Url  string `json:"url,omitempty"`
	// WorkloadDomainUrl is the Workload's own domain, when it differs from Url.
	WorkloadDomainUrl string `json:"workload_domain_url,omitempty"`
}

type BrowserCacheSettings

type BrowserCacheSettings struct {
	Behavior string `json:"behavior,omitempty"`
	MaxAge   int64  `json:"max_age,omitempty"`
}

type Build

type Build struct {
	Preset    string    `json:"preset,omitempty"`
	Polyfills bool      `json:"polyfills,omitempty"`
	Bundler   string    `json:"bundler,omitempty"`
	Worker    bool      `json:"worker,omitempty"`
	MemoryFS  *MemoryFS `json:"memoryFS,omitempty"`
}

type BuildInfo

type BuildInfo struct {
	Preset        string
	Entry         string
	NodePolyfills string
	OwnWorker     string
	ProjectPath   string
	SkipFramework bool
	AliasEnv      bool
	ConfigFile    string
}

type BuildInfoV3

type BuildInfoV3 struct {
	Preset        string
	Entry         string
	NodePolyfills string
	OwnWorker     string
	ProjectPath   string
	IsFirewall    bool
	AliasEnv      bool
}

type CacheSetting

type CacheSetting struct {
	Name                           *string  `json:"name,omitempty"`
	BrowserCacheSettings           *string  `json:"browser_cache_settings,omitempty"`
	BrowserCacheSettingsMaximumTtl *int64   `json:"browser_cache_settings_maximum_ttl,omitempty"`
	CdnCacheSettings               *string  `json:"cdn_cache_settings,omitempty"`
	CdnCacheSettingsMaximumTtl     *int64   `json:"cdn_cache_settings_maximum_ttl,omitempty"`
	CacheByQueryString             *string  `json:"cache_by_query_string,omitempty"`
	QueryStringFields              []string `json:"query_string_fields,omitempty"`
	EnableQueryStringSort          *bool    `json:"enable_query_string_sort,omitempty"`
	CacheByCookies                 *string  `json:"cache_by_cookies,omitempty"`
	CookieNames                    []string `json:"cookie_names,omitempty"`
	AdaptiveDeliveryAction         *string  `json:"adaptive_delivery_action,omitempty"`
	DeviceGroup                    []int32  `json:"device_group,omitempty"`
	EnableCachingForPost           *bool    `json:"enable_caching_for_post,omitempty"`
	L2CachingEnabled               *bool    `json:"l2_caching_enabled,omitempty"`
	IsSliceConfigurationEnabled    *bool    `json:"is_slice_configuration_enabled,omitempty"`
	IsSliceEdgeCachingEnabled      *bool    `json:"is_slice_edge_caching_enabled,omitempty"`
	IsSliceL2CachingEnabled        *bool    `json:"is_slice_l2_caching_enabled,omitempty"`
	SliceConfigurationRange        *int64   `json:"slice_configuration_range,omitempty"`
	EnableCachingForOptions        *bool    `json:"enable_caching_for_options,omitempty"`
	EnableStaleCache               *bool    `json:"enable_stale_cache,omitempty"`
	L2Region                       *string  `json:"l2_region,omitempty"`
}

type CacheSettingManifest

type CacheSettingManifest struct {
	Name         string                `json:"name"`
	BrowserCache *BrowserCacheSettings `json:"browser_cache,omitempty"`
	Modules      *CacheSettingModules  `json:"modules,omitempty"`
}

type CacheSettingModules

type CacheSettingModules struct {
	EdgeCache              *EdgeCacheSettings              `json:"edge_cache,omitempty"`
	TieredCache            *TieredCacheSettings            `json:"tiered_cache,omitempty"`
	ApplicationAccelerator *ApplicationAcceleratorSettings `json:"application_accelerator,omitempty"`
}

type CookiesCacheSettings

type CookiesCacheSettings struct {
	Behavior    string   `json:"behavior,omitempty"`
	CookieNames []string `json:"cookie_names,omitempty"`
}

type Deployments

type Deployments struct {
	Id   int64  `json:"id"`
	Name string `json:"name"`
}

type DescribeOptions

type DescribeOptions struct {
	OutPath string
	Format  string
}

type DevicesCacheSettings

type DevicesCacheSettings struct {
	Behavior    string   `json:"behavior,omitempty"`
	DeviceGroup []string `json:"device_group,omitempty"`
}

type Domains

type Domains struct {
	Name                       string   `json:"name,omitempty"`
	Cnames                     []string `json:"cnames,omitempty"`
	CnameAccessOnly            *bool    `json:"cname_access_only,omitempty"`
	IsActive                   *bool    `json:"is_active,omitempty"`
	EdgeApplicationId          int64    `json:"edge_application_id,omitempty"`
	DigitalCertificateId       *string  `json:"digital_certificate_id,omitempty"`
	Environment                *string  `json:"environment,omitempty"`
	IsMtlsEnabled              *bool    `json:"is_mtls_enabled,omitempty"`
	MtlsTrustedCaCertificateId int64    `json:"mtls_trusted_ca_certificate_id,omitempty"`
	EdgeFirewallId             int64    `json:"edge_firewall_id,omitempty"`
	MtlsVerification           *string  `json:"mtls_verification,omitempty"`
	CrlList                    []int64  `json:"crl_list,omitempty"`
}

type EdgeCacheSettings

type EdgeCacheSettings struct {
	Behavior       string                  `json:"behavior,omitempty"`
	MaxAge         int64                   `json:"max_age,omitempty"`
	StaleCache     *StaleCacheSettings     `json:"stale_cache,omitempty"`
	LargeFileCache *LargeFileCacheSettings `json:"large_file_cache,omitempty"`
}

type ErrorDetails

type ErrorDetails struct {
	Error   int    `json:"error"`
	Message string `json:"message"`
	Stack   string `json:"stack"`
}

type FileOps

type FileOps struct {
	Path        string
	MimeType    string
	FileContent *os.File
	VersionID   string
}

type FirewallManifest

type FirewallManifest struct {
	Name               string                          `json:"name"`
	Modules            *edgesdk.FirewallModulesRequest `json:"modules,omitempty"`
	Debug              *bool                           `json:"debug,omitempty"`
	Active             *bool                           `json:"active,omitempty"`
	RulesEngine        []FirewallManifestRule          `json:"rules_engine,omitempty"`
	FunctionsInstances []FunctionInstance              `json:"functions_instances,omitempty"`
}

type FirewallManifestBehavior

type FirewallManifestBehavior struct {
	Type       string                 `json:"type"`
	Attributes map[string]interface{} `json:"attributes,omitempty"`
}

FirewallManifestBehavior represents a firewall behavior in the manifest.json file.

type FirewallManifestCriterion

type FirewallManifestCriterion struct {
	Variable    string      `json:"variable"`
	Operator    string      `json:"operator"`
	Conditional string      `json:"conditional"`
	Argument    interface{} `json:"argument,omitempty"`
}

FirewallManifestCriterion represents a firewall criterion in the manifest.json file.

type FirewallManifestRule

type FirewallManifestRule struct {
	Name        string                        `json:"name"`
	Active      *bool                         `json:"active,omitempty"`
	Criteria    [][]FirewallManifestCriterion `json:"criteria"`
	Behaviors   []FirewallManifestBehavior    `json:"behaviors"`
	Description *string                       `json:"description,omitempty"`
}

FirewallManifestRule represents a firewall rule in the manifest.json file using plain Go types to avoid strict SDK deserialization issues.

type Function

type Function struct {
	Name                 string                 `json:"name"`
	Path                 string                 `json:"path"`
	Runtime              string                 `json:"runtime,omitempty"`               // azion_js, etc.
	DefaultArgs          map[string]interface{} `json:"default_args,omitempty"`          // Default arguments
	ExecutionEnvironment string                 `json:"execution_environment,omitempty"` // application, etc.
	Active               bool                   `json:"active,omitempty"`                // Whether the function is active
	Bindings             FunctionBindings       `json:"bindings,omitempty"`              // Function bindings
	// Keep the old fields for backward compatibility
	Argument string `json:"argument,omitempty"`
}

type FunctionBindings

type FunctionBindings struct {
	Storage StorageBinding `json:"storage,omitempty"`
}

type FunctionInstance

type FunctionInstance struct {
	Name     string                 `json:"name"`
	Function FunctionReference      `json:"function"`
	Active   bool                   `json:"active"`
	Args     map[string]interface{} `json:"args,omitempty"`
}

type FunctionReference

type FunctionReference struct {
	Name string
	ID   int64
}

FunctionReference represents a function reference that can be either a name (string) or an ID (int64)

func (FunctionReference) MarshalJSON

func (fr FunctionReference) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler for FunctionReference

func (*FunctionReference) UnmarshalJSON

func (fr *FunctionReference) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler for FunctionReference It accepts both a string (function name) or a number (function ID)

type LargeFileCacheSettings

type LargeFileCacheSettings struct {
	Enabled bool  `json:"enabled"`
	Offset  int64 `json:"offset,omitempty"`
}

type ListOptions

type ListOptions struct {
	Details           bool
	OrderBy           string
	Sort              string
	Page              int64
	PageSize          int64
	NextPage          bool
	Filter            string
	ContinuationToken string
}

type LogEntry

type LogEntry struct {
	Content   string `json:"content,omitempty"`
	Timestamp string `json:"timestamp,omitempty"`
}

LogEntry represents each log entry with content and timestamp.

type Logs

type Logs struct {
	Status string     `json:"status"`
	Logs   []LogEntry `json:"logs"`
}

StatusResponse represents the overall status and logs of the deployment process.

type Manifest

type Manifest struct {
	CacheSettings []CacheSetting `json:"cache"`
	Origins       []Origin       `json:"origin"`
	Rules         []RuleEngine   `json:"rules"`
	Domain        *Domains       `json:"domain,omitempty"`
	Purge         []Purges       `json:"purge"`
}

type ManifestCacheSetting

type ManifestCacheSetting struct {
	Name         string                               `json:"name"`
	BrowserCache *edgesdk.BrowserCacheModuleRequest   `json:"browser_cache,omitempty"`
	Modules      *edgesdk.CacheSettingsModulesRequest `json:"modules,omitempty"`
}

type ManifestRule

type ManifestRule struct {
	Name        string                                       `json:"name"`
	Description string                                       `json:"description,omitempty"`
	Active      bool                                         `json:"active,omitempty"`
	Criteria    [][]edgesdk.ApplicationCriterionFieldRequest `json:"criteria"`
	Behaviors   []ManifestRuleBehavior                       `json:"behaviors"`
}

ManifestRule represents a rule in the manifest.json file

type ManifestRuleBehavior

type ManifestRuleBehavior struct {
	Type       string                 `json:"type,omitempty"`
	Attributes map[string]interface{} `json:"attributes,omitempty"`
}

ManifestRuleBehavior represents a behavior in a rule

type ManifestRulesEngine

type ManifestRulesEngine struct {
	Phase string       `json:"phase"`
	Rule  ManifestRule `json:"rule"`
}

ManifestRulesEngine represents a rule engine entry in the manifest.json file

type ManifestV4

type ManifestV4 struct {
	Build               Build                      `json:"build"`
	Storage             []StorageManifest          `json:"storage"`
	Functions           []Function                 `json:"functions"`
	Applications        []Applications             `json:"applications"`
	Connectors          []edgesdk.ConnectorRequest `json:"connectors"`
	Workloads           []WorkloadManifest         `json:"workloads"`
	WorkloadDeployments []WorkloadDeployment       `json:"workload_deployments,omitempty"`
	Firewalls           []FirewallManifest         `json:"firewall,omitempty"`
	Purge               []PurgeManifest            `json:"purge"`
}

type ManifestV6

type ManifestV6 struct {
	Version int               `json:"version"`
	Build   Build             `json:"build"`
	Storage []StorageManifest `json:"storage,omitempty"`

	Functions    []ManifestV6Function             `json:"functions,omitempty"`
	Connectors   []sdkv6.ConnectorRequest         `json:"connectors,omitempty"`
	NetworkLists []sdkv6.NetworkListRequest       `json:"network_list,omitempty"`
	WAFs         []ManifestV6WAF                  `json:"waf,omitempty"`
	Applications []ManifestV6Application          `json:"applications,omitempty"`
	Firewalls    []ManifestV6Firewall             `json:"firewall,omitempty"`
	CustomPages  []json.RawMessage                `json:"custom_pages,omitempty"`
	Environments []sdkv6.EnvironmentCreateRequest `json:"environments,omitempty"`
	Deployments  []sdkv6.DeploymentCreateRequest  `json:"deployments,omitempty"`
	Workloads    []ManifestV6Workload             `json:"workloads,omitempty"`
	Purge        []PurgeManifest                  `json:"purge,omitempty"`
}

ManifestV6 is .edge/manifest.json for a v6 project, as the bundler writes it with --config-version 6 (@aziontech/config, branch feat/config-api-v6).

Resource bodies follow the v6 API requests, except that wherever the API takes the id of another resource the project declares, the manifest gives its name and the CLI resolves it once the target exists:

  • functions_instances[].function: a Function;
  • rule behaviors: run_function (a Function, run through the instance of it in the same Application or Firewall), set_cache_policy (a cache setting), set_connector (a Connector), set_waf.waf_id (a WAF);
  • firewall criteria is_in_list / is_not_in_list: a Network List;
  • custom_pages[].pages[].page.attributes.connector: a Connector;
  • workloads[].bindings[]: environment_name and deployment_name.

Rules and custom pages are kept as raw JSON for that reason: they are only decoded into SDK types after the names are replaced.

The link between a Deployment and the Application, Firewall and Custom Page it serves is not in the manifest: the CLI makes it with a release. A release serves at most one of each, so the manifest may declare at most one of each.

type ManifestV6Application

type ManifestV6Application struct {
	Name              string                           `json:"name"`
	Modules           *sdkv6.ApplicationModulesRequest `json:"modules,omitempty"`
	Debug             *bool                            `json:"debug,omitempty"`
	CacheSettings     []sdkv6.CacheSettingRequest      `json:"cache_settings,omitempty"`
	DeviceGroups      []sdkv6.DeviceGroupRequest       `json:"device_groups,omitempty"`
	FunctionInstances []ManifestV6FunctionInstance     `json:"functions_instances,omitempty"`
	// Rules are request and response rules in one list, in order; Phase
	// says which.
	Rules []ManifestV6Rule `json:"rules,omitempty"`
}

type ManifestV6Binding

type ManifestV6Binding struct {
	EnvironmentName string             `json:"environment_name"`
	DeploymentName  string             `json:"deployment_name"`
	Domains         []ManifestV6Domain `json:"domains,omitempty"`
}

ManifestV6Binding serves a Deployment in an Environment, on some domains. Both are named; the CLI resolves them to the ids it created.

type ManifestV6Dependency

type ManifestV6Dependency struct {
	Type string            `json:"type"`
	ID   FunctionReference `json:"id"`
}

ManifestV6Dependency is a Connector or Network List a Function depends on. ID is the resource's name, resolved by the CLI, or its id.

type ManifestV6Domain

type ManifestV6Domain struct {
	Domain      string `json:"domain"`
	Certificate *int64 `json:"certificate,omitempty"`
}

ManifestV6Domain is a domain a binding answers on, with the id of the certificate to serve or none.

type ManifestV6Firewall

type ManifestV6Firewall struct {
	Name              string                        `json:"name"`
	Modules           *sdkv6.FirewallModulesRequest `json:"modules,omitempty"`
	Debug             *bool                         `json:"debug,omitempty"`
	FunctionInstances []ManifestV6FunctionInstance  `json:"functions_instances,omitempty"`
	Rules             []json.RawMessage             `json:"rules_engine,omitempty"`
}

type ManifestV6Function

type ManifestV6Function struct {
	Name                 string                 `json:"name"`
	Path                 string                 `json:"path"`
	Runtime              string                 `json:"runtime,omitempty"`
	ExecutionEnvironment string                 `json:"execution_environment,omitempty"`
	DefaultArgs          map[string]interface{} `json:"default_args,omitempty"`
	// Dependencies are the Connectors and Network Lists the Function's code
	// uses; each names one the manifest declares, or gives an existing id.
	Dependencies []ManifestV6Dependency `json:"dependencies,omitempty"`
}

ManifestV6Function is a Function whose code is a file of the build output.

type ManifestV6FunctionInstance

type ManifestV6FunctionInstance struct {
	Name     string                 `json:"name"`
	Function FunctionReference      `json:"function"`
	Args     map[string]interface{} `json:"args,omitempty"`
}

ManifestV6FunctionInstance names the Function it runs; FunctionReference accepts either the Function's name or its id.

type ManifestV6Rule

type ManifestV6Rule struct {
	Phase string          `json:"phase"`
	Rule  json.RawMessage `json:"rule"`
}

type ManifestV6WAF

type ManifestV6WAF struct {
	Name           string                               `json:"name"`
	EngineSettings *sdkv6.WAFEngineSettingsFieldRequest `json:"engine_settings,omitempty"`
	Exceptions     []sdkv6.WAFRuleRequest               `json:"exceptions,omitempty"`
}

type ManifestV6Workload

type ManifestV6Workload struct {
	Name                      string                    `json:"name"`
	Infrastructure            *int32                    `json:"infrastructure,omitempty"`
	WorkloadDomainAllowAccess *bool                     `json:"workload_domain_allow_access,omitempty"`
	Tls                       *sdkv6.TLSWorkloadRequest `json:"tls,omitempty"`
	Protocols                 *sdkv6.ProtocolsRequest   `json:"protocols,omitempty"`
	Mtls                      *sdkv6.MTLSRequest        `json:"mtls,omitempty"`
	Bindings                  []ManifestV6Binding       `json:"bindings,omitempty"`
}

type MemoryFS

type MemoryFS struct {
	InjectionDirs    []string `json:"injectionDirs,omitempty"`
	RemovePathPrefix string   `json:"removePathPrefix,omitempty"`
}

type Modules

type Modules struct {
	EdgeCacheEnabled              *bool `json:"edge_cache_enabled,omitempty"`
	EdgeFunctionsEnabled          *bool `json:"edge_functions_enabled,omitempty"`
	ApplicationAcceleratorEnabled *bool `json:"application_accelerator_enabled,omitempty"`
	ImageProcessorEnabled         *bool `json:"image_processor_enabled,omitempty"`
	TieredCacheEnabled            *bool `json:"tiered_cache_enabled,omitempty"`
}

type Origin

type Origin struct {
	Name                 string    `json:"name"`
	OriginType           string    `json:"origin_type,omitempty"`
	Bucket               string    `json:"bucket,omitempty"`
	Prefix               string    `json:"prefix,omitempty"`
	Addresses            []Address `json:"addresses,omitempty"`
	HostHeader           string    `json:"host_header,omitempty"`
	OriginProtocolPolicy *string   `json:"origin_protocol_policy,omitempty"`
	OriginPath           *string   `json:"origin_path,omitempty"`
	HmacAuthentication   *bool     `json:"hmac_authentication,omitempty"`
	HmacRegionName       *string   `json:"hmac_region_name,omitempty"`
	HmacAccessKey        *string   `json:"hmac_access_key,omitempty"`
	HmacSecretKey        *string   `json:"hmac_secret_key,omitempty"`
}

type PurgeManifest

type PurgeManifest struct {
	Items []string `json:"items"`
	Layer *string  `json:"layer,omitempty"`
	Type  string   `json:"type"`
}

type Purges

type Purges struct {
	Type   string   `json:"type"`
	Urls   []string `json:"urls"`
	Method string   `json:"method"`
}

type QuerystringCacheSettings

type QuerystringCacheSettings struct {
	Behavior    string   `json:"behavior,omitempty"`
	Fields      []string `json:"fields,omitempty"`
	SortEnabled bool     `json:"sort_enabled"`
}

type Result

type Result struct {
	Azion  *AzionApplicationOptionsV3 `json:"azion,omitempty"`
	Extras []interface{}              `json:"extras"`
	Errors *ErrorDetails              `json:"errors,omitempty"`
}

type ResultV4

type ResultV4 struct {
	Azion       *AzionApplicationOptions `json:"azion,omitempty"`
	Extras      []interface{}            `json:"extras"`
	Errors      *ErrorDetails            `json:"errors,omitempty"`
	AzionConfig *AzionConfig             `json:"azion_config,omitempty"`
}

type Results

type Results struct {
	Result Result `json:"result"`
}

type ResultsV4

type ResultsV4 struct {
	Result ResultV4 `json:"result"`
}

type RuleEngine

type RuleEngine struct {
	Name        string                         `json:"name"`
	Description *string                        `json:"description,omitempty"`
	Phase       string                         `json:"phase,omitempty"`
	Order       int64                          `json:"order,omitempty"`
	IsActive    bool                           `json:"is_active,omitempty"`
	Criteria    [][]sdk.RulesEngineCriteria    `json:"criteria,omitempty"`
	Behaviors   []sdk.RulesEngineBehaviorEntry `json:"behaviors,omitempty"`
}

type RuleIdsStruct

type RuleIdsStruct struct {
	Id    int64
	Phase string
}

type StaleCacheSettings

type StaleCacheSettings struct {
	Enabled bool `json:"enabled"`
}

type StorageBinding

type StorageBinding struct {
	Bucket string `json:"bucket,omitempty"`
	Prefix string `json:"prefix,omitempty"`
}

type StorageManifest

type StorageManifest struct {
	Name            string `json:"name"`
	WorkloadsAccess string `json:"workloads_access"` // read_write, read_only, etc.
	Dir             string `json:"dir"`              // Directory path
	Prefix          string `json:"prefix"`
}

StorageManifest represents an edge storage entry in the manifest.json file

type SyncOpts

type SyncOpts struct {
	RuleIds   map[string]RuleIdsStruct
	CacheIds  map[string]AzionJsonDataCacheSettings
	OriginIds map[string]AzionJsonDataOrigin
	Conf      *AzionApplicationOptions
}

type SyncOptsV3

type SyncOptsV3 struct {
	RuleIds   map[string]RuleIdsStruct
	CacheIds  map[string]AzionJsonDataCacheSettings
	OriginIds map[string]AzionJsonDataOrigin
	Conf      *AzionApplicationOptionsV3
}

type TieredCacheSettings

type TieredCacheSettings struct {
	Topology string `json:"topology,omitempty"`
}

type WorkloadDeployment

type WorkloadDeployment struct {
	Name     string           `json:"name"`
	Current  bool             `json:"current"`
	Active   bool             `json:"active"`
	Strategy WorkloadStrategy `json:"strategy"`
}

type WorkloadManifest

type WorkloadManifest struct {
	Name                      string                      `json:"name"`
	Active                    *bool                       `json:"active,omitempty"`
	Infrastructure            int64                       `json:"infrastructure,omitempty"`
	WorkloadDomainAllowAccess *bool                       `json:"workload_domain_allow_access,omitempty"`
	Domains                   []string                    `json:"domains"`
	Tls                       *edgesdk.TLSWorkloadRequest `json:"tls,omitempty"`
	Protocols                 *edgesdk.ProtocolsRequest   `json:"protocols,omitempty"`
	Mtls                      *edgesdk.MTLSRequest        `json:"mtls,omitempty"`
	NetworkMap                *string                     `json:"network_map,omitempty"`
}

WorkloadManifest represents a workload in the manifest.json file

type WorkloadStrategy

type WorkloadStrategy struct {
	Type       string                `json:"type"`
	Attributes WorkloadStrategyAttrs `json:"attributes"`
}

type WorkloadStrategyAttrs

type WorkloadStrategyAttrs struct {
	Application *string `json:"application"`
	Firewall    *string `json:"firewall"`
	CustomPage  *string `json:"custom_page"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL