cdn

package
v1.6.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 22, 2024 License: MIT, MIT Imports: 23 Imported by: 2

README

Go API client for cdn

<br/>https://ncloud.apigw.ntruss.com/cdn/v2

Overview

This API client was generated by the swagger-codegen project. By using the swagger-spec from a remote server, you can easily generate an API client.

  • API version: 2018-11-13T06:29:10Z
  • Package version: 1.1.2
  • Build package: io.swagger.codegen.languages.NcpGoForNcloudClientCodegen

Installation

Put the package under your project folder and add the following in import:

"./cdn"

Documentation for API Endpoints

All URIs are relative to https://ncloud.apigw.ntruss.com/cdn/v2

Class Method HTTP request Description
V2Api GetCdnPlusInstanceList Post /getCdnPlusInstanceList
V2Api GetCdnPlusPurgeHistoryList Post /getCdnPlusPurgeHistoryList
V2Api GetGlobalCdnInstanceList Post /getGlobalCdnInstanceList
V2Api GetGlobalCdnPurgeHistoryList Post /getGlobalCdnPurgeHistoryList
V2Api RequestCdnPlusPurge Post /requestCdnPlusPurge
V2Api RequestGlobalCdnPurge Post /requestGlobalCdnPurge

Documentation For Models

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CacheExpires

func CacheExpires(r *http.Response) time.Time

CacheExpires helper function to determine remaining time before repeating a request.

func NewConfiguration

func NewConfiguration(apiKeys ...*ncloud.APIKey) *ncloud.Configuration

Types

type APIClient

type APIClient struct {

	// API Services
	V2Api *V2ApiService
	// contains filtered or unexported fields
}

APIClient manages communication with the cdn API v2018-11-13T06:29:10Z In most cases there should be only one, shared, APIClient.

func NewAPIClient

func NewAPIClient(cfg *ncloud.Configuration) *APIClient

NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.

func (*APIClient) ChangeBasePath

func (c *APIClient) ChangeBasePath(path string)

Change base path to allow switching to mocks

type APIResponse

type APIResponse struct {
	*http.Response `json:"-"`
	Message        string `json:"message,omitempty"`
	// Operation is the name of the swagger operation.
	Operation string `json:"operation,omitempty"`
	// RequestURL is the request URL. This value is always available, even if the
	// embedded *http.Response is nil.
	RequestURL string `json:"url,omitempty"`
	// Method is the HTTP method used for the request.  This value is always
	// available, even if the embedded *http.Response is nil.
	Method string `json:"method,omitempty"`
	// Payload holds the contents of the response body (which may be nil or empty).
	// This is provided here as the raw response.Body() reader will have already
	// been drained.
	Payload []byte `json:"-"`
}

func NewAPIResponse

func NewAPIResponse(r *http.Response) *APIResponse

func NewAPIResponseWithError

func NewAPIResponseWithError(errorMessage string) *APIResponse

type CdnPlusInstance

type CdnPlusInstance struct {

	// CDN인스턴스번호
	CdnInstanceNo *string `json:"cdnInstanceNo,omitempty"`

	// CDN인스턴스상태
	CdnInstanceStatus *CommonCode `json:"cdnInstanceStatus,omitempty"`

	// CDN인스턴스OP
	CdnInstanceOperation *CommonCode `json:"cdnInstanceOperation,omitempty"`

	// CDN인스턴스상태명
	CdnInstanceStatusName *string `json:"cdnInstanceStatusName,omitempty"`

	// 생성일자
	CreateDate *string `json:"createDate,omitempty"`

	// UPTIME
	LastModifiedDate *string `json:"lastModifiedDate,omitempty"`

	// CDN인스턴스설명
	CdnInstanceDescription *string `json:"cdnInstanceDescription,omitempty"`

	// 서비스이름
	ServiceName *string `json:"serviceName,omitempty"`

	// 라이브트랜스코더여부
	IsForLiveTranscoder *bool `json:"isForLiveTranscoder,omitempty"`

	// 라이브트랜스코더인스턴스번호리스트
	LiveTranscoderInstanceNoList []*string `json:"liveTranscoderInstanceNoList,omitempty"`

	// Image Optimizer여부
	IsForImageOptimizer *bool `json:"isForImageOptimizer,omitempty"`

	// Image Optimizer인스턴스번호
	ImageOptimizerInstanceNo *string `json:"imageOptimizerInstanceNo,omitempty"`

	IsAvailablePartialDomainPurge *bool `json:"isAvailablePartialDomainPurge,omitempty"`

	// CDN+서비스도메인리스트
	CdnPlusServiceDomainList []*CdnPlusServiceDomain `json:"cdnPlusServiceDomainList,omitempty"`

	CdnPlusRule *CdnPlusRule `json:"cdnPlusRule,omitempty"`
}

type CdnPlusPurgeHistory

type CdnPlusPurgeHistory struct {

	// CDN인스턴스번호
	CdnInstanceNo *string `json:"cdnInstanceNo,omitempty"`

	// 퍼지ID
	PurgeId *string `json:"purgeId,omitempty"`

	// 전체퍼지여부
	IsWholePurge *bool `json:"isWholePurge,omitempty"`

	// 전체도메인퍼지여부
	IsWholeDomain *bool `json:"isWholeDomain,omitempty"`

	// CDN+서비스도메인리스트
	CdnPlusServiceDomainList []*CdnPlusServiceDomain `json:"cdnPlusServiceDomainList,omitempty"`

	// 대상디렉토리명
	TargetDirectoryName *string `json:"targetDirectoryName,omitempty"`

	// 타겟파일리스트
	TargetFileList []*string `json:"targetFileList,omitempty"`

	// 요청날짜
	RequestDate *string `json:"requestDate,omitempty"`

	// 퍼지상태
	PurgeStatusName *string `json:"purgeStatusName,omitempty"`
}

type CdnPlusRule

type CdnPlusRule struct {

	// 프로토콜구분코드
	ProtocolTypeCode *string `json:"protocolTypeCode,omitempty"`

	// 서비스도메인구분코드
	ServiceDomainTypeCode *string `json:"serviceDomainTypeCode,omitempty"`

	// 원본URL
	OriginUrl *string `json:"originUrl,omitempty"`

	// 원본경로
	OriginPath *string `json:"originPath,omitempty"`

	// 원본HTTP포트
	OriginHttpPort *int32 `json:"originHttpPort,omitempty"`

	// 원본HTTPS포트
	OriginHttpsPort *int32 `json:"originHttpsPort,omitempty"`

	// 포워드호스트헤더구분코드
	ForwardHostHeaderTypeCode *string `json:"forwardHostHeaderTypeCode,omitempty"`

	// 포워드호스트헤더
	ForwardHostHeader *string `json:"forwardHostHeader,omitempty"`

	// 캐쉬키호스트명구분코드
	CacheKeyHostNameTypeCode *string `json:"cacheKeyHostNameTypeCode,omitempty"`

	// GZIP압축사용여부
	IsGzipCompressionUse *bool `json:"isGzipCompressionUse,omitempty"`

	// 캐싱옵션구분코드
	CachingOptionTypeCode *string `json:"cachingOptionTypeCode,omitempty"`

	// 오류내용응답사용여부
	IsErrorContentsResponseUse *bool `json:"isErrorContentsResponseUse,omitempty"`

	// TTL캐싱
	CachingTtlTime *int32 `json:"cachingTtlTime,omitempty"`

	// 쿼리스트링무시여부
	IsQueryStringIgnoreUse *bool `json:"isQueryStringIgnoreUse,omitempty"`

	// 헤더제거사용여부
	IsRemoveVaryHeaderUse *bool `json:"isRemoveVaryHeaderUse,omitempty"`

	// 대용량파일최적화사용여부
	IsLargeFileOptimizationUse *bool `json:"isLargeFileOptimizationUse,omitempty"`

	// GZIP응답구분코드
	GzipResponseTypeCode *string `json:"gzipResponseTypeCode,omitempty"`

	// 레퍼러도메인사용여부
	IsReferrerDomainUse *bool `json:"isReferrerDomainUse,omitempty"`

	// 레퍼러도메인리스트
	ReferrerDomainList []*string `json:"referrerDomainList,omitempty"`

	// 레퍼러도메인제한사용여부
	IsReferrerDomainRestrictUse *bool `json:"isReferrerDomainRestrictUse,omitempty"`

	// 보안토큰사용여부
	IsSecureTokenUse *bool `json:"isSecureTokenUse,omitempty"`

	// 보안토큰비밀번호
	SecureTokenPassword *string `json:"secureTokenPassword,omitempty"`

	// 보안토큰재발급여부
	IsReissueSecureTokenPassword *bool `json:"isReissueSecureTokenPassword,omitempty"`

	// 인증서이름
	CertificateName *string `json:"certificateName,omitempty"`

	// 엑세스로그사용여부
	IsAccessLogUse *bool `json:"isAccessLogUse,omitempty"`

	// 엑세스로그파일스토리지인스턴스이름
	AccessLogFileStorageContainerName *string `json:"accessLogFileStorageContainerName,omitempty"`
}

type CdnPlusServiceDomain

type CdnPlusServiceDomain struct {

	// 도메인ID
	DomainId *string `json:"domainId,omitempty"`

	// 서비스도메인구분코드
	ServiceDomainTypeCode *string `json:"serviceDomainTypeCode,omitempty"`

	// 프로토콜구분코드
	ProtocolTypeCode *string `json:"protocolTypeCode,omitempty"`

	// 디폴트도메인이름
	DefaultDomainName *string `json:"defaultDomainName,omitempty"`

	// 유저도메인이름
	UserDomainName *string `json:"userDomainName,omitempty"`
}

type CommonCode

type CommonCode struct {
	Code *string `json:"code,omitempty"`

	CodeName *string `json:"codeName,omitempty"`
}

type GetCdnPlusInstanceListRequest

type GetCdnPlusInstanceListRequest struct {

	// CDN 인스턴스 번호
	CdnInstanceNo *string `json:"cdnInstanceNo,omitempty"`

	// 페이지 번호
	PageNo *int32 `json:"pageNo,omitempty"`

	// 페이지 사이즈
	PageSize *int32 `json:"pageSize,omitempty"`
}

type GetCdnPlusInstanceListResponse

type GetCdnPlusInstanceListResponse struct {
	RequestId *string `json:"requestId,omitempty"`

	ReturnCode *string `json:"returnCode,omitempty"`

	ReturnMessage *string `json:"returnMessage,omitempty"`

	TotalRows *int32 `json:"totalRows,omitempty"`

	CdnPlusInstanceList []*CdnPlusInstance `json:"cdnPlusInstanceList,omitempty"`
}

type GetCdnPlusPurgeHistoryListRequest

type GetCdnPlusPurgeHistoryListRequest struct {

	// CDN인스턴스번호
	CdnInstanceNo *string `json:"cdnInstanceNo"`

	// 퍼지ID리스트
	PurgeIdList []*string `json:"purgeIdList,omitempty"`
}

type GetCdnPlusPurgeHistoryListResponse

type GetCdnPlusPurgeHistoryListResponse struct {
	RequestId *string `json:"requestId,omitempty"`

	ReturnCode *string `json:"returnCode,omitempty"`

	ReturnMessage *string `json:"returnMessage,omitempty"`

	TotalRows *int32 `json:"totalRows,omitempty"`

	CdnPlusPurgeHistoryList []*CdnPlusPurgeHistory `json:"cdnPlusPurgeHistoryList,omitempty"`
}

type GetGlobalCdnInstanceListRequest

type GetGlobalCdnInstanceListRequest struct {

	// CDN 인스턴스 번호
	CdnInstanceNo *string `json:"cdnInstanceNo,omitempty"`

	// 페이지 번호
	PageNo *int32 `json:"pageNo,omitempty"`

	// 페이지 사이즈
	PageSize *int32 `json:"pageSize,omitempty"`
}

type GetGlobalCdnInstanceListResponse

type GetGlobalCdnInstanceListResponse struct {
	RequestId *string `json:"requestId,omitempty"`

	ReturnCode *string `json:"returnCode,omitempty"`

	ReturnMessage *string `json:"returnMessage,omitempty"`

	TotalRows *int32 `json:"totalRows,omitempty"`

	GlobalCdnInstanceList []*GlobalCdnInstance `json:"globalCdnInstanceList,omitempty"`
}

type GetGlobalCdnPurgeHistoryListRequest

type GetGlobalCdnPurgeHistoryListRequest struct {

	// CDN인스턴스번호
	CdnInstanceNo *string `json:"cdnInstanceNo"`

	// 퍼지ID리스트
	PurgeIdList []*string `json:"purgeIdList,omitempty"`
}

type GetGlobalCdnPurgeHistoryListResponse

type GetGlobalCdnPurgeHistoryListResponse struct {
	RequestId *string `json:"requestId,omitempty"`

	ReturnCode *string `json:"returnCode,omitempty"`

	ReturnMessage *string `json:"returnMessage,omitempty"`

	TotalRows *int32 `json:"totalRows,omitempty"`

	GlobalCdnPurgeHistoryList []*GlobalCdnPurgeHistory `json:"globalCdnPurgeHistoryList,omitempty"`
}

type GlobalCdnInstance

type GlobalCdnInstance struct {

	// CDN인스턴스번호
	CdnInstanceNo *string `json:"cdnInstanceNo,omitempty"`

	// CDN인스턴스상태
	CdnInstanceStatus *CommonCode `json:"cdnInstanceStatus,omitempty"`

	// CDN인스턴스OP
	CdnInstanceOperation *CommonCode `json:"cdnInstanceOperation,omitempty"`

	// CDN인스턴스상태명
	CdnInstanceStatusName *string `json:"cdnInstanceStatusName,omitempty"`

	// 생성일자
	CreateDate *string `json:"createDate,omitempty"`

	// UPTIME
	LastModifiedDate *string `json:"lastModifiedDate,omitempty"`

	// CDN인스턴스설명
	CdnInstanceDescription *string `json:"cdnInstanceDescription,omitempty"`

	// 서비스이름
	ServiceName *string `json:"serviceName,omitempty"`

	IsAvailablePartialDomainPurge *bool `json:"isAvailablePartialDomainPurge,omitempty"`

	GlobalCdnServiceDomainList []*GlobalCdnServiceDomain `json:"globalCdnServiceDomainList,omitempty"`

	GlobalCdnRule *GlobalCdnRule `json:"globalCdnRule,omitempty"`
}

type GlobalCdnPurgeHistory

type GlobalCdnPurgeHistory struct {

	// CDN인스턴스번호
	CdnInstanceNo *string `json:"cdnInstanceNo,omitempty"`

	// 퍼지ID
	PurgeId *string `json:"purgeId,omitempty"`

	// 전체퍼지여부
	IsWholePurge *bool `json:"isWholePurge,omitempty"`

	// 전체도메인퍼지여부
	IsWholeDomain *bool `json:"isWholeDomain,omitempty"`

	// Global CDN서비스도메인리스트
	GlobalCdnServiceDomainList []*GlobalCdnServiceDomain `json:"globalCdnServiceDomainList,omitempty"`

	// 타겟파일리스트
	TargetFileList []*string `json:"targetFileList,omitempty"`

	// 예상완료날짜
	EstimatedCompletionDate *string `json:"estimatedCompletionDate,omitempty"`

	// 성공여부
	IsSuccess *bool `json:"isSuccess,omitempty"`

	// 요청날짜
	RequestDate *string `json:"requestDate,omitempty"`
}

type GlobalCdnRule

type GlobalCdnRule struct {

	// 프로토콜구분코드
	ProtocolTypeCode *string `json:"protocolTypeCode,omitempty"`

	// 서비스도메인구분코드
	ServiceDomainTypeCode *string `json:"serviceDomainTypeCode,omitempty"`

	// 원본URL
	OriginUrl *string `json:"originUrl,omitempty"`

	// 원본경로
	OriginPath *string `json:"originPath,omitempty"`

	// 원본HTTP포트
	OriginHttpPort *int32 `json:"originHttpPort,omitempty"`

	// 원본HTTPS포트
	OriginHttpsPort *int32 `json:"originHttpsPort,omitempty"`

	// 포워드호스트헤더구분코드
	ForwardHostHeaderTypeCode *string `json:"forwardHostHeaderTypeCode,omitempty"`

	// 포워드호스트헤더
	ForwardHostHeader *string `json:"forwardHostHeader,omitempty"`

	// 캐쉬키호스트명구분코드
	CacheKeyHostNameTypeCode *string `json:"cacheKeyHostNameTypeCode,omitempty"`

	// GZIP압축사용여부
	IsGzipCompressionUse *bool `json:"isGzipCompressionUse,omitempty"`

	// 캐싱옵션구분코드
	CachingOptionTypeCode *string `json:"cachingOptionTypeCode,omitempty"`

	// 오류내용응답사용여부
	IsErrorContentsResponseUse *bool `json:"isErrorContentsResponseUse,omitempty"`

	// TTL캐싱
	CachingTtlTime *int32 `json:"cachingTtlTime,omitempty"`

	// 쿼리스트링무시여부
	IsQueryStringIgnoreUse *bool `json:"isQueryStringIgnoreUse,omitempty"`

	// 헤더제거사용여부
	IsRemoveVaryHeaderUse *bool `json:"isRemoveVaryHeaderUse,omitempty"`

	// 대용량파일최적화사용여부
	IsLargeFileOptimizationUse *bool `json:"isLargeFileOptimizationUse,omitempty"`

	// GZIP응답구분코드
	GzipResponseTypeCode *string `json:"gzipResponseTypeCode,omitempty"`

	// 레퍼러도메인사용여부
	IsReferrerDomainUse *bool `json:"isReferrerDomainUse,omitempty"`

	// 레퍼러도메인리스트
	ReferrerDomainList []*string `json:"referrerDomainList,omitempty"`

	// 레퍼러도메인제한사용여부
	IsReferrerDomainRestrictUse *bool `json:"isReferrerDomainRestrictUse,omitempty"`

	// 보안토큰사용여부
	IsSecureTokenUse *bool `json:"isSecureTokenUse,omitempty"`

	// 보안토큰비밀번호
	SecureTokenPassword *string `json:"secureTokenPassword,omitempty"`

	// 보안토큰재발급여부
	IsReissueSecureTokenPassword *bool `json:"isReissueSecureTokenPassword,omitempty"`

	// 인증서이름
	CertificateName *string `json:"certificateName,omitempty"`

	// 엑세스로그사용여부
	IsAccessLogUse *bool `json:"isAccessLogUse,omitempty"`

	// 엑세스로그파일스토리지인스턴스이름
	AccessLogFileStorageContainerName *string `json:"accessLogFileStorageContainerName,omitempty"`
}

type GlobalCdnServiceDomain

type GlobalCdnServiceDomain struct {

	// 서비스도메인구분코드
	ServiceDomainTypeCode *string `json:"serviceDomainTypeCode,omitempty"`

	// 프로토콜구분코드
	ProtocolTypeCode *string `json:"protocolTypeCode,omitempty"`

	// 디폴트도메인이름
	DefaultDomainName *string `json:"defaultDomainName,omitempty"`

	// 유저도메인이름
	UserDomainName *string `json:"userDomainName,omitempty"`
}

type RequestCdnPlusPurgeRequest

type RequestCdnPlusPurgeRequest struct {

	// CDN인스턴스번호
	CdnInstanceNo *string `json:"cdnInstanceNo"`

	// 도메인ID리스트
	DomainIdList []*string `json:"domainIdList,omitempty"`

	// 전체퍼지여부
	IsWholePurge *bool `json:"isWholePurge"`

	// 전체도메인여부
	IsWholeDomain *bool `json:"isWholeDomain"`

	// 대상파일리스트
	TargetFileList []*string `json:"targetFileList,omitempty"`

	// 대상디렉토리명
	TargetDirectoryName *string `json:"targetDirectoryName,omitempty"`
}

type RequestCdnPlusPurgeResponse

type RequestCdnPlusPurgeResponse struct {
	RequestId *string `json:"requestId,omitempty"`

	ReturnCode *string `json:"returnCode,omitempty"`

	ReturnMessage *string `json:"returnMessage,omitempty"`

	TotalRows *int32 `json:"totalRows,omitempty"`

	CdnPlusPurgeHistoryList []*CdnPlusPurgeHistory `json:"cdnPlusPurgeHistoryList,omitempty"`
}

type RequestGlobalCdnPurgeRequest

type RequestGlobalCdnPurgeRequest struct {

	// CDN인스턴스번호
	CdnInstanceNo *string `json:"cdnInstanceNo"`

	// 서비스도메인이름리스트
	ServiceDomainNameList []*string `json:"serviceDomainNameList,omitempty"`

	// 전체퍼지여부
	IsWholePurge *bool `json:"isWholePurge"`

	// 전체도메인여부
	IsWholeDomain *bool `json:"isWholeDomain"`

	// 대상파일리스트
	TargetFileList []*string `json:"targetFileList,omitempty"`
}

type RequestGlobalCdnPurgeResponse

type RequestGlobalCdnPurgeResponse struct {
	RequestId *string `json:"requestId,omitempty"`

	ReturnCode *string `json:"returnCode,omitempty"`

	ReturnMessage *string `json:"returnMessage,omitempty"`

	TotalRows *int32 `json:"totalRows,omitempty"`

	GlobalCdnPurgeHistoryList []*GlobalCdnPurgeHistory `json:"globalCdnPurgeHistoryList,omitempty"`
}

type V2ApiService

type V2ApiService service

func (*V2ApiService) GetCdnPlusInstanceList

func (a *V2ApiService) GetCdnPlusInstanceList(getCdnPlusInstanceListRequest *GetCdnPlusInstanceListRequest) (*GetCdnPlusInstanceListResponse, error)

V2ApiService CDN+인스턴스리스트조회 @param getCdnPlusInstanceListRequest getCdnPlusInstanceListRequest @return *GetCdnPlusInstanceListResponse

func (*V2ApiService) GetCdnPlusPurgeHistoryList

func (a *V2ApiService) GetCdnPlusPurgeHistoryList(getCdnPlusPurgeHistoryListRequest *GetCdnPlusPurgeHistoryListRequest) (*GetCdnPlusPurgeHistoryListResponse, error)

V2ApiService CDN+퍼지기록조회 @param getCdnPlusPurgeHistoryListRequest getCdnPlusPurgeHistoryListRequest @return *GetCdnPlusPurgeHistoryListResponse

func (*V2ApiService) GetGlobalCdnInstanceList

func (a *V2ApiService) GetGlobalCdnInstanceList(getGlobalCdnInstanceListRequest *GetGlobalCdnInstanceListRequest) (*GetGlobalCdnInstanceListResponse, error)

V2ApiService Global CDN 인스턴스리스트조회 @param getGlobalCdnInstanceListRequest getGlobalCdnInstanceListRequest @return *GetGlobalCdnInstanceListResponse

func (*V2ApiService) GetGlobalCdnPurgeHistoryList

func (a *V2ApiService) GetGlobalCdnPurgeHistoryList(getGlobalCdnPurgeHistoryListRequest *GetGlobalCdnPurgeHistoryListRequest) (*GetGlobalCdnPurgeHistoryListResponse, error)

V2ApiService Global CDN퍼지기록조회 @param getGlobalCdnPurgeHistoryListRequest getGlobalCdnPurgeHistoryListRequest @return *GetGlobalCdnPurgeHistoryListResponse

func (*V2ApiService) RequestCdnPlusPurge

func (a *V2ApiService) RequestCdnPlusPurge(requestCdnPlusPurgeRequest *RequestCdnPlusPurgeRequest) (*RequestCdnPlusPurgeResponse, error)

V2ApiService CDN+퍼지요청 @param requestCdnPlusPurgeRequest requestCdnPlusPurgeRequest @return *RequestCdnPlusPurgeResponse

func (*V2ApiService) RequestGlobalCdnPurge

func (a *V2ApiService) RequestGlobalCdnPurge(requestGlobalCdnPurgeRequest *RequestGlobalCdnPurgeRequest) (*RequestGlobalCdnPurgeResponse, error)

V2ApiService Global CDN퍼지요청 @param requestGlobalCdnPurgeRequest requestGlobalCdnPurgeRequest @return *RequestGlobalCdnPurgeResponse

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL