Documentation ¶
Index ¶
- type AccessControls
- type AccessRule
- type AccessRuleAddOK
- type AccessRuleGetAllOK
- type AccessRuleGetOK
- type AddAccessRuleParams
- type Client
- func (c Client) AddAccessRule(params AddAccessRuleParams) (string, error)
- func (c Client) DeleteAccessRule(params DeleteAccessRuleParams) error
- func (c Client) GetAccessRule(params GetAccessRuleParams) (*AccessRuleGetOK, error)
- func (c Client) GetAllAccessRules(params GetAllAccessRulesParams) (*[]AccessRuleGetAllOK, error)
- func (c Client) UpdateAccessRule(params UpdateAccessRuleParams) error
- type ClientService
- type DeleteAccessRuleParams
- type GetAccessRuleParams
- type GetAllAccessRulesParams
- type UpdateAccessRuleParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessControls ¶
type AccessControls struct { // Contains entries that identify traffic that may access your content upon // passing a threat assessment. Accesslist []interface{} `json:"accesslist"` // Contains entries that identify traffic that will be blocked or for which // an alert will be generated. Blacklist []interface{} `json:"blacklist"` // Contains entries that identify traffic that may access your content // without undergoing threat assessment. Whitelist []interface{} `json:"whitelist"` }
AccessControls contains lists that identify traffic for access control
type AccessRule ¶
type AccessRule struct { // Identifies each allowed HTTP method (e.g., GET). AllowedHTTPMethods []string `json:"allowed_http_methods,omitempty"` // Identifies each allowed media type (e.g., application/json). AllowedRequestContentTypes []string `json:"allowed_request_content_types,omitempty"` // Contains access controls for autonomous system numbers (ASNs). // All entries are integer values. ASNAccessControls *AccessControls `json:"asn,omitempty"` // Contains access controls for cookies. // All entries are regular expressions. CookieAccessControls *AccessControls `json:"cookie,omitempty"` // Contains access controls for countries. // Specify each desired country using its country code. CountryAccessControls *AccessControls `json:"country,omitempty"` // Identifies an account by its customer account number. CustomerID string `json:"customer_id"` // Indicates each file extension for which WAF will send an alert or block // the request. DisallowedExtensions []string `json:"disallowed_extensions,omitempty"` // Indicates each request header for which WAF will send an alert or block // the request. DisallowedHeaders []string `json:"disallowed_headers,omitempty"` // Contains access controls for IPv4 and/or IPv6 addresses. // Specify each desired IP address using standard IPv4/IPv6 and CIDR // notation. IPAccessControls *AccessControls `json:"ip,omitempty"` // MaxFileSize Indicates the maximum file size, in bytes, for a POST // request body. MaxFileSize int `json:"max_file_size,omitempty"` // Assigns a name to this Access Rule. Name string `json:"name,omitempty"` // Contains access controls for referrers. // All entries are regular expressions. RefererAccessControls *AccessControls `json:"referer,omitempty"` // Determines the name of the response header that will be included with // blocked requests. ResponseHeaderName string `json:"response_header_name,omitempty"` // Contains access controls for URL paths. // All entries are regular expressions. URLAccessControls *AccessControls `json:"url,omitempty"` // Contains access controls for user agents. // All entries are regular expressions. UserAgentAccessControls *AccessControls `json:"user_agent,omitempty"` }
AccessRule contains the shared properties for the Create, Get, Update models for a single Access Rule
type AccessRuleGetAllOK ¶
type AccessRuleGetAllOK struct { // Indicates the system-defined ID for the Access Rule. ID string `json:"id"` // Indicates the name of the Access Rule. Name string `json:"name"` // Indicates the date and time at which the Access Rule was last modified. // TODO: Convert to time.Time LastModifiedDate string `json:"last_modified_date"` }
AccessRuleGetAllOK is a lightweight representation of an Access Rule. It is used specifically by the GetAllAccessRules action.
type AccessRuleGetOK ¶
type AccessRuleGetOK struct { /* Indicates the system-defined ID for the Access Rule. */ ID string `json:"id"` AccessRule /* Indicates the timestamp at which this Access Rule was last modified. Syntax: YYYY-MM-DDThh:mm:ss:ffffffZ Learn more: https://developer.edgecast.com/cdn/api/Content/References/Report_Date_Time_Format.htm */ LastModifiedDate string `json:"last_modified_date"` /* A string property that is reserved for future use. */ LastModifiedBy string `json:"last_modified_by"` /* A string property that is reserved for future use. */ Version string `json:"version"` }
AccessRuleGetOK -
type AddAccessRuleParams ¶
type AddAccessRuleParams struct { AccountNumber string AccessRule AccessRule }
AddAccessRuleParams -
func NewAddAccessRuleParams ¶
func NewAddAccessRuleParams() AddAccessRuleParams
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the Access Rules client.
func (Client) AddAccessRule ¶
func (c Client) AddAccessRule( params AddAccessRuleParams, ) (string, error)
AddAccessRule creates a new Access Rule for the provided account number and returns the new rule's system-generated ID
func (Client) DeleteAccessRule ¶
func (c Client) DeleteAccessRule( params DeleteAccessRuleParams, ) error
DeleteAccessRule deletes an Access Rule for the given account number using the provided Access Rule ID.
func (Client) GetAccessRule ¶
func (c Client) GetAccessRule( params GetAccessRuleParams, ) (*AccessRuleGetOK, error)
GetAccessRule retrieves an Access Rule for the provided account number with the provided Access Rule ID.
func (Client) GetAllAccessRules ¶
func (c Client) GetAllAccessRules( params GetAllAccessRulesParams, ) (*[]AccessRuleGetAllOK, error)
GetAllAccessRules retrieves all of the Access Rules for the provided account number.
func (Client) UpdateAccessRule ¶
func (c Client) UpdateAccessRule( params UpdateAccessRuleParams, ) error
UpdateAccessRule updates an Access Rule for the given account number using the provided Access Rule ID and Access Rule properties.
type ClientService ¶
type ClientService interface { AddAccessRule(params AddAccessRuleParams) (string, error) GetAllAccessRules( params GetAllAccessRulesParams, ) (*[]AccessRuleGetAllOK, error) GetAccessRule( params GetAccessRuleParams, ) (*AccessRuleGetOK, error) UpdateAccessRule( params UpdateAccessRuleParams, ) error DeleteAccessRule( params DeleteAccessRuleParams, ) error }
ClientService is the interface for Client methods.
type DeleteAccessRuleParams ¶
DeleteAccessRuleParams -
func NewDeleteAccessRuleParams ¶
func NewDeleteAccessRuleParams() DeleteAccessRuleParams
type GetAccessRuleParams ¶
func NewGetAccessRuleParams ¶
func NewGetAccessRuleParams() GetAccessRuleParams
type GetAllAccessRulesParams ¶
type GetAllAccessRulesParams struct {
AccountNumber string
}
GetAllAccessRulesParams -
type UpdateAccessRuleParams ¶
type UpdateAccessRuleParams struct { AccountNumber string AccessRuleID string AccessRule AccessRule }
UpdateAccessRuleParams -
func NewUpdateAccessRuleParams ¶
func NewUpdateAccessRuleParams() UpdateAccessRuleParams