Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CdnDomain ¶
type CdnDomain struct { // the acceleration domain name ID ID string `json:"id"` // the acceleration domain name DomainName string `json:"domain_name"` // the service type, valid values are web, download, video BusinessType string `json:"business_type"` // the domain ID of the domain name's owner UserDomainId string `json:"user_domain_id"` // the status of the acceleration domain name. DomainStatus string `json:"domain_status"` // the CNAME of the acceleration domain name CName string `json:"cname"` // the domain name or the IP address of the origin server Sources []DomainSources `json:"sources"` // the configuration information of the retrieval host OriginHost DomainOriginHost `json:"domain_origin_host"` // whether the HTTPS certificate is enabled HttpsStatus *int `json:"https_status"` // whether the status is disabled Disabled *int `json:"disabled"` // whether the status is locked Locked *int `json:"locked"` // the area covered by the accelecration service ServiceArea string `json:"service_area"` // whether range-based retrieval is enabled RangeStatus string `json:"range_status"` // a thrid-party CDN ThridPartCDN string `json:"third_part_cdn"` // the id of enterprise project EnterpriseProjectId string `json:"enterprise_project_id"` CreateTime time.Time `json:"-"` ModifyTime time.Time `json:"-"` }
CdnDomain represents a CDN domain
type CreateOpts ¶
type CreateOpts struct { // the acceleration domain name, the length of a label is within 50 characters. DomainName string `json:"domain_name" required:"true"` // the service type, valid values are web, downlaod and video BusinessType string `json:"business_type" required:"true"` // the domain name or the IP address of the origin server Sources []SourcesOpts `json:"sources" required:"true"` // the enterprise project ID EnterpriseProjectId string `json:"enterprise_project_id,omitempty"` }
CreateOpts specifies the attributes used to create a CDN domain.
func (CreateOpts) ToCdnDomainCreateMap ¶
func (opts CreateOpts) ToCdnDomainCreateMap() (map[string]interface{}, error)
ToCdnDomainCreateMap assembles a request body based on the contents of a CreateOpts.
type CreateOptsBuilder ¶
CreateOptsBuilder allows extensions to add additional parameters to the Create request.
type CreateResult ¶
type CreateResult struct {
// contains filtered or unexported fields
}
CreateResult is the result of a Create request.
func Create ¶
func Create(client *golangsdk.ServiceClient, opts CreateOptsBuilder) (r CreateResult)
Create implements a CDN domain create request.
func (CreateResult) Extract ¶
func (r CreateResult) Extract() (*CdnDomain, error)
func (CreateResult) ExtractInto ¶
func (r CreateResult) ExtractInto(v interface{}) error
type DeleteResult ¶
type DeleteResult struct {
// contains filtered or unexported fields
}
DeleteResult is the result of a Delete request. Call its ExtractErr method to determine if the request succeeded or failed.
func Delete ¶
func Delete(client *golangsdk.ServiceClient, id string, opts *ExtensionOpts) (r DeleteResult)
Delete requests a CDN domain to be deleted to the user in the current tenant.
func (DeleteResult) Extract ¶
func (r DeleteResult) Extract() (*CdnDomain, error)
func (DeleteResult) ExtractInto ¶
func (r DeleteResult) ExtractInto(v interface{}) error
type DisableResult ¶
type DisableResult struct {
// contains filtered or unexported fields
}
DisableResult is the result of a Disable request.
func Disable ¶
func Disable(client *golangsdk.ServiceClient, id string, opts *ExtensionOpts) (r DisableResult)
Disable implements a CDN domain disable request.
type DomainOriginHost ¶
type DomainOriginHost struct { DomainID string `json:"domain_id"` OriginHostType string `json:"origin_host_type"` CustomizeDomain string `json:"customize_domain"` }
domain_origin_host
type DomainSources ¶
type DomainSources struct { DomainID string `json:"domain_id"` IporDomain string `json:"ip_or_domain"` OriginType string `json:"origin_type"` ActiveStandby int `json:"active_standby"` }
sources
type EnableResult ¶
type EnableResult struct {
// contains filtered or unexported fields
}
EnableResult is the result of a Enable request.
func Enable ¶
func Enable(client *golangsdk.ServiceClient, id string, opts *ExtensionOpts) (r EnableResult)
Enable implements a CDN domain enable request.
type ExtensionOpts ¶
type ExtensionOpts struct { // specifies the enterprise_project_id. EnterpriseProjectId string `q:"enterprise_project_id"` }
ExtensionOpts allows extensions to add parameters to some requests the possible requests include get,delete,enable or disable.
func (ExtensionOpts) ToExtensionQuery ¶
func (opts ExtensionOpts) ToExtensionQuery() (string, error)
ToExtensionQuery formats a ExtensionOpts into a query string.
type GetResult ¶
type GetResult struct {
// contains filtered or unexported fields
}
GetResult is the response from a Get operation. Call its Extract method to interpret it as a CDN domain.
func Get ¶
func Get(client *golangsdk.ServiceClient, id string, opts *ExtensionOpts) (r GetResult)
Get retrieves a particular CDN domain based on its unique ID.
func (GetResult) ExtractInto ¶
type OriginOpts ¶
type OriginOpts struct { // the domain name or the IP address of the origin server Sources []SourcesOpts `json:"sources" required:"true"` }
OriginOpts specifies the attributes used to modify the orogin server.
func (OriginOpts) ToCdnDomainOriginMap ¶
func (opts OriginOpts) ToCdnDomainOriginMap() (map[string]interface{}, error)
ToCdnDomainOriginMap assembles a request body based on the contents of a OriginOpts.
type OriginOptsBuilder ¶
OriginOptsBuilder allows extensions to add additional parameters to the Origin request.
type OriginResult ¶
type OriginResult struct {
// contains filtered or unexported fields
}
OriginResult is the result of a origin request. Call its ExtractErr method to determine if the request succeeded or failed.
func Origin ¶
func Origin(client *golangsdk.ServiceClient, id string, opts *ExtensionOpts, req OriginOptsBuilder) (r OriginResult)
Modifying Information About the Origin Server
func (OriginResult) Extract ¶
func (r OriginResult) Extract() (*OriginSources, error)
func (OriginResult) ExtractInto ¶
func (r OriginResult) ExtractInto(v interface{}) error
type OriginSources ¶
type OriginSources struct { // the domain name or the IP address of the origin server Sources []DomainSources `json:"sources"` }
type SourcesOpts ¶
type SourcesOpts struct { IporDomain string `json:"ip_or_domain" required:"true"` OriginType string `json:"origin_type" required:"true"` ActiveStandby int `json:"active_standby" required:"true"` }
SourcesOpts specifies the domain name or the IP address of the origin server