aliyungo: github.com/denverdino/aliyungo/cdn Index | Files | Directories

package cdn

import "github.com/denverdino/aliyungo/cdn"

Index

Package Files

client.go config.go domain.go refresh.go service.go types.go

Constants

const (
    // CDNDefaultEndpoint is the default API endpoint of CDN services
    CDNDefaultEndpoint = "https://cdn.aliyuncs.com"
    CDNAPIVersion      = "2014-11-11"
)
const (
    Web                       = "web"
    Download                  = "download"
    Video                     = "video"
    LiveStream                = "liveStream"
    Ipaddr                    = "ipaddr"
    Domain                    = "domain"
    OSS                       = "oss"
    Domestic                  = "domestic"
    Overseas                  = "overseas"
    Global                    = "global"
    ContentType               = "Content-Type"
    CacheControl              = "Cache-Control"
    ContentDisposition        = "Content-Disposition"
    ContentLanguage           = "Content-Language"
    Expires                   = "Expires"
    AccessControlAllowOrigin  = "Access-Control-Allow-Origin"
    AccessControlAllowMethods = "Access-Control-Allow-Methods"
    AccessControlMaxAge       = "Access-Control-Max-Age"
)

Variables

var CdnTypes = []string{Web, Download, Video, LiveStream}
var HeaderKeys = []string{ContentType, CacheControl, ContentDisposition, ContentLanguage, Expires, AccessControlAllowMethods, AccessControlAllowOrigin, AccessControlMaxAge}
var Scopes = []string{Domestic, Overseas, Global}
var SourceTypes = []string{Ipaddr, Domain, OSS}

type AddDomainRequest Uses

type AddDomainRequest struct {
    DomainName string
    CdnType    string
    //optional
    SourceType string
    SourcePort int
    Sources    string
    Scope      string
}

type CacheConfigRequest Uses

type CacheConfigRequest struct {
    DomainName   string
    CacheContent string
    TTL          string
    // optional
    Weight string
}

type CacheExpiredConfig Uses

type CacheExpiredConfig struct {
    Status       string
    TTL          string
    CacheType    string
    Weight       string
    CacheContent string
    ConfigId     string
}

type CdnClient Uses

type CdnClient struct {
    common.Client
}

func NewClient Uses

func NewClient(accessKeyId string, accessKeySecret string) *CdnClient

func NewClientWithEndpoint Uses

func NewClientWithEndpoint(endpoint string, accessKeyId string, accessKeySecret string) *CdnClient

func (*CdnClient) AddCdnDomain Uses

func (client *CdnClient) AddCdnDomain(req AddDomainRequest) (CdnCommonResponse, error)

func (*CdnClient) DeleteCacheExpiredConfig Uses

func (client *CdnClient) DeleteCacheExpiredConfig(req DeleteCacheConfigRequest) (CdnCommonResponse, error)

func (*CdnClient) DeleteCdnDomain Uses

func (client *CdnClient) DeleteCdnDomain(req DescribeDomainRequest) (CdnCommonResponse, error)

func (*CdnClient) DeleteHttpHeaderConfig Uses

func (client *CdnClient) DeleteHttpHeaderConfig(req DeleteHttpHeaderConfigRequest) (CdnCommonResponse, error)

func (*CdnClient) DescribeCdnDomainDetail Uses

func (client *CdnClient) DescribeCdnDomainDetail(req DescribeDomainRequest) (DomainResponse, error)

func (*CdnClient) DescribeCdnService Uses

func (client *CdnClient) DescribeCdnService() (ServiceResponse, error)

func (*CdnClient) DescribeDomainConfigs Uses

func (client *CdnClient) DescribeDomainConfigs(req DomainConfigRequest) (DomainConfigResponse, error)

func (*CdnClient) DescribeDomainsBySource Uses

func (client *CdnClient) DescribeDomainsBySource(req DescribeDomainsBySourceRequest) (DomainBySourceResponse, error)

func (*CdnClient) DescribeRefreshQuota Uses

func (client *CdnClient) DescribeRefreshQuota() (QuotaResponse, error)

func (*CdnClient) DescribeRefreshTasks Uses

func (client *CdnClient) DescribeRefreshTasks(req DescribeRequest) (DescribeResponse, error)

func (*CdnClient) DescribeUserDomains Uses

func (client *CdnClient) DescribeUserDomains(req DescribeDomainsRequest) (DomainsResponse, error)

func (*CdnClient) ModifyCdnDomain Uses

func (client *CdnClient) ModifyCdnDomain(req ModifyDomainRequest) (CdnCommonResponse, error)

func (*CdnClient) ModifyCdnService Uses

func (client *CdnClient) ModifyCdnService(req ServiceRequest) (CdnCommonResponse, error)

func (*CdnClient) ModifyFileCacheExpiredConfig Uses

func (client *CdnClient) ModifyFileCacheExpiredConfig(req ModifyCacheConfigRequest) (CdnCommonResponse, error)

func (*CdnClient) ModifyHttpHeaderConfig Uses

func (client *CdnClient) ModifyHttpHeaderConfig(req ModifyHttpHeaderConfigRequest) (CdnCommonResponse, error)

func (*CdnClient) ModifyPathCacheExpiredConfig Uses

func (client *CdnClient) ModifyPathCacheExpiredConfig(req ModifyCacheConfigRequest) (CdnCommonResponse, error)

func (*CdnClient) OpenCdnService Uses

func (client *CdnClient) OpenCdnService(req ServiceRequest) (CdnCommonResponse, error)

func (*CdnClient) PushObjectCache Uses

func (client *CdnClient) PushObjectCache(req RefreshRequest) (PushResponse, error)

func (*CdnClient) RefreshObjectCaches Uses

func (client *CdnClient) RefreshObjectCaches(req RefreshRequest) (RefreshResponse, error)

func (*CdnClient) SetDomainServerCertificate Uses

func (client *CdnClient) SetDomainServerCertificate(req CertificateRequest) (CdnCommonResponse, error)

func (*CdnClient) SetErrorPageConfig Uses

func (client *CdnClient) SetErrorPageConfig(req ErrorPageConfigRequest) (CdnCommonResponse, error)

func (*CdnClient) SetFileCacheExpiredConfig Uses

func (client *CdnClient) SetFileCacheExpiredConfig(req CacheConfigRequest) (CdnCommonResponse, error)

func (*CdnClient) SetForceRedirectConfig Uses

func (client *CdnClient) SetForceRedirectConfig(req RedirectConfigRequest) (CdnCommonResponse, error)

func (*CdnClient) SetHttpHeaderConfig Uses

func (client *CdnClient) SetHttpHeaderConfig(req HttpHeaderConfigRequest) (CdnCommonResponse, error)

func (*CdnClient) SetIgnoreQueryStringConfig Uses

func (client *CdnClient) SetIgnoreQueryStringConfig(req QueryStringConfigRequest) (CdnCommonResponse, error)

func (*CdnClient) SetIpBlackListConfig Uses

func (client *CdnClient) SetIpBlackListConfig(req IpBlackRequest) (CdnCommonResponse, error)

func (*CdnClient) SetOptimizeConfig Uses

func (client *CdnClient) SetOptimizeConfig(req ConfigRequest) (CdnCommonResponse, error)

func (*CdnClient) SetPageCompressConfig Uses

func (client *CdnClient) SetPageCompressConfig(req ConfigRequest) (CdnCommonResponse, error)

func (*CdnClient) SetPathCacheExpiredConfig Uses

func (client *CdnClient) SetPathCacheExpiredConfig(req CacheConfigRequest) (CdnCommonResponse, error)

func (*CdnClient) SetRangeConfig Uses

func (client *CdnClient) SetRangeConfig(req ConfigRequest) (CdnCommonResponse, error)

func (*CdnClient) SetRefererConfig Uses

func (client *CdnClient) SetRefererConfig(req ReferConfigRequest) (CdnCommonResponse, error)

func (*CdnClient) SetReqAuthConfig Uses

func (client *CdnClient) SetReqAuthConfig(req ReqAuthConfigRequest) (CdnCommonResponse, error)

func (*CdnClient) SetSourceHostConfig Uses

func (client *CdnClient) SetSourceHostConfig(req HostConfigRequest) (CdnCommonResponse, error)

func (*CdnClient) SetVideoSeekConfig Uses

func (client *CdnClient) SetVideoSeekConfig(req ConfigRequest) (CdnCommonResponse, error)

func (*CdnClient) StartCdnDomain Uses

func (client *CdnClient) StartCdnDomain(req DescribeDomainRequest) (CdnCommonResponse, error)

func (*CdnClient) StopCdnDomain Uses

func (client *CdnClient) StopCdnDomain(req DescribeDomainRequest) (CdnCommonResponse, error)

type CdnCommonResponse Uses

type CdnCommonResponse struct {
    common.Response
}

type CertificateRequest Uses

type CertificateRequest struct {
    DomainName              string
    CertName                string
    ServerCertificateStatus string
    // optional
    ServerCertificate string
    PrivateKey        string
}

type ConfigRequest Uses

type ConfigRequest struct {
    DomainName string
    Enable     string
}

type DeleteCacheConfigRequest Uses

type DeleteCacheConfigRequest struct {
    DomainName string
    CacheType  string
    ConfigID   string
}

type DeleteHttpHeaderConfigRequest Uses

type DeleteHttpHeaderConfigRequest struct {
    DomainName string
    ConfigID   string
}

type DescribeDomainRequest Uses

type DescribeDomainRequest struct {
    DomainName string
}

type DescribeDomainsBySourceRequest Uses

type DescribeDomainsBySourceRequest struct {
    Sources string
}

type DescribeDomainsRequest Uses

type DescribeDomainsRequest struct {
    //optional
    common.Pagination
    DomainName       string
    DomainStatus     string
    DomainSearchType string
}

type DescribeRequest Uses

type DescribeRequest struct {
    // optional
    TaskId     string
    ObjectPath string
    common.Pagination
}

type DescribeResponse Uses

type DescribeResponse struct {
    CdnCommonResponse
    common.PaginationResult
    Tasks struct {
        CDNTask []Task
    }
}

type DomainBySourceResponse Uses

type DomainBySourceResponse struct {
    CdnCommonResponse
    Sources     string
    DomainsList struct {
        DomainsData []DomainsData
    }
}

type DomainConfigRequest Uses

type DomainConfigRequest struct {
    DomainName string
    // optional
    ConfigList string
}

type DomainConfigResponse Uses

type DomainConfigResponse struct {
    CdnCommonResponse
    DomainConfigs DomainConfigs
}

type DomainConfigs Uses

type DomainConfigs struct {
    PageCompressConfig struct {
        Enable   string
        ConfigId string
        Status   string
    }
    WafConfig struct {
        Enable string
    }
    IgnoreQueryStringConfig struct {
        Enable      string
        ConfigId    string
        Status      string
        HashKeyArgs string
    }
    VideoSeekConfig struct {
        Enable   string
        ConfigId string
        Status   string
    }
    ReqAuthConfig struct {
        Key1     string
        Key2     string
        AuthType string
        TimeOut  string
    }
    RangeConfig struct {
        Enable   string
        ConfigId string
        Status   string
    }
    SrcHostConfig struct {
        DomainName string
    }
    OptimizeConfig struct {
        Enable   string
        ConfigId string
        Status   string
    }
    ErrorPageConfig struct {
        PageType      string
        CustomPageUrl string
        ErrorCode     string
    }
    RefererConfig struct {
        AllowEmpty string
        ReferType  string
        ReferList  string
    }
    CcConfig struct {
        Enable   string
        AllowIps string
        BlockIps string
        ConfigId string
        Status   string
    }
    HttpHeaderConfigs struct {
        HttpHeaderConfig []HttpHeaderConfig
    }
    CacheExpiredConfigs struct {
        CacheExpiredConfig []CacheExpiredConfig
    }
    NotifyUrlConfig struct {
        Enable    string
        NotifyUrl string
    }
    RedirectTypeConfig struct {
        RedirectType string
    }
}

type DomainDetail Uses

type DomainDetail struct {
    DomainName              string
    Cname                   string
    HttpsCname              string
    Scope                   string
    CdnType                 string
    SourceType              string
    GmtCreated              string
    GmtModified             string
    DomainStatus            string
    CertificateName         string
    ServerCertificate       string
    ServerCertificateStatus string
    Sources                 struct {
        Source []string
    }
}

type DomainInfo Uses

type DomainInfo struct {
    DomainName  string
    Status      string
    CreateTime  string
    UpdateTime  string
    DomainCname string
}

type DomainResponse Uses

type DomainResponse struct {
    CdnCommonResponse
    GetDomainDetailModel DomainDetail
}

type Domains Uses

type Domains struct {
    DomainName   string
    Cname        string
    CdnType      string
    DomainStatus string
    GmtCreated   string
    GmtModified  string
    Description  string
}

type DomainsData Uses

type DomainsData struct {
    Source  string
    Domains struct {
        // contains filtered or unexported fields
    }
    DomainInfos struct {
        // contains filtered or unexported fields
    }
}

type DomainsResponse Uses

type DomainsResponse struct {
    CdnCommonResponse
    common.PaginationResult
    Domains struct {
        PageData []Domains
    }
}

type ErrorPageConfigRequest Uses

type ErrorPageConfigRequest struct {
    DomainName string
    PageType   string
    // optional
    CustomPageUrl string
}

type HostConfigRequest Uses

type HostConfigRequest struct {
    DomainName    string
    BackSrcDomain string
}

type HttpHeaderConfig Uses

type HttpHeaderConfig struct {
    Status      string
    HeaderKey   string
    HeaderValue string
    ConfigId    string
}

type HttpHeaderConfigRequest Uses

type HttpHeaderConfigRequest struct {
    DomainName  string
    HeaderKey   string
    HeaderValue string
}

type IpBlackRequest Uses

type IpBlackRequest struct {
    DomainName string
    // optional
    Enable   string
    BlockIps string
}

type LogDetail Uses

type LogDetail struct {
    LogName   string
    LogPath   string
    LogSize   int32
    StartTime string
    EndTime   string
}

type ModifyCacheConfigRequest Uses

type ModifyCacheConfigRequest struct {
    CacheConfigRequest
    ConfigID string
}

type ModifyDomainRequest Uses

type ModifyDomainRequest struct {
    DomainName string
    SourceType string
    SourcePort int
    Sources    string
}

type ModifyHttpHeaderConfigRequest Uses

type ModifyHttpHeaderConfigRequest struct {
    HttpHeaderConfigRequest
    ConfigID string
}

type MonitorDataItem Uses

type MonitorDataItem struct {
    TimeStamp         string
    QueryPerSecond    string
    BytesHitRate      string
    BytesPerSecond    string
    RequestHitRate    string
    AverageObjectSize string
}

type PushResponse Uses

type PushResponse struct {
    CdnCommonResponse
    PushTaskId string
}

type QueryStringConfigRequest Uses

type QueryStringConfigRequest struct {
    DomainName string
    Enable     string
    // optional
    HashKeyArgs string
}

type QuotaResponse Uses

type QuotaResponse struct {
    CdnCommonResponse
    UrlQuota  string
    DirQuota  string
    UrlRemain string
    DirRemain string
}

type RedirectConfigRequest Uses

type RedirectConfigRequest struct {
    DomainName   string
    RedirectType string
}

type ReferConfigRequest Uses

type ReferConfigRequest struct {
    DomainName string
    ReferType  string
    // optional
    ReferList  string
    AllowEmpty string
}

type RefreshRequest Uses

type RefreshRequest struct {
    ObjectPath string
    // optional
    ObjectType string
}

type RefreshResponse Uses

type RefreshResponse struct {
    CdnCommonResponse
    RefreshTaskId string
}

type ReqAuthConfigRequest Uses

type ReqAuthConfigRequest struct {
    DomainName string
    AuthType   string
    // optional
    Key1    string
    Key2    string
    Timeout string
}

type Service Uses

type Service struct {
    InternetChargeType string
    OpeningTime        string
    ChangingChargeType string
    ChangingAffectTime time.Time
    OperationLocks     struct {
        LockReason []string
    }
}

type ServiceRequest Uses

type ServiceRequest struct {
    InternetChargeType string
}

type ServiceResponse Uses

type ServiceResponse struct {
    CdnCommonResponse
    Service
}

type Task Uses

type Task struct {
    TaskId       string
    ObjectPath   string
    Status       string
    Process      string
    CreationTime time.Time
    Description  string
}

type TaskItem Uses

type TaskItem struct {
    TaskId       string
    ObjectPath   string
    Status       string
    CreationTime time.Time
}

Directories

PathSynopsis
auth

Package cdn imports 3 packages (graph) and is imported by 5 packages. Updated 2019-12-07. Refresh now. Tools for package owners.