Documentation ¶
Index ¶
- func FileExist(target string) bool
- func GetFileName(target string) string
- func GetFileType(target string) string
- func IsEmptyStr(target *string) bool
- func IsManifestMediaType(mediaType string) bool
- func NotEmptyStr(target *string) bool
- type ClientError
- type UploadClient
- type UploadRequest
- type UploadResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetFileName ¶
GetFileName returns the file name without suffix.
func IsEmptyStr ¶
IsEmptyStr returns whether the string is empty.
func IsManifestMediaType ¶
IsManifestMediaType returns whether the media type is manifest.
func NotEmptyStr ¶
NotEmptyStr returns whether the string is not empty.
Types ¶
type ClientError ¶
type ClientError struct {
Message string
}
ClientError is the error returned by VOD service.
func (*ClientError) GetMessage ¶
func (e *ClientError) GetMessage() string
GetMessage returns the error message.
type UploadClient ¶
type UploadClient struct { SecretId string SecretKey string Token string Timeout int64 Transport http.RoundTripper }
UploadClient is the client of vod upload.
func (*UploadClient) Upload ¶
func (p *UploadClient) Upload(region string, request *UploadRequest) (*UploadResponse, error)
Upload uploads the file to vod.
func (*UploadClient) UploadFromUrl ¶
func (p *UploadClient) UploadFromUrl(region string, request *UploadRequest) (*UploadResponse, error)
UploadFromUrl uploads the file from url to vod.
type UploadRequest ¶
type UploadRequest struct { v20180717.ApplyUploadRequest MediaFilePath *string CoverFilePath *string ConcurrentUploadNumber *uint64 MediaUrl *string CoverUrl *string }
UploadRequest is the request struct for api Upload
func NewVodUploadRequest ¶
func NewVodUploadRequest() *UploadRequest
NewVodUploadRequest creates a request to invoke Upload API
type UploadResponse ¶
type UploadResponse struct {
v20180717.CommitUploadResponse
}
UploadResponse is the response struct for api Upload
Click to show internal directories.
Click to hide internal directories.