vod

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2023 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DSAHmacSha1 = "HMAC-SHA1"

	Version2 = "2.0"

	SprAuth = ":"
	SprSign = "&"

	DateYYYYMMDDTHHmmss = "20060102T150405Z"
)
View Source
const (
	FORMAT_JPEG     = "jpeg"
	FORMAT_PNG      = "png"
	FORMAT_WEBP     = "webp"
	FORMAT_AWEBP    = "awebp"
	FORMAT_GIF      = "gif"
	FORMAT_HEIC     = "heic"
	FORMAT_ORIGINAL = "image"

	HTTP  = "http"
	HTTPS = "https"

	KEY_SIG = "sig"

	VOD_TPL_OBJ         = "tplv-vod-obj"
	VOD_TPL_NOOP        = "tplv-vod-noop"
	VOD_TPL_RESIZE      = "tplv-vod-rs"
	VOD_TPL_CENTER_CROP = "tplv-vod-cc"
	VOD_TPL_SMART_CROP  = "tplv-vod-cs"
	VOD_TPL_SIG         = "tplv-bd-sig"
)

Variables

View Source
var (
	ServiceVOD = []byte("vod")

	ErrAccessKeyInvalid = errors.New("access key invalid")
	ErrSecretKeyInvalid = errors.New("secret key invalid")
)
View Source
var (
	ServiceInfoMap = map[string]*base.ServiceInfo{
		base.RegionApSingapore: {
			Timeout: 60 * time.Second,
			Host:    "vod.byteplusapi.com",
			Header: http.Header{
				"Accept": []string{"application/json"},
			},
			Credentials: base.Credentials{Region: base.RegionApSingapore, Service: "vod"},
		},
	}

	ApiInfoList = map[string]*base.ApiInfo{

		"GetPlayInfo": {
			Method: http.MethodGet,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"GetPlayInfo"},
				"Version": []string{"2023-01-01"},
			},
		},
		"GetPlayInfoWithLiveTimeShiftScene": {
			Method: http.MethodGet,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"GetPlayInfoWithLiveTimeShiftScene"},
				"Version": []string{"2023-01-01"},
			},
		},
		"GetPrivateDrmPlayAuth": {
			Method: http.MethodGet,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"GetPrivateDrmPlayAuth"},
				"Version": []string{"2023-01-01"},
			},
		},

		"UploadMediaByUrl": {
			Method: http.MethodGet,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"UploadMediaByUrl"},
				"Version": []string{"2023-01-01"},
			},
		},
		"QueryUploadTaskInfo": {
			Method: http.MethodGet,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"QueryUploadTaskInfo"},
				"Version": []string{"2023-01-01"},
			},
		},
		"ApplyUploadInfo": {
			Method: http.MethodGet,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"ApplyUploadInfo"},
				"Version": []string{"2023-01-01"},
			},
		},
		"CommitUploadInfo": {
			Method: http.MethodGet,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"CommitUploadInfo"},
				"Version": []string{"2023-01-01"},
			},
			Timeout: 8 * time.Second,
		},

		"UpdateMediaInfo": {
			Method: http.MethodGet,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"UpdateMediaInfo"},
				"Version": []string{"2023-01-01"},
			},
		},
		"UpdateMediaPublishStatus": {
			Method: http.MethodGet,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"UpdateMediaPublishStatus"},
				"Version": []string{"2023-01-01"},
			},
		},
		"UpdateMediaStorageClass": {
			Method: http.MethodGet,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"UpdateMediaStorageClass"},
				"Version": []string{"2023-01-01"},
			},
		},
		"GetMediaInfos": {
			Method: http.MethodGet,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"GetMediaInfos"},
				"Version": []string{"2023-01-01"},
			},
		},
		"GetRecommendedPoster": {
			Method: http.MethodGet,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"GetRecommendedPoster"},
				"Version": []string{"2023-01-01"},
			},
		},
		"DeleteMedia": {
			Method: http.MethodGet,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"DeleteMedia"},
				"Version": []string{"2023-01-01"},
			},
		},
		"DeleteTranscodes": {
			Method: http.MethodGet,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"DeleteTranscodes"},
				"Version": []string{"2023-01-01"},
			},
		},
		"GetMediaList": {
			Method: http.MethodGet,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"GetMediaList"},
				"Version": []string{"2023-01-01"},
			},
		},
		"GetSubtitleInfoList": {
			Method: http.MethodGet,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"GetSubtitleInfoList"},
				"Version": []string{"2023-01-01"},
			},
		},
		"UpdateSubtitleStatus": {
			Method: http.MethodGet,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"UpdateSubtitleStatus"},
				"Version": []string{"2023-01-01"},
			},
		},
		"UpdateSubtitleInfo": {
			Method: http.MethodGet,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"UpdateSubtitleInfo"},
				"Version": []string{"2023-01-01"},
			},
		},
		"CreateVideoClassification": {
			Method: http.MethodGet,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"CreateVideoClassification"},
				"Version": []string{"2023-01-01"},
			},
		},
		"UpdateVideoClassification": {
			Method: http.MethodGet,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"UpdateVideoClassification"},
				"Version": []string{"2023-01-01"},
			},
		},
		"DeleteVideoClassification": {
			Method: http.MethodGet,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"DeleteVideoClassification"},
				"Version": []string{"2023-01-01"},
			},
		},
		"ListVideoClassifications": {
			Method: http.MethodGet,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"ListVideoClassifications"},
				"Version": []string{"2023-01-01"},
			},
		},
		"ListSnapshots": {
			Method: http.MethodGet,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"ListSnapshots"},
				"Version": []string{"2023-01-01"},
			},
		},

		"StartWorkflow": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"StartWorkflow"},
				"Version": []string{"2023-01-01"},
			},
		},
		"RetrieveTranscodeResult": {
			Method: http.MethodGet,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"RetrieveTranscodeResult"},
				"Version": []string{"2023-01-01"},
			},
		},
		"GetWorkflowExecution": {
			Method: http.MethodGet,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"GetWorkflowExecution"},
				"Version": []string{"2023-01-01"},
			},
		},

		"CreateSpace": {
			Method: http.MethodGet,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"CreateSpace"},
				"Version": []string{"2023-01-01"},
			},
		},
		"ListSpace": {
			Method: http.MethodGet,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"ListSpace"},
				"Version": []string{"2023-01-01"},
			},
		},
		"GetSpaceDetail": {
			Method: http.MethodGet,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"GetSpaceDetail"},
				"Version": []string{"2023-01-01"},
			},
		},
		"UpdateSpaceUploadConfig": {
			Method: http.MethodGet,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"UpdateSpaceUploadConfig"},
				"Version": []string{"2023-01-01"},
			},
		},
		"DescribeVodSpaceStorageData": {
			Method: http.MethodGet,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"DescribeVodSpaceStorageData"},
				"Version": []string{"2023-01-01"},
			},
		},

		"ListDomain": {
			Method: http.MethodGet,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"ListDomain"},
				"Version": []string{"2023-01-01"},
			},
		},
		"CreateCdnRefreshTask": {
			Method: http.MethodGet,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"CreateCdnRefreshTask"},
				"Version": []string{"2023-01-01"},
			},
		},
		"CreateCdnPreloadTask": {
			Method: http.MethodGet,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"CreateCdnPreloadTask"},
				"Version": []string{"2023-01-01"},
			},
		},
		"ListCdnTasks": {
			Method: http.MethodGet,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"ListCdnTasks"},
				"Version": []string{"2023-01-01"},
			},
		},
		"ListCdnAccessLog": {
			Method: http.MethodGet,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"ListCdnAccessLog"},
				"Version": []string{"2023-01-01"},
			},
		},
		"ListCdnTopAccessUrl": {
			Method: http.MethodGet,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"ListCdnTopAccessUrl"},
				"Version": []string{"2023-01-01"},
			},
		},
		"DescribeVodDomainBandwidthData": {
			Method: http.MethodGet,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"DescribeVodDomainBandwidthData"},
				"Version": []string{"2023-01-01"},
			},
		},
		"ListCdnUsageData": {
			Method: http.MethodGet,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"ListCdnUsageData"},
				"Version": []string{"2023-01-01"},
			},
		},
		"ListCdnStatusData": {
			Method: http.MethodGet,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"ListCdnStatusData"},
				"Version": []string{"2023-01-01"},
			},
		},
		"DescribeIpInfo": {
			Method: http.MethodGet,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"DescribeIpInfo"},
				"Version": []string{"2023-01-01"},
			},
		},
		"DescribeVodDomainTrafficData": {
			Method: http.MethodGet,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"DescribeVodDomainTrafficData"},
				"Version": []string{"2023-01-01"},
			},
		},
		"ListCdnPvData": {
			Method: http.MethodGet,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"ListCdnPvData"},
				"Version": []string{"2023-01-01"},
			},
		},
		"CreateDomain": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"CreateDomain"},
				"Version": []string{"2023-01-01"},
			},
		},
		"UpdateDomainExpire": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"UpdateDomainExpire"},
				"Version": []string{"2023-01-01"},
			},
		},

		"AddCallbackSubscription": {
			Method: http.MethodGet,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"AddCallbackSubscription"},
				"Version": []string{"2023-01-01"},
			},
		},
		"SetCallbackEvent": {
			Method: http.MethodGet,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"SetCallbackEvent"},
				"Version": []string{"2023-01-01"},
			},
		},

		"DescribeVodSpaceTranscodeData": {
			Method: http.MethodGet,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"DescribeVodSpaceTranscodeData"},
				"Version": []string{"2023-01-01"},
			},
		},
		"DescribeVodSnapshotData": {
			Method: http.MethodGet,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"DescribeVodSnapshotData"},
				"Version": []string{"2023-01-01"},
			},
		},
	}
)
View Source
var (
	ErrKvSig = errors.New("Input kv already has sig query")
)

Functions

func BuildSign

func BuildSign(dsa, version, timestamp string, key []byte) string

func GetDate

func GetDate(t time.Time) string

Types

type AdvanceOption

type AdvanceOption struct {
	Parallel  int
	Stream    int
	SliceSize int
}

type ApplyUploadParam

type ApplyUploadParam struct {
	SpaceName  string
	SessionKey string
	FileType   FileType
	FileSize   int
	UploadNum  int
}

type ApplyUploadResp

type ApplyUploadResp struct {
	base.CommonResponse
	Result ApplyUploadResult
}

type ApplyUploadResult

type ApplyUploadResult struct {
	RequestID     string
	UploadAddress UploadAddress
}

type BaseResp

type BaseResp struct {
	StatusMessage string
	StatusCode    int
}

type CommitUploadBody

type CommitUploadBody struct {
	CallbackArgs string
	SessionKey   string
	Functions    []Function
}

type CommitUploadParam

type CommitUploadParam struct {
	SpaceName string
	Body      CommitUploadBody
}

type CommitUploadResp

type CommitUploadResp struct {
	base.CommonResponse
	Result CommitUploadResult
}

type CommitUploadResult

type CommitUploadResult struct {
	RequestId    string
	CallbackArgs string
	Results      []UploadResult
}

type DomainInfo

type DomainInfo struct {
	MainDomain   string
	BackupDomain string
}

type Encryption

type Encryption struct {
	Uri       string
	SecretKey string
	Algorithm string
	Version   string
	SourceMd5 string
	Extra     map[string]string
}

type EntryptionInput

type EntryptionInput struct {
	Config       map[string]string
	PolicyParams map[string]string
}

type FileType

type FileType string
const (
	VIDEO  FileType = "video"
	IMAGE  FileType = "image"
	OBJECT FileType = "object"
)

type Function

type Function struct {
	Name  string
	Input interface{}
}

type GetWeightsResp

type GetWeightsResp struct {
	ResponseMetadata *base.ResponseMetadata
	Result           map[string]map[string]int `json:",omitempty"`
}

type ImageMeta

type ImageMeta struct {
	Uri    string
	Height int
	Width  int
	Md5    string
}

type ImgUrl

type ImgUrl struct {
	MainUrl   string
	BackupUrl string
}

type ModifyVideoInfoBaseResp

type ModifyVideoInfoBaseResp struct {
	BaseResp *BaseResp
}

type ModifyVideoInfoBody

type ModifyVideoInfoBody struct {
	SpaceName string       `json:"SpaceName"`
	Vid       string       `json:"Vid"`
	Info      UserMetaInfo `json:"Info"`
	Tags      TagControl   `json:"Tags"`
}

type ModifyVideoInfoResp

type ModifyVideoInfoResp struct {
	ResponseMetadata *base.ResponseMetadata
	Result           *ModifyVideoInfoBaseResp
}

type ObjectMeta

type ObjectMeta struct {
	Uri string
	Md5 string
}

type OptionFun

type OptionFun func(*option)

func WithFormat

func WithFormat(format string) OptionFun

func WithHttps

func WithHttps() OptionFun

func WithKV

func WithKV(kv url.Values) OptionFun

kv used in querystring,the key Must not use "sig"

func WithSig

func WithSig(key string) OptionFun

func WithVodNoop

func WithVodNoop() OptionFun

func WithVodTplCenterCrop

func WithVodTplCenterCrop(width, height int) OptionFun

func WithVodTplObj

func WithVodTplObj() OptionFun

func WithVodTplResize

func WithVodTplResize(width, height int) OptionFun

func WithVodTplSmartCrop

func WithVodTplSmartCrop(width, height int) OptionFun

type OptionInfo

type OptionInfo struct {
	Title            string
	Tags             string
	Description      string
	Category         string
	RecordType       int
	Format           string
	ClassificationId int
}

type PublicErrorCode

type PublicErrorCode string

type SetVideoPublishStatusResp

type SetVideoPublishStatusResp struct {
	ResponseMetadata *base.ResponseMetadata
}

SetVideoPublishStatus

type SnapshotInput

type SnapshotInput struct {
	SnapshotTime float64
}

type StartWorkflowRequest

type StartWorkflowRequest struct {
	Vid          string
	TemplateId   string
	Input        map[string]interface{}
	Priority     int
	CallbackArgs string
}

type StartWorkflowResp

type StartWorkflowResp struct {
	ResponseMetadata *base.ResponseMetadata
	Result           *StartWorkflowResult `json:",omitempty"`
}

type StartWorkflowResult

type StartWorkflowResult struct {
	RunId string
}

type StoreInfo

type StoreInfo struct {
	StoreUri string
	Auth     string
}

type TagControl

type TagControl struct {
	Deletes string
	Adds    string
}

type UploadAddress

type UploadAddress struct {
	StoreInfos    []StoreInfo
	UploadHosts   []string
	UploadHeader  map[string]string
	SessionKey    string
	AdvanceOption AdvanceOption
}

type UploadMediaByUrlParams

type UploadMediaByUrlParams struct {
	SpaceName    string
	Format       VideoFormat
	SourceUrls   []string
	CallbackArgs string
}

type UploadMediaByUrlResp

type UploadMediaByUrlResp struct {
	base.CommonResponse
	Result UploadMediaByUrlResult
}

type UploadMediaByUrlResult

type UploadMediaByUrlResult struct {
	Code    int
	Message string
}

type UploadResult

type UploadResult struct {
	Vid         string
	VideoMeta   VideoMeta
	ImageMeta   ImageMeta
	ObjectMeta  ObjectMeta
	Encryption  Encryption
	SnapshotUri string
}

type UserMetaInfo

type UserMetaInfo struct {
	Title       string
	Description string
	Category    string
	PosterUri   string
}

type VideoDefinition

type VideoDefinition string
const (
	D1080P VideoDefinition = "1080p"
	D720P  VideoDefinition = "720p"
	D540P  VideoDefinition = "540p"
	D480P  VideoDefinition = "480p"
	D360P  VideoDefinition = "360p"
	D240P  VideoDefinition = "240p"
)

type VideoFormat

type VideoFormat string
const (
	MP4  VideoFormat = "mp4"
	M3U8 VideoFormat = "m3u8"
)

type VideoMeta

type VideoMeta struct {
	Uri      string
	Height   int
	Width    int
	Duration float64
	Bitrate  int
	Md5      string
	Format   string
	Size     int
}

type Vod

type Vod struct {
	*base.Client
	DomainCache map[string]map[string]int
	Lock        sync.RWMutex
}

func NewInstance

func NewInstance() *Vod

func NewInstanceWithRegion

func NewInstanceWithRegion(region string) *Vod

func (*Vod) AddCallbackSubscription

AddCallbackSubscription

  • @param *request.VodAddCallbackSubscriptionRequest
  • @return *response.VodAddCallbackSubscriptionResponse, int, error

func (*Vod) ApplyUploadInfo

ApplyUploadInfo

  • @param *request.VodApplyUploadInfoRequest
  • @return *response.VodApplyUploadInfoResponse, int, error

func (*Vod) CommitUploadInfo

CommitUploadInfo

  • @param *request.VodCommitUploadInfoRequest
  • @return *response.VodCommitUploadInfoResponse, int, error

func (*Vod) CreateCdnPreloadTask

CreateCdnPreloadTask

  • @param *request.VodCreateCdnPreloadTaskRequest
  • @return *response.VodCreateCdnPreloadTaskResponse, int, error

func (*Vod) CreateCdnRefreshTask

CreateCdnRefreshTask

  • @param *request.VodCreateCdnRefreshTaskRequest
  • @return *response.VodCreateCdnRefreshTaskResponse, int, error

func (*Vod) CreateDomain

CreateDomain

  • @param *request.VodCreateDomainV2Request
  • @return *response.VodCreateDomainV2Response, int, error

func (*Vod) CreateSpace

CreateSpace

  • @param *request.VodCreateSpaceRequest
  • @return *response.VodCreateSpaceResponse, int, error

func (*Vod) CreateVideoClassification

CreateVideoClassification

  • @param *request.VodCreateVideoClassificationRequest
  • @return *response.VodCreateVideoClassificationResponse, int, error

func (*Vod) DeleteMedia

DeleteMedia

  • @param *request.VodDeleteMediaRequest
  • @return *response.VodDeleteMediaResponse, int, error

func (*Vod) DeleteTranscodes

DeleteTranscodes

  • @param *request.VodDeleteTranscodesRequest
  • @return *response.VodDeleteTranscodesResponse, int, error

func (*Vod) DeleteVideoClassification

DeleteVideoClassification

  • @param *request.VodDeleteVideoClassificationRequest
  • @return *response.VodDeleteVideoClassificationResponse, int, error

func (*Vod) DescribeIpInfo

DescribeIpInfo

  • @param *request.VodDescribeIPInfoRequest
  • @return *response.VodDescribeIPInfoResponse, int, error

func (*Vod) DescribeVodDomainBandwidthData

DescribeVodDomainBandwidthData

  • @param *request.VodDescribeVodDomainBandwidthDataRequest
  • @return *response.VodDescribeVodDomainBandwidthDataResponse, int, error

func (*Vod) DescribeVodDomainTrafficData

DescribeVodDomainTrafficData

  • @param *request.VodDescribeVodDomainTrafficDataRequest
  • @return *response.VodDescribeVodDomainTrafficDataResponse, int, error

func (*Vod) DescribeVodSnapshotData

DescribeVodSnapshotData

  • @param *request.DescribeVodSnapshotDataRequest
  • @return *response.DescribeVodSnapshotDataResponse, int, error

func (*Vod) DescribeVodSpaceStorageData

DescribeVodSpaceStorageData

  • @param *request.VodDescribeVodSpaceStorageDataRequest
  • @return *response.VodDescribeVodSpaceStorageDataResponse, int, error

func (*Vod) DescribeVodSpaceTranscodeData

DescribeVodSpaceTranscodeData

  • @param *request.DescribeVodSpaceTranscodeDataRequest
  • @return *response.DescribeVodSpaceTranscodeDataResponse, int, error

func (*Vod) GetMediaInfos

GetMediaInfos

  • @param *request.VodGetMediaInfosRequest
  • @return *response.VodGetMediaInfosResponse, int, error

func (*Vod) GetMediaList

GetMediaList

  • @param *request.VodGetMediaListRequest
  • @return *response.VodGetMediaListResponse, int, error

func (*Vod) GetPlayAuthToken

func (p *Vod) GetPlayAuthToken(req *request.VodGetPlayInfoRequest, tokenExpireTime int) (string, error)

func (*Vod) GetPlayInfo

GetPlayInfo

  • @param *request.VodGetPlayInfoRequest
  • @return *response.VodGetPlayInfoResponse, int, error

func (*Vod) GetPlayInfoWithLiveTimeShiftScene

GetPlayInfoWithLiveTimeShiftScene

  • @param *request.VodGetPlayInfoWithLiveTimeShiftSceneRequest
  • @return *response.VodGetPlayInfoWithLiveTimeShiftSceneResponse, int, error

func (*Vod) GetPrivateDrmAuthToken

func (p *Vod) GetPrivateDrmAuthToken(req *request.VodGetPrivateDrmPlayAuthRequest, tokenExpireTime int) (string, error)

func (*Vod) GetPrivateDrmPlayAuth

GetPrivateDrmPlayAuth

  • @param *request.VodGetPrivateDrmPlayAuthRequest
  • @return *response.VodGetPrivateDrmPlayAuthResponse, int, error

func (*Vod) GetRecommendedPoster

GetRecommendedPoster

  • @param *request.VodGetRecommendedPosterRequest
  • @return *response.VodGetRecommendedPosterResponse, int, error

func (*Vod) GetSpaceDetail

GetSpaceDetail

  • @param *request.VodGetSpaceDetailRequest
  • @return *response.VodGetSpaceDetailResponse, int, error

func (*Vod) GetSubtitleAuthToken

func (p *Vod) GetSubtitleAuthToken(req *request.VodGetSubtitleInfoListRequest, tokenExpireTime int) (string, error)

func (*Vod) GetSubtitleInfoList

GetSubtitleInfoList

  • @param *request.VodGetSubtitleInfoListRequest
  • @return *response.VodGetSubtitleInfoListResponse, int, error

func (*Vod) GetUploadAuth

func (p *Vod) GetUploadAuth() (*base.SecurityToken2, error)

func (*Vod) GetUploadAuthWithExpiredTime

func (p *Vod) GetUploadAuthWithExpiredTime(expiredTime time.Duration) (*base.SecurityToken2, error)

func (*Vod) GetWorkflowExecution

GetWorkflowExecution

  • @param *request.VodGetWorkflowExecutionStatusRequest
  • @return *response.VodGetWorkflowExecutionStatusResponse, int, error

func (*Vod) ListCdnAccessLog

ListCdnAccessLog

  • @param *request.VodListCdnAccessLogRequest
  • @return *response.VodListCdnAccessLogResponse, int, error

func (*Vod) ListCdnPvData

ListCdnPvData

  • @param *request.VodListCdnPvDataRequest
  • @return *response.VodCdnStatisticsCommonResponse, int, error

func (*Vod) ListCdnStatusData

ListCdnStatusData

  • @param *request.VodListCdnStatusDataRequest
  • @return *response.VodCdnStatisticsCommonResponse, int, error

func (*Vod) ListCdnTasks

ListCdnTasks

  • @param *request.VodListCdnTasksRequest
  • @return *response.VodListCdnTasksResponse, int, error

func (*Vod) ListCdnTopAccessUrl

ListCdnTopAccessUrl

  • @param *request.VodListCdnTopAccessUrlRequest
  • @return *response.VodListCdnTopAccessUrlResponse, int, error

func (*Vod) ListCdnUsageData

ListCdnUsageData

  • @param *request.VodListCdnUsageDataRequest
  • @return *response.VodCdnStatisticsCommonResponse, int, error

func (*Vod) ListDomain

ListDomain

  • @param *request.VodListDomainRequest
  • @return *response.VodListDomainResponse, int, error

func (*Vod) ListSnapshots

ListSnapshots

  • @param *request.VodListSnapshotsRequest
  • @return *response.VodListSnapshotsResponse, int, error

func (*Vod) ListSpace

ListSpace

  • @param *request.VodListSpaceRequest
  • @return *response.VodListSpaceResponse, int, error

func (*Vod) ListVideoClassifications

ListVideoClassifications

  • @param *request.VodListVideoClassificationsRequest
  • @return *response.VodListVideoClassificationsResponse, int, error

func (*Vod) QueryUploadTaskInfo

QueryUploadTaskInfo

  • @param *request.VodQueryUploadTaskInfoRequest
  • @return *response.VodQueryUploadTaskInfoResponse, int, error

func (*Vod) RetrieveTranscodeResult

RetrieveTranscodeResult

  • @param *request.VodRetrieveTranscodeResultRequest
  • @return *response.VodRetrieveTranscodeResultResponse, int, error

func (*Vod) SetCallbackEvent

SetCallbackEvent

  • @param *request.VodSetCallbackEventRequest
  • @return *response.VodSetCallbackEventResponse, int, error

func (*Vod) StartWorkflow

StartWorkflow

  • @param *request.VodStartWorkflowRequest
  • @return *response.VodStartWorkflowResponse, int, error

func (*Vod) UpdateDomainExpire

UpdateDomainExpire

  • @param *request.VodUpdateDomainExpireV2Request
  • @return *response.VodUpdateDomainExpireV2Response, int, error

func (*Vod) UpdateMediaInfo

UpdateMediaInfo

  • @param *request.VodUpdateMediaInfoRequest
  • @return *response.VodUpdateMediaInfoResponse, int, error

func (*Vod) UpdateMediaPublishStatus

UpdateMediaPublishStatus

  • @param *request.VodUpdateMediaPublishStatusRequest
  • @return *response.VodUpdateMediaPublishStatusResponse, int, error

func (*Vod) UpdateMediaStorageClass

UpdateMediaStorageClass

  • @param *request.VodUpdateMediaStorageClassRequest
  • @return *response.VodUpdateMediaStorageClassResponse, int, error

func (*Vod) UpdateSpaceUploadConfig

UpdateSpaceUploadConfig

  • @param *request.VodUpdateSpaceUploadConfigRequest
  • @return *response.VodUpdateSpaceUploadConfigResponse, int, error

func (*Vod) UpdateSubtitleInfo

UpdateSubtitleInfo

  • @param *request.VodUpdateSubtitleInfoRequest
  • @return *response.VodUpdateSubtitleInfoResponse, int, error

func (*Vod) UpdateSubtitleStatus

UpdateSubtitleStatus

  • @param *request.VodUpdateSubtitleStatusRequest
  • @return *response.VodUpdateSubtitleStatusResponse, int, error

func (*Vod) UpdateVideoClassification

UpdateVideoClassification

  • @param *request.VodUpdateVideoClassificationRequest
  • @return *response.VodUpdateVideoClassificationResponse, int, error

func (*Vod) Upload

func (p *Vod) Upload(rd io.Reader, size int64, spaceName string, fileType string, fileName, fileExtension string, storageClass int32) (string, string, error, int)

func (*Vod) UploadMaterialWithCallback

func (p *Vod) UploadMaterialWithCallback(materialRequest *request.VodUploadMaterialRequest) (*response.VodCommitUploadInfoResponse, int, error)

func (*Vod) UploadMediaByUrl

func (p *Vod) UploadMediaByUrl(req *request.VodUrlUploadRequest) (*response.VodUrlUploadResponse, int, error)

UploadMediaByUrl

  • @param *request.VodUrlUploadRequest
  • @return *response.VodUrlUploadResponse, int, error

func (*Vod) UploadMediaInner

func (p *Vod) UploadMediaInner(rd io.Reader, size int64, spaceName string, fileType, callbackArgs string, funcs string, fileName, fileExtension, vodUploadSource string, storageClass int32) (*response.VodCommitUploadInfoResponse, int, error)

func (*Vod) UploadMediaWithCallback

func (p *Vod) UploadMediaWithCallback(mediaRequset *request.VodUploadMediaRequest) (*response.VodCommitUploadInfoResponse, int, error)

func (*Vod) UploadObjectWithCallback

func (p *Vod) UploadObjectWithCallback(filePath string, spaceName string, callbackArgs string, fileName, fileExtension string, funcs string) (*response.VodCommitUploadInfoResponse, int, error)

type WorkflowInput

type WorkflowInput struct {
	TemplateId string
}

Directories

Path Synopsis
models
upload

Jump to

Keyboard shortcuts

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