Documentation ¶
Overview ¶
Package cloudlets provides access to the Akamai Cloudlets APIs
Index ¶
- Constants
- Variables
- type ActivateLoadBalancerVersionRequest
- type ActivatePolicyVersionRequest
- type AllowDeny
- type BalancingType
- type CheckIPs
- type ClientFunc
- type Cloudlets
- type CloudletsOrigin
- type CreateLoadBalancerVersionRequest
- type CreateOriginRequest
- type CreatePolicyRequest
- type CreatePolicyVersion
- type CreatePolicyVersionRequest
- type DataCenter
- type DeletePolicyPropertyRequest
- type DeletePolicyVersionRequest
- type Description
- type Error
- type ForwardSettingsALB
- type ForwardSettingsAS
- type ForwardSettingsFR
- type ForwardSettingsPR
- type GetLoadBalancerVersionRequest
- type GetOriginRequest
- type GetPolicyPropertiesRequest
- type GetPolicyRequest
- type GetPolicyVersionRequest
- type ListLoadBalancerActivationsRequest
- type ListLoadBalancerVersionsRequest
- type ListOriginsRequest
- type ListPoliciesRequest
- type ListPolicyActivationsRequest
- type ListPolicyVersionsRequest
- type LivenessSettings
- type LoadBalancerActivation
- type LoadBalancerActivationNetwork
- type LoadBalancerActivationStatus
- type LoadBalancerVersion
- type LoadBalancerVersionActivation
- type MatchCriteria
- type MatchCriteriaALB
- type MatchCriteriaAP
- type MatchCriteriaAS
- type MatchCriteriaER
- type MatchCriteriaFR
- type MatchCriteriaPR
- type MatchCriteriaRC
- type MatchCriteriaVP
- type MatchOperator
- type MatchRule
- type MatchRuleALB
- type MatchRuleAP
- type MatchRuleAS
- type MatchRuleER
- type MatchRuleFR
- type MatchRuleFormat
- type MatchRulePR
- type MatchRuleRC
- type MatchRuleType
- type MatchRuleVP
- type MatchRules
- type Mock
- func (m *Mock) ActivateLoadBalancerVersion(ctx context.Context, req ActivateLoadBalancerVersionRequest) (*LoadBalancerActivation, error)
- func (m *Mock) ActivatePolicyVersion(ctx context.Context, req ActivatePolicyVersionRequest) ([]PolicyActivation, error)
- func (m *Mock) CreateLoadBalancerVersion(ctx context.Context, req CreateLoadBalancerVersionRequest) (*LoadBalancerVersion, error)
- func (m *Mock) CreateOrigin(ctx context.Context, req CreateOriginRequest) (*Origin, error)
- func (m *Mock) CreatePolicy(ctx context.Context, req CreatePolicyRequest) (*Policy, error)
- func (m *Mock) CreatePolicyVersion(ctx context.Context, req CreatePolicyVersionRequest) (*PolicyVersion, error)
- func (m *Mock) DeletePolicyProperty(ctx context.Context, req DeletePolicyPropertyRequest) error
- func (m *Mock) DeletePolicyVersion(ctx context.Context, req DeletePolicyVersionRequest) error
- func (m *Mock) GetLoadBalancerVersion(ctx context.Context, req GetLoadBalancerVersionRequest) (*LoadBalancerVersion, error)
- func (m *Mock) GetOrigin(ctx context.Context, req GetOriginRequest) (*Origin, error)
- func (m *Mock) GetPolicy(ctx context.Context, policyID GetPolicyRequest) (*Policy, error)
- func (m *Mock) GetPolicyProperties(ctx context.Context, req GetPolicyPropertiesRequest) (map[string]PolicyProperty, error)
- func (m *Mock) GetPolicyVersion(ctx context.Context, req GetPolicyVersionRequest) (*PolicyVersion, error)
- func (m *Mock) ListLoadBalancerActivations(ctx context.Context, req ListLoadBalancerActivationsRequest) ([]LoadBalancerActivation, error)
- func (m *Mock) ListLoadBalancerVersions(ctx context.Context, req ListLoadBalancerVersionsRequest) ([]LoadBalancerVersion, error)
- func (m *Mock) ListOrigins(ctx context.Context, req ListOriginsRequest) ([]OriginResponse, error)
- func (m *Mock) ListPolicies(ctx context.Context, request ListPoliciesRequest) ([]Policy, error)
- func (m *Mock) ListPolicyActivations(ctx context.Context, req ListPolicyActivationsRequest) ([]PolicyActivation, error)
- func (m *Mock) ListPolicyVersions(ctx context.Context, request ListPolicyVersionsRequest) ([]PolicyVersion, error)
- func (m *Mock) RemovePolicy(ctx context.Context, policyID RemovePolicyRequest) error
- func (m *Mock) UpdateLoadBalancerVersion(ctx context.Context, req UpdateLoadBalancerVersionRequest) (*LoadBalancerVersion, error)
- func (m *Mock) UpdateOrigin(ctx context.Context, req UpdateOriginRequest) (*Origin, error)
- func (m *Mock) UpdatePolicy(ctx context.Context, req UpdatePolicyRequest) (*Policy, error)
- func (m *Mock) UpdatePolicyVersion(ctx context.Context, req UpdatePolicyVersionRequest) (*PolicyVersion, error)
- type NetworkStatus
- type ObjectMatchValueObject
- type ObjectMatchValueObjectType
- type ObjectMatchValueRange
- type ObjectMatchValueRangeType
- type ObjectMatchValueSimple
- type ObjectMatchValueSimpleType
- type Option
- type Options
- type Origin
- type OriginResponse
- type OriginType
- type Policy
- type PolicyActivation
- type PolicyActivationNetwork
- type PolicyActivationStatus
- type PolicyInfo
- type PolicyProperty
- type PolicyVersion
- type PolicyVersionActivation
- type PropertyInfo
- type RemovePolicyRequest
- type UpdateLoadBalancerVersionRequest
- type UpdateOriginRequest
- type UpdatePolicy
- type UpdatePolicyRequest
- type UpdatePolicyVersion
- type UpdatePolicyVersionRequest
- type Warning
Constants ¶
const ( // LoadBalancerActivationStatusActive is an activation that is currently active LoadBalancerActivationStatusActive LoadBalancerActivationStatus = "active" // LoadBalancerActivationStatusDeactivated is an activation that is deactivated LoadBalancerActivationStatusDeactivated LoadBalancerActivationStatus = "deactivated" // LoadBalancerActivationStatusInactive is an activation that is not active LoadBalancerActivationStatusInactive LoadBalancerActivationStatus = "inactive" // LoadBalancerActivationStatusPending is status of a pending activation LoadBalancerActivationStatusPending LoadBalancerActivationStatus = "pending" // LoadBalancerActivationStatusFailed is status of a failed activation LoadBalancerActivationStatusFailed LoadBalancerActivationStatus = "failed" // LoadBalancerActivationNetworkStaging is the staging network value for load balancer LoadBalancerActivationNetworkStaging LoadBalancerActivationNetwork = "STAGING" // LoadBalancerActivationNetworkProduction is the production network value for load balancer LoadBalancerActivationNetworkProduction LoadBalancerActivationNetwork = "PRODUCTION" // NetworkParamStaging is the staging network param value for ListLoadBalancerActivationsRequest NetworkParamStaging LoadBalancerActivationNetwork = "staging" // NetworkParamProduction is the production network param value for ListLoadBalancerActivationsRequest NetworkParamProduction LoadBalancerActivationNetwork = "prod" )
const ( // Range represents range option Range ObjectMatchValueRangeType = "range" // Simple represents simple option Simple ObjectMatchValueSimpleType = "simple" // Object represents object option Object ObjectMatchValueObjectType = "object" )
Variables ¶
var ( // ErrListOrigins is returned when ListOrigins fails ErrListOrigins = errors.New("list origins") // ErrGetOrigin is returned when GetOrigin fails ErrGetOrigin = errors.New("get origin") // ErrCreateOrigin is returned when CreateOrigin fails ErrCreateOrigin = errors.New("create origin") // ErrUpdateOrigin is returned when UpdateOrigin fails ErrUpdateOrigin = errors.New("update origin") )
var ( // ErrListLoadBalancerActivations is returned when ListLoadBalancerActivations fails ErrListLoadBalancerActivations = errors.New("list load balancer activations") // ErrActivateLoadBalancerVersion is returned when ActivateLoadBalancerVersion fails ErrActivateLoadBalancerVersion = errors.New("activate load balancer version") )
var ( // ErrCreateLoadBalancerVersion is returned when CreateLoadBalancerVersion fails ErrCreateLoadBalancerVersion = errors.New("create origin version") // ErrGetLoadBalancerVersion is returned when GetLoadBalancerVersion fails ErrGetLoadBalancerVersion = errors.New("get origin version") // ErrUpdateLoadBalancerVersion is returned when UpdateLoadBalancerVersion fails ErrUpdateLoadBalancerVersion = errors.New("update origin version") // ErrListLoadBalancerVersions is returned when ListLoadBalancerVersions fails ErrListLoadBalancerVersions = errors.New("list origin versions") )
var ( // ErrUnmarshallMatchCriteriaALB is returned when unmarshalling of MatchCriteriaALB fails ErrUnmarshallMatchCriteriaALB = errors.New("unmarshalling MatchCriteriaALB") // ErrUnmarshallMatchCriteriaAP is returned when unmarshalling of MatchCriteriaAP fails ErrUnmarshallMatchCriteriaAP = errors.New("unmarshalling MatchCriteriaAP") // ErrUnmarshallMatchCriteriaAS is returned when unmarshalling of MatchCriteriaAS fails ErrUnmarshallMatchCriteriaAS = errors.New("unmarshalling MatchCriteriaAS") // ErrUnmarshallMatchCriteriaPR is returned when unmarshalling of MatchCriteriaPR fails ErrUnmarshallMatchCriteriaPR = errors.New("unmarshalling MatchCriteriaPR") // ErrUnmarshallMatchCriteriaER is returned when unmarshalling of MatchCriteriaER fails ErrUnmarshallMatchCriteriaER = errors.New("unmarshalling MatchCriteriaER") // ErrUnmarshallMatchCriteriaFR is returned when unmarshalling of MatchCriteriaFR fails ErrUnmarshallMatchCriteriaFR = errors.New("unmarshalling MatchCriteriaFR") // ErrUnmarshallMatchCriteriaRC is returned when unmarshalling of MatchCriteriaRC fails ErrUnmarshallMatchCriteriaRC = errors.New("unmarshalling MatchCriteriaRC") // ErrUnmarshallMatchCriteriaVP is returned when unmarshalling of MatchCriteriaVP fails ErrUnmarshallMatchCriteriaVP = errors.New("unmarshalling MatchCriteriaVP") // ErrUnmarshallMatchRules is returned when unmarshalling of MatchRules fails ErrUnmarshallMatchRules = errors.New("unmarshalling MatchRules") )
var ( // ErrListPolicies is returned when ListPolicies fails ErrListPolicies = errors.New("list policies") // ErrGetPolicy is returned when GetPolicy fails ErrGetPolicy = errors.New("get policy") // ErrCreatePolicy is returned when CreatePolicy fails ErrCreatePolicy = errors.New("create policy") // ErrRemovePolicy is returned when RemovePolicy fails ErrRemovePolicy = errors.New("remove policy") // ErrUpdatePolicy is returned when UpdatePolicy fails ErrUpdatePolicy = errors.New("update policy") )
var ( // ErrGetPolicyProperties is returned when GetPolicyProperties fails ErrGetPolicyProperties = errors.New("get policy properties") // ErrDeletePolicyProperty is returned when DeletePolicyProperty fails ErrDeletePolicyProperty = errors.New("delete policy property") )
var ( // ErrListPolicyVersions is returned when ListPolicyVersions fails ErrListPolicyVersions = errors.New("list policy versions") // ErrGetPolicyVersion is returned when GetPolicyVersion fails ErrGetPolicyVersion = errors.New("get policy versions") // ErrCreatePolicyVersion is returned when CreatePolicyVersion fails ErrCreatePolicyVersion = errors.New("create policy versions") // ErrDeletePolicyVersion is returned when DeletePolicyVersion fails ErrDeletePolicyVersion = errors.New("delete policy versions") // ErrUpdatePolicyVersion is returned when UpdatePolicyVersion fails ErrUpdatePolicyVersion = errors.New("update policy versions") )
var ( // ErrListPolicyActivations is returned when ListPolicyActivations fails ErrListPolicyActivations = errors.New("list policy activations") // ErrActivatePolicyVersion is returned when ActivatePolicyVersion fails ErrActivatePolicyVersion = errors.New("activate policy version") )
var ( // ErrStructValidation is returned when given struct validation failed ErrStructValidation = errors.New("struct validation") )
Functions ¶
This section is empty.
Types ¶
type ActivateLoadBalancerVersionRequest ¶
type ActivateLoadBalancerVersionRequest struct { OriginID string Async bool LoadBalancerVersionActivation }
ActivateLoadBalancerVersionRequest contains request parameters for LoadBalancer version activation
func (ActivateLoadBalancerVersionRequest) Validate ¶
func (v ActivateLoadBalancerVersionRequest) Validate() error
Validate validates ActivateLoadBalancerVersionRequest
type ActivatePolicyVersionRequest ¶
type ActivatePolicyVersionRequest struct { PolicyID int64 Async bool Version int64 PolicyVersionActivation }
ActivatePolicyVersionRequest contains the request parameters for ActivatePolicyVersion
func (ActivatePolicyVersionRequest) Validate ¶
func (r ActivatePolicyVersionRequest) Validate() error
Validate validates ActivatePolicyVersionRequest
type BalancingType ¶
type BalancingType string
BalancingType is a type for BalancingType field
const ( // BalancingTypeWeighted represents weighted balancing type for load balancer version BalancingTypeWeighted BalancingType = "WEIGHTED" // BalancingTypePerformance represents performance balancing type for load balancer version BalancingTypePerformance BalancingType = "PERFORMANCE" )
type CheckIPs ¶
type CheckIPs string
CheckIPs enum type
const ( // CheckIPsConnectingIP represents connecting ip option CheckIPsConnectingIP CheckIPs = "CONNECTING_IP" // CheckIPsXFFHeaders represents xff headers option CheckIPsXFFHeaders CheckIPs = "XFF_HEADERS" // CheckIPsConnectingIPXFFHeaders represents connecting ip + xff headers option CheckIPsConnectingIPXFFHeaders CheckIPs = "CONNECTING_IP XFF_HEADERS" )
type ClientFunc ¶
ClientFunc is a Cloudlets client new method, this can be used for mocking
type Cloudlets ¶
type Cloudlets interface { // ListOrigins lists all origins of specified type for the current account. // // See: https://techdocs.akamai.com/cloudlets/v2/reference/get-origins ListOrigins(context.Context, ListOriginsRequest) ([]OriginResponse, error) // GetOrigin gets specific origin by originID. // This operation is only available for the APPLICATION_LOAD_BALANCER origin type. // // See: https://techdocs.akamai.com/cloudlets/v2/reference/get-origin GetOrigin(context.Context, GetOriginRequest) (*Origin, error) // CreateOrigin creates configuration for an origin. // This operation is only available for the APPLICATION_LOAD_BALANCER origin type. // // See: https://techdocs.akamai.com/cloudlets/v2/reference/post-origin CreateOrigin(context.Context, CreateOriginRequest) (*Origin, error) // UpdateOrigin creates configuration for an origin. // This operation is only available for the APPLICATION_LOAD_BALANCER origin type. // // See: https://techdocs.akamai.com/cloudlets/v2/reference/put-origin UpdateOrigin(context.Context, UpdateOriginRequest) (*Origin, error) // CreateLoadBalancerVersion creates load balancer version. // // See: https://techdocs.akamai.com/cloudlets/v2/reference/post-origin-versions CreateLoadBalancerVersion(context.Context, CreateLoadBalancerVersionRequest) (*LoadBalancerVersion, error) // GetLoadBalancerVersion gets specific load balancer version by originID and version. // // See: https://techdocs.akamai.com/cloudlets/v2/reference/get-origin-version GetLoadBalancerVersion(context.Context, GetLoadBalancerVersionRequest) (*LoadBalancerVersion, error) // UpdateLoadBalancerVersion updates specific load balancer version by originID and version. // // See: https://techdocs.akamai.com/cloudlets/v2/reference/put-origin-version UpdateLoadBalancerVersion(context.Context, UpdateLoadBalancerVersionRequest) (*LoadBalancerVersion, error) // ListLoadBalancerVersions lists all versions of Origin with type APPLICATION_LOAD_BALANCER. // // See: https://techdocs.akamai.com/cloudlets/v2/reference/get-origin-versions ListLoadBalancerVersions(context.Context, ListLoadBalancerVersionsRequest) ([]LoadBalancerVersion, error) // ListLoadBalancerActivations fetches activations with the most recent listed first. // // See: https://techdocs.akamai.com/cloudlets/v2/reference/get-origin-activations ListLoadBalancerActivations(context.Context, ListLoadBalancerActivationsRequest) ([]LoadBalancerActivation, error) // ActivateLoadBalancerVersion activates the load balancing version. // // See: https://techdocs.akamai.com/cloudlets/v2/reference/post-origin-activations ActivateLoadBalancerVersion(context.Context, ActivateLoadBalancerVersionRequest) (*LoadBalancerActivation, error) // ListPolicies lists policies. // // See: https://techdocs.akamai.com/cloudlets/v2/reference/get-policies ListPolicies(context.Context, ListPoliciesRequest) ([]Policy, error) // GetPolicy gets policy by policyID. // // See: https://techdocs.akamai.com/cloudlets/v2/reference/get-policy GetPolicy(context.Context, GetPolicyRequest) (*Policy, error) // CreatePolicy creates policy. // // See: https://techdocs.akamai.com/cloudlets/v2/reference/post-policy CreatePolicy(context.Context, CreatePolicyRequest) (*Policy, error) // RemovePolicy removes policy. // // See: https://techdocs.akamai.com/cloudlets/v2/reference/delete-policy RemovePolicy(context.Context, RemovePolicyRequest) error // UpdatePolicy updates policy. // // See: https://techdocs.akamai.com/cloudlets/v2/reference/put-policy UpdatePolicy(context.Context, UpdatePolicyRequest) (*Policy, error) // GetPolicyProperties gets all the associated properties by the policyID. // // See: https://techdocs.akamai.com/cloudlets/v2/reference/get-policy-properties GetPolicyProperties(context.Context, GetPolicyPropertiesRequest) (map[string]PolicyProperty, error) // DeletePolicyProperty removes a property from a policy activation associated_properties list. DeletePolicyProperty(context.Context, DeletePolicyPropertyRequest) error // ListPolicyVersions lists policy versions by policyID. // // See: https://techdocs.akamai.com/cloudlets/v2/reference/get-policy-versions ListPolicyVersions(context.Context, ListPolicyVersionsRequest) ([]PolicyVersion, error) // GetPolicyVersion gets policy version by policyID and version. // // See: https://techdocs.akamai.com/cloudlets/v2/reference/get-policy-version GetPolicyVersion(context.Context, GetPolicyVersionRequest) (*PolicyVersion, error) // CreatePolicyVersion creates policy version. // // See: https://techdocs.akamai.com/cloudlets/v2/reference/post-policy-versions CreatePolicyVersion(context.Context, CreatePolicyVersionRequest) (*PolicyVersion, error) // DeletePolicyVersion deletes policy version. // // See: https://techdocs.akamai.com/cloudlets/v2/reference/delete-policy-version DeletePolicyVersion(context.Context, DeletePolicyVersionRequest) error // UpdatePolicyVersion updates policy version. // // See: https://techdocs.akamai.com/cloudlets/v2/reference/put-policy-version UpdatePolicyVersion(context.Context, UpdatePolicyVersionRequest) (*PolicyVersion, error) // ListPolicyActivations returns the complete activation history for the selected policy in reverse chronological order. // // See: https://techdocs.akamai.com/cloudlets/v2/reference/get-policy-activations ListPolicyActivations(context.Context, ListPolicyActivationsRequest) ([]PolicyActivation, error) // ActivatePolicyVersion activates the selected cloudlet policy version. // // See: https://techdocs.akamai.com/cloudlets/v2/reference/post-policy-version-activations ActivatePolicyVersion(context.Context, ActivatePolicyVersionRequest) ([]PolicyActivation, error) }
Cloudlets is the api interface for cloudlets
type CloudletsOrigin ¶
type CloudletsOrigin struct { OriginID string `json:"id"` Hostname string `json:"hostname"` Type OriginType `json:"type"` Checksum string `json:"checksum"` Description string `json:"description"` }
CloudletsOrigin is the type for CloudletsOrigins in NetworkStatus
type CreateLoadBalancerVersionRequest ¶
type CreateLoadBalancerVersionRequest struct { OriginID string LoadBalancerVersion LoadBalancerVersion }
CreateLoadBalancerVersionRequest describes the parameters needed to create load balancer version
func (CreateLoadBalancerVersionRequest) Validate ¶
func (v CreateLoadBalancerVersionRequest) Validate() error
Validate validates CreateLoadBalancerVersionRequest
type CreateOriginRequest ¶
type CreateOriginRequest struct { OriginID string `json:"originId"` Description }
CreateOriginRequest describes the parameters of the create origin request
func (CreateOriginRequest) Validate ¶
func (v CreateOriginRequest) Validate() error
Validate validates CreateOriginRequest
type CreatePolicyRequest ¶
type CreatePolicyRequest struct { Name string `json:"name"` CloudletID int64 `json:"cloudletId"` Description string `json:"description,omitempty"` PropertyName string `json:"propertyName,omitempty"` GroupID int64 `json:"groupId,omitempty"` }
CreatePolicyRequest describes the body of the create policy request
func (CreatePolicyRequest) Validate ¶
func (v CreatePolicyRequest) Validate() error
Validate validates CreatePolicyRequest
type CreatePolicyVersion ¶
type CreatePolicyVersion struct { Description string `json:"description,omitempty"` MatchRuleFormat MatchRuleFormat `json:"matchRuleFormat,omitempty"` MatchRules MatchRules `json:"matchRules"` }
CreatePolicyVersion describes the body of the create policy request
type CreatePolicyVersionRequest ¶
type CreatePolicyVersionRequest struct { CreatePolicyVersion PolicyID int64 }
CreatePolicyVersionRequest describes the body of the create policy request
func (CreatePolicyVersionRequest) Validate ¶
func (c CreatePolicyVersionRequest) Validate() error
Validate validates CreatePolicyVersionRequest
type DataCenter ¶
type DataCenter struct { City string `json:"city,omitempty"` CloudServerHostHeaderOverride bool `json:"cloudServerHostHeaderOverride,omitempty"` CloudService bool `json:"cloudService"` Continent string `json:"continent"` Country string `json:"country"` Hostname string `json:"hostname,omitempty"` Latitude *float64 `json:"latitude"` LivenessHosts []string `json:"livenessHosts,omitempty"` Longitude *float64 `json:"longitude"` OriginID string `json:"originId"` Percent *float64 `json:"percent"` StateOrProvince *string `json:"stateOrProvince,omitempty"` }
DataCenter represents the dataCenter field of load balancer version
type DeletePolicyPropertyRequest ¶
type DeletePolicyPropertyRequest struct { PolicyID int64 PropertyID int64 Network PolicyActivationNetwork }
DeletePolicyPropertyRequest contains the request parameters for DeletePolicyProperty
func (DeletePolicyPropertyRequest) Validate ¶
func (r DeletePolicyPropertyRequest) Validate() error
Validate validates DeletePolicyPropertyRequest
type DeletePolicyVersionRequest ¶
DeletePolicyVersionRequest describes the parameters of the delete policy version request
type Description ¶
type Description struct {
Description string `json:"description,omitempty"`
}
Description describes description for the Origin
type Error ¶
type Error struct { Type string `json:"type,omitempty"` Title string `json:"title,omitempty"` Detail string `json:"detail,omitempty"` Instance string `json:"instance,omitempty"` BehaviorName string `json:"behaviorName,omitempty"` ErrorLocation string `json:"errorLocation,omitempty"` StatusCode int `json:"statusCode,omitempty"` Errors json.RawMessage `json:"errors,omitempty"` Warnings json.RawMessage `json:"warnings,omitempty"` }
Error is a cloudlets error interface
type ForwardSettingsALB ¶
type ForwardSettingsALB struct {
OriginID string `json:"originId"`
}
ForwardSettingsALB represents forward settings for an Application Load Balancer (ALB)
type ForwardSettingsAS ¶
type ForwardSettingsAS struct { PathAndQS string `json:"pathAndQS,omitempty"` UseIncomingQueryString bool `json:"useIncomingQueryString,omitempty"` OriginID string `json:"originId,omitempty"` }
ForwardSettingsAS represents forward settings for an Application Segmentation (AS)
type ForwardSettingsFR ¶
type ForwardSettingsFR struct { PathAndQS string `json:"pathAndQS,omitempty"` UseIncomingQueryString bool `json:"useIncomingQueryString,omitempty"` OriginID string `json:"originId,omitempty"` }
ForwardSettingsFR represents forward settings for a Forward Rewrite (FR)
type ForwardSettingsPR ¶
ForwardSettingsPR represents forward settings for a Phased Release (PR aka CD)
type GetLoadBalancerVersionRequest ¶
GetLoadBalancerVersionRequest describes the parameters needed to get load balancer version
func (GetLoadBalancerVersionRequest) Validate ¶
func (v GetLoadBalancerVersionRequest) Validate() error
Validate validates GetLoadBalancerVersionRequest
type GetOriginRequest ¶
type GetOriginRequest struct {
OriginID string
}
GetOriginRequest describes the parameters of the get origins request
type GetPolicyPropertiesRequest ¶
type GetPolicyPropertiesRequest struct {
PolicyID int64
}
GetPolicyPropertiesRequest contains request parameters for GetPolicyPropertiesRequest
type GetPolicyRequest ¶
type GetPolicyRequest struct {
PolicyID int64
}
GetPolicyRequest describes the body of the get policy request
type GetPolicyVersionRequest ¶
GetPolicyVersionRequest describes the parameters needed to get policy version
type ListLoadBalancerActivationsRequest ¶
type ListLoadBalancerActivationsRequest struct { OriginID string Network LoadBalancerActivationNetwork LatestOnly bool PageSize *int64 Page *int64 }
ListLoadBalancerActivationsRequest contains request parameters for ListLoadBalancerActivations
func (ListLoadBalancerActivationsRequest) Validate ¶
func (v ListLoadBalancerActivationsRequest) Validate() error
Validate validates ListLoadBalancerActivationsRequest
type ListLoadBalancerVersionsRequest ¶
type ListLoadBalancerVersionsRequest struct {
OriginID string
}
ListLoadBalancerVersionsRequest describes the parameters needed to list load balancer versions
func (ListLoadBalancerVersionsRequest) Validate ¶
func (v ListLoadBalancerVersionsRequest) Validate() error
Validate validates ListLoadBalancerVersionsRequest
type ListOriginsRequest ¶
type ListOriginsRequest struct {
Type OriginType
}
ListOriginsRequest describes the parameters of the ListOrigins request
func (ListOriginsRequest) Validate ¶
func (v ListOriginsRequest) Validate() error
Validate validates ListOriginsRequest
type ListPoliciesRequest ¶
ListPoliciesRequest describes the parameters for the list policies request
type ListPolicyActivationsRequest ¶
type ListPolicyActivationsRequest struct { PolicyID int64 Network PolicyActivationNetwork PropertyName string }
ListPolicyActivationsRequest contains the request parameters for ListPolicyActivations
func (ListPolicyActivationsRequest) Validate ¶
func (r ListPolicyActivationsRequest) Validate() error
Validate validates ListPolicyActivationsRequest
type ListPolicyVersionsRequest ¶
type ListPolicyVersionsRequest struct { PolicyID int64 IncludeRules bool IncludeDeleted bool IncludeActivations bool Offset int PageSize *int }
ListPolicyVersionsRequest describes the parameters needed to list policy versions
func (ListPolicyVersionsRequest) Validate ¶
func (c ListPolicyVersionsRequest) Validate() error
Validate validates ListPolicyVersionsRequest
type LivenessSettings ¶
type LivenessSettings struct { HostHeader string `json:"hostHeader,omitempty"` AdditionalHeaders map[string]string `json:"additionalHeaders,omitempty"` Interval int `json:"interval,omitempty"` Path string `json:"path,omitempty"` PeerCertificateVerification bool `json:"peerCertificateVerification,omitempty"` Port int `json:"port"` Protocol string `json:"protocol"` RequestString string `json:"requestString,omitempty"` ResponseString string `json:"responseString,omitempty"` Status3xxFailure bool `json:"status3xxFailure,omitempty"` Status4xxFailure bool `json:"status4xxFailure,omitempty"` Status5xxFailure bool `json:"status5xxFailure,omitempty"` Timeout float64 `json:"timeout,omitempty"` }
LivenessSettings represents the livenessSettings field of load balancer version
func (LivenessSettings) Validate ¶
func (v LivenessSettings) Validate() error
Validate validates LivenessSettings
type LoadBalancerActivation ¶
type LoadBalancerActivation struct { ActivatedBy string `json:"activatedBy,omitempty"` ActivatedDate string `json:"activatedDate,omitempty"` Network LoadBalancerActivationNetwork `json:"network"` OriginID string `json:"originId,omitempty"` Status LoadBalancerActivationStatus `json:"status,omitempty"` DryRun bool `json:"dryrun,omitempty"` Version int64 `json:"version"` }
LoadBalancerActivation contains response data for a single LB Version Activation
type LoadBalancerActivationNetwork ¶
type LoadBalancerActivationNetwork string
LoadBalancerActivationNetwork is the activation network type for load balancer
type LoadBalancerActivationStatus ¶
type LoadBalancerActivationStatus string
LoadBalancerActivationStatus is an activation status type for load balancer
type LoadBalancerVersion ¶
type LoadBalancerVersion struct { BalancingType BalancingType `json:"balancingType,omitempty"` CreatedBy string `json:"createdBy,omitempty"` CreatedDate string `json:"createdDate,omitempty"` DataCenters []DataCenter `json:"dataCenters,omitempty"` Deleted bool `json:"deleted"` Description string `json:"description,omitempty"` Immutable bool `json:"immutable"` LastModifiedBy string `json:"lastModifiedBy,omitempty"` LastModifiedDate string `json:"lastModifiedDate,omitempty"` LivenessSettings *LivenessSettings `json:"livenessSettings,omitempty"` OriginID string `json:"originID,omitempty"` Version int64 `json:"version,omitempty"` Warnings []Warning `json:"warnings,omitempty"` }
LoadBalancerVersion describes the body of the create and update load balancer version request
func (LoadBalancerVersion) Validate ¶
func (v LoadBalancerVersion) Validate() error
Validate validates LoadBalancerVersion
type LoadBalancerVersionActivation ¶
type LoadBalancerVersionActivation struct { Network LoadBalancerActivationNetwork `json:"network"` DryRun bool `json:"dryrun,omitempty"` Version int64 `json:"version"` }
LoadBalancerVersionActivation contains request parameters for ActivateLoadBalancerVersionRequest
func (LoadBalancerVersionActivation) Validate ¶
func (v LoadBalancerVersionActivation) Validate() error
Validate validates LoadBalancerVersionActivation struct
type MatchCriteria ¶
type MatchCriteria struct { MatchType string `json:"matchType,omitempty"` MatchValue string `json:"matchValue,omitempty"` MatchOperator MatchOperator `json:"matchOperator,omitempty"` CaseSensitive bool `json:"caseSensitive"` Negate bool `json:"negate"` CheckIPs CheckIPs `json:"checkIPs,omitempty"` ObjectMatchValue interface{} `json:"objectMatchValue,omitempty"` }
MatchCriteria represents a match criteria resource for match rule for cloudlet
type MatchCriteriaALB ¶
type MatchCriteriaALB MatchCriteria
MatchCriteriaALB represents a match criteria resource for match rule for cloudlet Application Load Balancer (ALB) ObjectMatchValue can contain ObjectMatchValueObject, ObjectMatchValueSimple or ObjectMatchValueRange
func (*MatchCriteriaALB) UnmarshalJSON ¶
func (m *MatchCriteriaALB) UnmarshalJSON(b []byte) error
UnmarshalJSON helps to un-marshall field ObjectMatchValue of MatchCriteriaALB as proper instance of *ObjectMatchValueObject, *ObjectMatchValueSimple or *ObjectMatchValueRange
func (MatchCriteriaALB) Validate ¶
func (m MatchCriteriaALB) Validate() error
Validate validates MatchCriteriaALB
type MatchCriteriaAP ¶
type MatchCriteriaAP MatchCriteria
MatchCriteriaAP represents a match criteria resource for match rule for cloudlet API Prioritization (AP) ObjectMatchValue can contain ObjectMatchValueObject or ObjectMatchValueSimple
func (*MatchCriteriaAP) UnmarshalJSON ¶
func (m *MatchCriteriaAP) UnmarshalJSON(b []byte) error
UnmarshalJSON helps to un-marshall field ObjectMatchValue of MatchCriteriaAP as proper instance of *ObjectMatchValueObject or *ObjectMatchValueSimple
func (MatchCriteriaAP) Validate ¶
func (m MatchCriteriaAP) Validate() error
Validate validates MatchCriteriaAP
type MatchCriteriaAS ¶
type MatchCriteriaAS MatchCriteria
MatchCriteriaAS represents a match criteria resource for match rule for cloudlet Application Segmentation (AS) ObjectMatchValue can contain ObjectMatchValueObject or ObjectMatchValueSimple or ObjectMatchValueRange
func (*MatchCriteriaAS) UnmarshalJSON ¶
func (m *MatchCriteriaAS) UnmarshalJSON(b []byte) error
UnmarshalJSON helps to un-marshall field ObjectMatchValue of MatchCriteriaAS as proper instance of *ObjectMatchValueObject or *ObjectMatchValueSimple or *ObjectMatchValueRange
func (MatchCriteriaAS) Validate ¶
func (m MatchCriteriaAS) Validate() error
Validate validates MatchCriteriaAS
type MatchCriteriaER ¶
type MatchCriteriaER MatchCriteria
MatchCriteriaER represents a match criteria resource for match rule for cloudlet Edge Redirector (ER) ObjectMatchValue can contain ObjectMatchValueObject or ObjectMatchValueSimple
func (*MatchCriteriaER) UnmarshalJSON ¶
func (m *MatchCriteriaER) UnmarshalJSON(b []byte) error
UnmarshalJSON helps to un-marshall field ObjectMatchValue of MatchCriteriaER as proper instance of *ObjectMatchValueObject or *ObjectMatchValueSimple
func (MatchCriteriaER) Validate ¶
func (m MatchCriteriaER) Validate() error
Validate validates MatchCriteriaER
type MatchCriteriaFR ¶
type MatchCriteriaFR MatchCriteria
MatchCriteriaFR represents a match criteria resource for match rule for cloudlet Forward Rewrite (FR) ObjectMatchValue can contain ObjectMatchValueObject or ObjectMatchValueSimple
func (*MatchCriteriaFR) UnmarshalJSON ¶
func (m *MatchCriteriaFR) UnmarshalJSON(b []byte) error
UnmarshalJSON helps to un-marshall field ObjectMatchValue of MatchCriteriaFR as proper instance of *ObjectMatchValueObject or *ObjectMatchValueSimple
func (MatchCriteriaFR) Validate ¶
func (m MatchCriteriaFR) Validate() error
Validate validates MatchCriteriaFR
type MatchCriteriaPR ¶
type MatchCriteriaPR MatchCriteria
MatchCriteriaPR represents a match criteria resource for match rule for cloudlet Phased Release (PR aka CD) ObjectMatchValue can contain ObjectMatchValueObject or ObjectMatchValueSimple
func (*MatchCriteriaPR) UnmarshalJSON ¶
func (m *MatchCriteriaPR) UnmarshalJSON(b []byte) error
UnmarshalJSON helps to un-marshall field ObjectMatchValue of MatchCriteriaPR as proper instance of *ObjectMatchValueObject or *ObjectMatchValueSimple
func (MatchCriteriaPR) Validate ¶
func (m MatchCriteriaPR) Validate() error
Validate validates MatchCriteriaPR
type MatchCriteriaRC ¶
type MatchCriteriaRC MatchCriteria
MatchCriteriaRC represents a match criteria resource for match rule for cloudlet Request Control (RC aka IG) ObjectMatchValue can contain ObjectMatchValueObject or ObjectMatchValueSimple
func (*MatchCriteriaRC) UnmarshalJSON ¶
func (m *MatchCriteriaRC) UnmarshalJSON(b []byte) error
UnmarshalJSON helps to un-marshall field ObjectMatchValue of MatchCriteriaRC as proper instance of *ObjectMatchValueObject or *ObjectMatchValueSimple
func (MatchCriteriaRC) Validate ¶
func (m MatchCriteriaRC) Validate() error
Validate validates MatchCriteriaRC
type MatchCriteriaVP ¶
type MatchCriteriaVP MatchCriteria
MatchCriteriaVP represents a match criteria resource for match rule for cloudlet Visitor Prioritization (VP) ObjectMatchValue can contain ObjectMatchValueObject or ObjectMatchValueSimple
func (*MatchCriteriaVP) UnmarshalJSON ¶
func (m *MatchCriteriaVP) UnmarshalJSON(b []byte) error
UnmarshalJSON helps to un-marshall field ObjectMatchValue of MatchCriteriaVP as proper instance of *ObjectMatchValueObject or *ObjectMatchValueSimple
func (MatchCriteriaVP) Validate ¶
func (m MatchCriteriaVP) Validate() error
Validate validates MatchCriteriaVP
type MatchOperator ¶
type MatchOperator string
MatchOperator enum type
const ( // MatchOperatorContains represents contains operator MatchOperatorContains MatchOperator = "contains" // MatchOperatorExists represents exists operator MatchOperatorExists MatchOperator = "exists" // MatchOperatorEquals represents equals operator MatchOperatorEquals MatchOperator = "equals" )
type MatchRule ¶
type MatchRule interface { Validate() error // contains filtered or unexported methods }
MatchRule is base interface for MarchRuleALB and MatchRuleER
type MatchRuleALB ¶
type MatchRuleALB struct { Name string `json:"name,omitempty"` Type MatchRuleType `json:"type,omitempty"` Start int64 `json:"start,omitempty"` End int64 `json:"end,omitempty"` ID int64 `json:"id,omitempty"` Matches []MatchCriteriaALB `json:"matches,omitempty"` MatchURL string `json:"matchURL,omitempty"` MatchesAlways bool `json:"matchesAlways"` ForwardSettings ForwardSettingsALB `json:"forwardSettings"` Disabled bool `json:"disabled,omitempty"` }
MatchRuleALB represents an Application Load Balancer (ALB) match rule resource for create or update resource
func (MatchRuleALB) Validate ¶
func (m MatchRuleALB) Validate() error
Validate validates MatchRuleALB
type MatchRuleAP ¶
type MatchRuleAP struct { Name string `json:"name,omitempty"` Type MatchRuleType `json:"type,omitempty"` Start int64 `json:"start,omitempty"` End int64 `json:"end,omitempty"` ID int64 `json:"id,omitempty"` Matches []MatchCriteriaAP `json:"matches,omitempty"` MatchURL string `json:"matchURL,omitempty"` PassThroughPercent *float64 `json:"passThroughPercent"` Disabled bool `json:"disabled,omitempty"` }
MatchRuleAP represents an API Prioritization (AP) match rule resource for create or update
type MatchRuleAS ¶
type MatchRuleAS struct { Name string `json:"name,omitempty"` Type MatchRuleType `json:"type,omitempty"` Start int64 `json:"start,omitempty"` End int64 `json:"end,omitempty"` ID int64 `json:"id,omitempty"` Matches []MatchCriteriaAS `json:"matches,omitempty"` MatchURL string `json:"matchURL,omitempty"` ForwardSettings ForwardSettingsAS `json:"forwardSettings"` Disabled bool `json:"disabled,omitempty"` }
MatchRuleAS represents an Application Segmentation (AS) match rule resource for create or update resource
type MatchRuleER ¶
type MatchRuleER struct { Name string `json:"name,omitempty"` Type MatchRuleType `json:"type,omitempty"` Start int64 `json:"start,omitempty"` End int64 `json:"end,omitempty"` ID int64 `json:"id,omitempty"` Matches []MatchCriteriaER `json:"matches,omitempty"` MatchesAlways bool `json:"matchesAlways,omitempty"` UseRelativeURL string `json:"useRelativeUrl,omitempty"` StatusCode int `json:"statusCode"` RedirectURL string `json:"redirectURL"` MatchURL string `json:"matchURL,omitempty"` UseIncomingQueryString bool `json:"useIncomingQueryString"` UseIncomingSchemeAndHost bool `json:"useIncomingSchemeAndHost"` Disabled bool `json:"disabled,omitempty"` }
MatchRuleER represents an Edge Redirector (ER) match rule resource for create or update resource
type MatchRuleFR ¶
type MatchRuleFR struct { Name string `json:"name,omitempty"` Type MatchRuleType `json:"type,omitempty"` Start int64 `json:"start,omitempty"` End int64 `json:"end,omitempty"` ID int64 `json:"id,omitempty"` Matches []MatchCriteriaFR `json:"matches,omitempty"` MatchURL string `json:"matchURL,omitempty"` ForwardSettings ForwardSettingsFR `json:"forwardSettings"` Disabled bool `json:"disabled,omitempty"` }
MatchRuleFR represents a Forward Rewrite (FR) match rule resource for create or update resource
type MatchRuleFormat ¶
type MatchRuleFormat string
MatchRuleFormat enum type
const ( // MatchRuleFormat10 represents default match rule format MatchRuleFormat10 MatchRuleFormat = "1.0" )
type MatchRulePR ¶
type MatchRulePR struct { Name string `json:"name,omitempty"` Type MatchRuleType `json:"type,omitempty"` Start int64 `json:"start,omitempty"` End int64 `json:"end,omitempty"` ID int64 `json:"id,omitempty"` Matches []MatchCriteriaPR `json:"matches,omitempty"` MatchURL string `json:"matchURL,omitempty"` ForwardSettings ForwardSettingsPR `json:"forwardSettings"` Disabled bool `json:"disabled,omitempty"` MatchesAlways bool `json:"matchesAlways,omitempty"` }
MatchRulePR represents a Phased Release (PR aka CD) match rule resource for create or update resource
type MatchRuleRC ¶
type MatchRuleRC struct { Name string `json:"name,omitempty"` Type MatchRuleType `json:"type,omitempty"` Start int64 `json:"start,omitempty"` End int64 `json:"end,omitempty"` ID int64 `json:"id,omitempty"` Matches []MatchCriteriaRC `json:"matches,omitempty"` MatchesAlways bool `json:"matchesAlways,omitempty"` AllowDeny AllowDeny `json:"allowDeny"` Disabled bool `json:"disabled,omitempty"` }
MatchRuleRC represents a Request Control (RC aka IG) match rule resource for create or update resource
type MatchRuleType ¶
type MatchRuleType string
MatchRuleType enum type
const ( // MatchRuleTypeALB represents rule type for Application Load Balancer (ALB) cloudlets MatchRuleTypeALB MatchRuleType = "albMatchRule" // MatchRuleTypeAP represents rule type for API Prioritization (AP) cloudlets MatchRuleTypeAP MatchRuleType = "apMatchRule" // MatchRuleTypeAS represents rule type for Application Segmentation (AS) cloudlets MatchRuleTypeAS MatchRuleType = "asMatchRule" // MatchRuleTypePR represents rule type for Phased Release (PR aka CD) cloudlets MatchRuleTypePR MatchRuleType = "cdMatchRule" // MatchRuleTypeER represents rule type for Edge Redirector (ER) cloudlets MatchRuleTypeER MatchRuleType = "erMatchRule" // MatchRuleTypeFR represents rule type for Forward Rewrite (FR) cloudlets MatchRuleTypeFR MatchRuleType = "frMatchRule" // MatchRuleTypeRC represents rule type for Request Control (RC aka IG) cloudlets MatchRuleTypeRC MatchRuleType = "igMatchRule" // MatchRuleTypeVP represents rule type for Visitor Prioritization (VP) cloudlets MatchRuleTypeVP MatchRuleType = "vpMatchRule" )
type MatchRuleVP ¶
type MatchRuleVP struct { Name string `json:"name,omitempty"` Type MatchRuleType `json:"type,omitempty"` Start int64 `json:"start,omitempty"` End int64 `json:"end,omitempty"` ID int64 `json:"id,omitempty"` Matches []MatchCriteriaVP `json:"matches,omitempty"` MatchURL string `json:"matchURL,omitempty"` PassThroughPercent *float64 `json:"passThroughPercent"` Disabled bool `json:"disabled,omitempty"` }
MatchRuleVP represents a Visitor Prioritization (VP) match rule resource for create or update resource
type MatchRules ¶
type MatchRules []MatchRule
MatchRules is an array of *MarchRuleALB or *MatchRuleER depending on the cloudletId (9 or 0) of the policy
func (*MatchRules) UnmarshalJSON ¶
func (m *MatchRules) UnmarshalJSON(b []byte) error
UnmarshalJSON helps to un-marshall items of MatchRules array as proper instances of *MatchRuleALB or *MatchRuleER
type Mock ¶
func (*Mock) ActivateLoadBalancerVersion ¶
func (m *Mock) ActivateLoadBalancerVersion(ctx context.Context, req ActivateLoadBalancerVersionRequest) (*LoadBalancerActivation, error)
func (*Mock) ActivatePolicyVersion ¶
func (m *Mock) ActivatePolicyVersion(ctx context.Context, req ActivatePolicyVersionRequest) ([]PolicyActivation, error)
func (*Mock) CreateLoadBalancerVersion ¶
func (m *Mock) CreateLoadBalancerVersion(ctx context.Context, req CreateLoadBalancerVersionRequest) (*LoadBalancerVersion, error)
func (*Mock) CreateOrigin ¶
func (*Mock) CreatePolicy ¶
func (*Mock) CreatePolicyVersion ¶
func (m *Mock) CreatePolicyVersion(ctx context.Context, req CreatePolicyVersionRequest) (*PolicyVersion, error)
func (*Mock) DeletePolicyProperty ¶
func (m *Mock) DeletePolicyProperty(ctx context.Context, req DeletePolicyPropertyRequest) error
func (*Mock) DeletePolicyVersion ¶
func (m *Mock) DeletePolicyVersion(ctx context.Context, req DeletePolicyVersionRequest) error
func (*Mock) GetLoadBalancerVersion ¶
func (m *Mock) GetLoadBalancerVersion(ctx context.Context, req GetLoadBalancerVersionRequest) (*LoadBalancerVersion, error)
func (*Mock) GetPolicyProperties ¶
func (m *Mock) GetPolicyProperties(ctx context.Context, req GetPolicyPropertiesRequest) (map[string]PolicyProperty, error)
func (*Mock) GetPolicyVersion ¶
func (m *Mock) GetPolicyVersion(ctx context.Context, req GetPolicyVersionRequest) (*PolicyVersion, error)
func (*Mock) ListLoadBalancerActivations ¶
func (m *Mock) ListLoadBalancerActivations(ctx context.Context, req ListLoadBalancerActivationsRequest) ([]LoadBalancerActivation, error)
func (*Mock) ListLoadBalancerVersions ¶
func (m *Mock) ListLoadBalancerVersions(ctx context.Context, req ListLoadBalancerVersionsRequest) ([]LoadBalancerVersion, error)
func (*Mock) ListOrigins ¶
func (m *Mock) ListOrigins(ctx context.Context, req ListOriginsRequest) ([]OriginResponse, error)
func (*Mock) ListPolicies ¶
func (*Mock) ListPolicyActivations ¶
func (m *Mock) ListPolicyActivations(ctx context.Context, req ListPolicyActivationsRequest) ([]PolicyActivation, error)
func (*Mock) ListPolicyVersions ¶
func (m *Mock) ListPolicyVersions(ctx context.Context, request ListPolicyVersionsRequest) ([]PolicyVersion, error)
func (*Mock) RemovePolicy ¶
func (m *Mock) RemovePolicy(ctx context.Context, policyID RemovePolicyRequest) error
func (*Mock) UpdateLoadBalancerVersion ¶
func (m *Mock) UpdateLoadBalancerVersion(ctx context.Context, req UpdateLoadBalancerVersionRequest) (*LoadBalancerVersion, error)
func (*Mock) UpdateOrigin ¶
func (*Mock) UpdatePolicy ¶
func (*Mock) UpdatePolicyVersion ¶
func (m *Mock) UpdatePolicyVersion(ctx context.Context, req UpdatePolicyVersionRequest) (*PolicyVersion, error)
type NetworkStatus ¶
type NetworkStatus struct { ActivatedBy string `json:"activatedBy"` ActivationDate string `json:"activationDate"` Version int64 `json:"version"` CloudletsOrigins map[string]CloudletsOrigin `json:"cloudletsOrigins"` ReferencedPolicies []string `json:"referencedPolicies"` }
NetworkStatus is the type for NetworkStatus of any activation
type ObjectMatchValueObject ¶
type ObjectMatchValueObject struct { Name string `json:"name"` Type ObjectMatchValueObjectType `json:"type"` NameCaseSensitive bool `json:"nameCaseSensitive"` NameHasWildcard bool `json:"nameHasWildcard"` Options *Options `json:"options,omitempty"` }
ObjectMatchValueObject represents an object match value resource for match criteria of type object
func (ObjectMatchValueObject) Validate ¶
func (o ObjectMatchValueObject) Validate() error
Validate validates ObjectMatchValueObject
type ObjectMatchValueObjectType ¶
type ObjectMatchValueObjectType string
ObjectMatchValueObjectType enum type
type ObjectMatchValueRange ¶
type ObjectMatchValueRange struct { Type ObjectMatchValueRangeType `json:"type"` Value []int64 `json:"value,omitempty"` }
ObjectMatchValueRange represents an object match value resource for match criteria of type range
func (ObjectMatchValueRange) Validate ¶
func (o ObjectMatchValueRange) Validate() error
Validate validates ObjectMatchValueRange
type ObjectMatchValueRangeType ¶
type ObjectMatchValueRangeType string
ObjectMatchValueRangeType enum type
type ObjectMatchValueSimple ¶
type ObjectMatchValueSimple struct { Type ObjectMatchValueSimpleType `json:"type"` Value []string `json:"value,omitempty"` }
ObjectMatchValueSimple represents an object match value resource for match criteria of type simple
func (ObjectMatchValueSimple) Validate ¶
func (o ObjectMatchValueSimple) Validate() error
Validate validates ObjectMatchValueSimple
type ObjectMatchValueSimpleType ¶
type ObjectMatchValueSimpleType string
ObjectMatchValueSimpleType enum type
type Options ¶
type Options struct { Value []string `json:"value,omitempty"` ValueHasWildcard bool `json:"valueHasWildcard,omitempty"` ValueCaseSensitive bool `json:"valueCaseSensitive,omitempty"` ValueEscaped bool `json:"valueEscaped,omitempty"` }
Options represents an option resource for ObjectMatchValueObject
type Origin ¶
type Origin struct { OriginID string `json:"originId"` Description string `json:"description"` Akamaized bool `json:"akamaized"` Checksum string `json:"checksum"` Type OriginType `json:"type"` }
Origin is a response returned by CreateOrigin
type OriginResponse ¶
OriginResponse is an Origin returned in ListOrigins
type OriginType ¶
type OriginType string
OriginType is a type for Origin Type
const ( // OriginTypeAll is a value to use when you want ListOrigins to return origins of all types OriginTypeAll OriginType = "" // OriginTypeCustomer is a value to use when you want ListOrigins to return only origins of CUSTOMER type OriginTypeCustomer OriginType = "CUSTOMER" // OriginTypeApplicationLoadBalancer is a value to use when you want ListOrigins to return only origins of APPLICATION_LOAD_BALANCER type OriginTypeApplicationLoadBalancer OriginType = "APPLICATION_LOAD_BALANCER" // OriginTypeNetStorage is a value to use when you want ListOrigins to return only origins of NETSTORAGE type OriginTypeNetStorage OriginType = "NETSTORAGE" )
type Policy ¶
type Policy struct { Location string `json:"location"` PolicyID int64 `json:"policyId"` GroupID int64 `json:"groupId"` Name string `json:"name"` Description string `json:"description"` CreatedBy string `json:"createdBy"` CreateDate float64 `json:"createDate"` LastModifiedBy string `json:"lastModifiedBy"` LastModifiedDate float64 `json:"lastModifiedDate"` Activations []PolicyActivation `json:"activations"` CloudletID int64 `json:"cloudletId"` CloudletCode string `json:"cloudletCode"` APIVersion string `json:"apiVersion"` Deleted bool `json:"deleted"` }
Policy is response returned by GetPolicy or UpdatePolicy
type PolicyActivation ¶
type PolicyActivation struct { APIVersion string `json:"apiVersion"` Network PolicyActivationNetwork `json:"network"` PolicyInfo PolicyInfo `json:"policyInfo"` PropertyInfo PropertyInfo `json:"propertyInfo"` }
PolicyActivation represents a policy activation resource
type PolicyActivationNetwork ¶
type PolicyActivationNetwork string
PolicyActivationNetwork is the activation network type for policy
const ( // PolicyActivationNetworkStaging is the staging network for policy PolicyActivationNetworkStaging PolicyActivationNetwork = "staging" // PolicyActivationNetworkProduction is the production network for policy PolicyActivationNetworkProduction PolicyActivationNetwork = "prod" )
func (*PolicyActivationNetwork) UnmarshalJSON ¶
func (n *PolicyActivationNetwork) UnmarshalJSON(data []byte) error
UnmarshalJSON unifies json network field into well defined values
type PolicyActivationStatus ¶
type PolicyActivationStatus string
PolicyActivationStatus is an activation status type for policy
const ( // PolicyActivationStatusActive is an activation that is currently active PolicyActivationStatusActive PolicyActivationStatus = "active" // PolicyActivationStatusDeactivated is an activation that is deactivated PolicyActivationStatusDeactivated PolicyActivationStatus = "deactivated" // PolicyActivationStatusInactive is an activation that is not active PolicyActivationStatusInactive PolicyActivationStatus = "inactive" // PolicyActivationStatusPending is status of a pending activation PolicyActivationStatusPending PolicyActivationStatus = "pending" // PolicyActivationStatusFailed is status of a failed activation PolicyActivationStatusFailed PolicyActivationStatus = "failed" )
type PolicyInfo ¶
type PolicyInfo struct { PolicyID int64 `json:"policyId"` Name string `json:"name"` Version int64 `json:"version"` Status PolicyActivationStatus `json:"status"` StatusDetail string `json:"statusDetail,omitempty"` ActivatedBy string `json:"activatedBy"` ActivationDate int64 `json:"activationDate"` }
PolicyInfo represents a policy info resource
type PolicyProperty ¶
type PolicyProperty struct { GroupID int64 `json:"groupId"` ID int64 `json:"id"` Name string `json:"name"` NewestVersion NetworkStatus `json:"newestVersion"` Production NetworkStatus `json:"production"` Staging NetworkStatus `json:"staging"` }
PolicyProperty contains the response data for a single property
type PolicyVersion ¶
type PolicyVersion struct { Location string `json:"location"` RevisionID int64 `json:"revisionId"` PolicyID int64 `json:"policyId"` Version int64 `json:"version"` Description string `json:"description"` CreatedBy string `json:"createdBy"` CreateDate int64 `json:"createDate"` LastModifiedBy string `json:"lastModifiedBy"` LastModifiedDate int64 `json:"lastModifiedDate"` RulesLocked bool `json:"rulesLocked"` Activations []PolicyActivation `json:"activations"` MatchRules MatchRules `json:"matchRules"` MatchRuleFormat MatchRuleFormat `json:"matchRuleFormat"` Deleted bool `json:"deleted,omitempty"` Warnings []Warning `json:"warnings,omitempty"` }
PolicyVersion is response returned by GetPolicyVersion, CreatePolicyVersion or UpdatePolicyVersion
type PolicyVersionActivation ¶
type PolicyVersionActivation struct { Network PolicyActivationNetwork `json:"network"` AdditionalPropertyNames []string `json:"additionalPropertyNames,omitempty"` }
PolicyVersionActivation is the body content for an ActivatePolicyVersion request
type PropertyInfo ¶
type PropertyInfo struct { Name string `json:"name"` Version int64 `json:"version"` GroupID int64 `json:"groupId"` Status PolicyActivationStatus `json:"status"` ActivatedBy string `json:"activatedBy"` ActivationDate int64 `json:"activationDate"` }
PropertyInfo represents a property info resource
type RemovePolicyRequest ¶
type RemovePolicyRequest struct {
PolicyID int64
}
RemovePolicyRequest describes the body of the remove policy request
type UpdateLoadBalancerVersionRequest ¶
type UpdateLoadBalancerVersionRequest struct { OriginID string ShouldValidate bool Version int64 LoadBalancerVersion LoadBalancerVersion }
UpdateLoadBalancerVersionRequest describes the parameters needed to update load balancer version
func (UpdateLoadBalancerVersionRequest) Validate ¶
func (v UpdateLoadBalancerVersionRequest) Validate() error
Validate validates UpdateLoadBalancerVersionRequest
type UpdateOriginRequest ¶
type UpdateOriginRequest struct { OriginID string Description }
UpdateOriginRequest describes the parameters of the update origin request
func (UpdateOriginRequest) Validate ¶
func (v UpdateOriginRequest) Validate() error
Validate validates UpdateOriginRequest
type UpdatePolicy ¶
type UpdatePolicy struct { Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` PropertyName string `json:"propertyName,omitempty"` GroupID int64 `json:"groupId,omitempty"` Deleted bool `json:"deleted,omitempty"` }
UpdatePolicy describes the body of the update policy request
type UpdatePolicyRequest ¶
type UpdatePolicyRequest struct { UpdatePolicy PolicyID int64 }
UpdatePolicyRequest describes the parameters for the update policy request
func (UpdatePolicyRequest) Validate ¶
func (v UpdatePolicyRequest) Validate() error
Validate validates UpdatePolicyRequest
type UpdatePolicyVersion ¶
type UpdatePolicyVersion struct { Description string `json:"description,omitempty"` MatchRuleFormat MatchRuleFormat `json:"matchRuleFormat,omitempty"` MatchRules MatchRules `json:"matchRules"` Deleted bool `json:"deleted"` }
UpdatePolicyVersion describes the body of the update policy version request
type UpdatePolicyVersionRequest ¶
type UpdatePolicyVersionRequest struct { UpdatePolicyVersion PolicyID int64 Version int64 }
UpdatePolicyVersionRequest describes the parameters of the update policy version request
func (UpdatePolicyVersionRequest) Validate ¶
func (o UpdatePolicyVersionRequest) Validate() error
Validate validates UpdatePolicyVersionRequest
type Warning ¶
type Warning struct { Detail string `json:"detail,omitempty"` JSONPointer string `json:"jsonPointer,omitempty"` Status int `json:"status,omitempty"` Title string `json:"title,omitempty"` Type string `json:"type,omitempty"` }
Warning represents warning information about the policy version request.