Documentation ¶
Index ¶
- func GetTags(client *golangsdk.ServiceClient, domainId string) ([]tags.ResourceTag, error)
- type CdnDomain
- type CdnDomainDetail
- type CreateOpts
- type CreateOptsBuilder
- type CreateResult
- type DeleteResult
- type DisableResult
- type DomainOriginHost
- type DomainSources
- type DomainSourcesDetail
- type EnableResult
- type ErrorResp
- type ExtensionOpts
- type GetDetailResult
- type GetResult
- type OriginOpts
- type OriginOptsBuilder
- type OriginResult
- type OriginSources
- type PrivateBucketAccessBuilder
- type PrivateBucketAccessOpts
- type PrivateBucketAccessResult
- type PrivateBucketAccessStatus
- type SourcesOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetTags ¶
func GetTags(client *golangsdk.ServiceClient, domainId string) ([]tags.ResourceTag, error)
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 CdnDomainDetail ¶
type CdnDomainDetail 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 and wholeSite BusinessType string `json:"business_type"` // the status of the acceleration domain name. DomainStatus string `json:"domain_status"` // the CNAME of the acceleration domain name CName string `json:"cname"` // the sources of the domain. Sources []DomainSourcesDetail `json:"sources"` // whether the HTTPS certificate is enabled HttpsStatus int `json:"https_status"` // time when the domain name was created. CreateTime int `json:"create_time"` // time when the domain name was modified. UpdateTime int `json:"update_time"` // whether the domain name is banned. Possible values: 0 (not banned) and 1 (banned). Disabled int `json:"disabled"` // whether the domain name is locked. Possible values: 0 (not locked) and 1 (locked). Locked int `json:"locked"` // service area of the CDN service. Valid values are mainland_china, outside_mainland_china, and global. ServiceArea string `json:"service_area"` }
CdnDomainDetail represents a CDN domain by domain name
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 area covered by the accelecration service ServiceArea string `json:"service_area,omitempty"` // 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 DomainSourcesDetail ¶
type DomainSourcesDetail struct { OriginType string `json:"origin_type"` OriginAddr string `json:"origin_addr"` Priority int `json:"priority"` ObsWebHostingStatus string `json:"obs_web_hosting_status"` HttpPort int `json:"http_port"` HttpsPort int `json:"https_port"` HostName string `json:"host_name"` ObsBucketType string `json:"obs_bucket_type"` }
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 GetDetailResult ¶
type GetDetailResult struct {
// contains filtered or unexported fields
}
func GetByName ¶
func GetByName(client *golangsdk.ServiceClient, domainName string, opts *ExtensionOpts) (r GetDetailResult)
func (GetDetailResult) Extract ¶
func (r GetDetailResult) Extract() (*CdnDomainDetail, error)
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
deprecated
func Get(client *golangsdk.ServiceClient, id string, opts *ExtensionOpts) (r GetResult)
Deprecated: Use GetByName instead. 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 PrivateBucketAccessOpts ¶
type PrivateBucketAccessOpts struct {
Status *bool `json:"status,omitempty"`
}
func (PrivateBucketAccessOpts) ToCdnUpdatePrivateBucketAccessMap ¶
func (opts PrivateBucketAccessOpts) ToCdnUpdatePrivateBucketAccessMap() (map[string]interface{}, error)
type PrivateBucketAccessResult ¶
type PrivateBucketAccessResult struct {
// contains filtered or unexported fields
}
func UpdatePrivateBucketAccess ¶
func UpdatePrivateBucketAccess(client *golangsdk.ServiceClient, domainId string, opts PrivateBucketAccessBuilder) (r PrivateBucketAccessResult)
func (PrivateBucketAccessResult) Extract ¶
func (r PrivateBucketAccessResult) Extract() (*PrivateBucketAccessStatus, error)
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"` }
SourcesOpts specifies the domain name or the IP address of the origin server