live

package
v1.0.23 Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultRegion          = base.RegionApSingapore
	ServiceVersion20200801 = "2020-08-01"
	ServiceName            = "live"
)

Variables

View Source
var (
	ServiceInfo = &base.ServiceInfo{
		Timeout: 5 * time.Second,
		Host:    "open.byteplusapi.com",
		Header: http.Header{
			"Accept": []string{"application/json"},
		},
	}

	ApiInfoList = map[string]*base.ApiInfo{
		"ListCommonTransPresetDetail": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"ListCommonTransPresetDetail"},
				"Version": []string{ServiceVersion20200801},
			},
		},
		"UpdateCallback": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"UpdateCallback"},
				"Version": []string{ServiceVersion20200801},
			},
		},
		"DescribeCallback": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"DescribeCallback"},
				"Version": []string{ServiceVersion20200801},
			},
		},
		"DeleteCallback": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"DeleteCallback"},
				"Version": []string{ServiceVersion20200801},
			},
		},
		"CreateDomain": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"CreateDomain"},
				"Version": []string{ServiceVersion20200801},
			},
		},
		"DeleteDomain": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"DeleteDomain"},
				"Version": []string{ServiceVersion20200801},
			},
		},
		"ListDomainDetail": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"ListDomainDetail"},
				"Version": []string{ServiceVersion20200801},
			},
		},
		"DescribeDomain": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"DescribeDomain"},
				"Version": []string{ServiceVersion20200801},
			},
		},
		"EnableDomain": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"EnableDomain"},
				"Version": []string{ServiceVersion20200801},
			},
		},
		"DisableDomain": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"DisableDomain"},
				"Version": []string{ServiceVersion20200801},
			},
		},
		"ManagerPullPushDomainBind": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"ManagerPullPushDomainBind"},
				"Version": []string{ServiceVersion20200801},
			},
		},
		"UpdateAuthKey": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"UpdateAuthKey"},
				"Version": []string{ServiceVersion20200801},
			},
		},
		"DescribeAuth": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"DescribeAuth"},
				"Version": []string{ServiceVersion20200801},
			},
		},
		"ForbidStream": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"ForbidStream"},
				"Version": []string{ServiceVersion20200801},
			},
		},
		"ResumeStream": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"ResumeStream"},
				"Version": []string{ServiceVersion20200801},
			},
		},
		"ListCert": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"ListCert"},
				"Version": []string{ServiceVersion20200801},
			},
		},
		"CreateCert": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"CreateCert"},
				"Version": []string{ServiceVersion20200801},
			},
		},
		"UpdateCert": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"UpdateCert"},
				"Version": []string{ServiceVersion20200801},
			},
		},
		"BindCert": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"BindCert"},
				"Version": []string{ServiceVersion20200801},
			},
		},
		"UnbindCert": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"UnbindCert"},
				"Version": []string{ServiceVersion20200801},
			},
		},
		"DeleteCert": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"DeleteCert"},
				"Version": []string{ServiceVersion20200801},
			},
		},
		"UpdateReferer": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"UpdateReferer"},
				"Version": []string{ServiceVersion20200801},
			},
		},
		"DeleteReferer": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"DeleteReferer"},
				"Version": []string{ServiceVersion20200801},
			},
		},
		"DescribeReferer": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"DescribeReferer"},
				"Version": []string{ServiceVersion20200801},
			},
		},
		"ListStorageSpace": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"ListStorageSpace"},
				"Version": []string{ServiceVersion20200801},
			},
		},
		"CreateRecordPreset": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"CreateRecordPreset"},
				"Version": []string{ServiceVersion20200801},
			},
		},
		"UpdateRecordPreset": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"UpdateRecordPreset"},
				"Version": []string{ServiceVersion20200801},
			},
		},
		"DeleteRecordPreset": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"DeleteRecordPreset"},
				"Version": []string{ServiceVersion20200801},
			},
		},
		"ListVhostRecordPreset": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"ListVhostRecordPreset"},
				"Version": []string{ServiceVersion20200801},
			},
		},
		"CreateTranscodePreset": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"CreateTranscodePreset"},
				"Version": []string{ServiceVersion20200801},
			},
		},
		"UpdateTranscodePreset": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"UpdateTranscodePreset"},
				"Version": []string{ServiceVersion20200801},
			},
		},
		"DeleteTranscodePreset": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"DeleteTranscodePreset"},
				"Version": []string{ServiceVersion20200801},
			},
		},
		"ListVhostTransCodePreset": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"ListVhostTransCodePreset"},
				"Version": []string{ServiceVersion20200801},
			},
		},
		"CreateSnapshotPreset": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"CreateSnapshotPreset"},
				"Version": []string{ServiceVersion20200801},
			},
		},
		"UpdateSnapshotPreset": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"UpdateSnapshotPreset"},
				"Version": []string{ServiceVersion20200801},
			},
		},
		"DeleteSnapshotPreset": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"DeleteSnapshotPreset"},
				"Version": []string{ServiceVersion20200801},
			},
		},
		"ListVhostSnapshotPreset": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"ListVhostSnapshotPreset"},
				"Version": []string{ServiceVersion20200801},
			},
		},
		"DescribePullToPushBandwidthData": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"DescribePullToPushBandwidthData"},
				"Version": []string{ServiceVersion20200801},
			},
		},
		"DescribeLiveStorageSpaceData": {
			Method: http.MethodPost,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"DescribeLiveStorageSpaceData"},
				"Version": []string{ServiceVersion20200801},
			},
		},
	}
)
View Source
var DefaultInstance = NewInstance()

DefaultInstance

Functions

This section is empty.

Types

type AuthDetail

type AuthDetail struct {
}

type AuthInfoItem

type AuthInfoItem struct {
	Vhost          string      `json:"Vhost"`
	Domain         string      `json:"Domain"`
	App            string      `json:"App"`
	SceneType      string      `json:"SceneType"`
	AuthStatus     bool        `json:"AuthStatus"`
	ValidDuration  int64       `json:"ValidDuration"`
	AuthDetailList interface{} `json:"AuthDetailList"`
}

type BandwidthData

type BandwidthData struct {
	TimeStamp   time.Time `json:"TimeStamp"`
	UpBandwidth float64   `json:"UpBandwidth"`
}

type BandwidthDtailData

type BandwidthDtailData struct {
	Domain            string           `json:"Domain"`
	DstAddrType       string           `json:"DstAddrType"`
	PeakUpBandwidth   float64          `json:"PeakUpBandwidth"`
	BandwidthDataList []*BandwidthData `json:"BandwidthDataList"`
}

type BindCertConsoleResp

type BindCertConsoleResp struct {
	ResponseMetadata base.ResponseMetadata
}

type CallbackDetail

type CallbackDetail struct {
	CallbackType string `json:"CallbackType" binding:"oneof=http nsq kafka rpc"` // nsq kafka rpc not supported temporally
	URL          string `json:"URL" binding:"required"`
}

type CallbackInfo

type CallbackInfo struct {
	Vhost               string            `json:"Vhost"`
	App                 string            `json:"App" `
	MessageType         string            `json:"MessageType"`
	TranscodeCallback   int64             `json:"TranscodeCallback"`
	CallbackDetailList  []*CallbackDetail `json:"CallbackDetailList"`
	AuthEnable          bool              `json:"AuthEnable"`
	AuthKeyPrimary      string            `json:"AuthKeyPrimary"`
	AuthKeySecond       string            `json:"AuthKeySecond"`
	ValidDuration       int64             `json:"ValidDuration"`
	EncryptionAlgorithm string            `json:"EncryptionAlgorithm"`
	CallbackField       []string          `json:"CallbackField"`
	AuthField           map[string]string `json:"AuthField"`
	EncryptField        []string          `json:"EncryptField"`
	AppendField         map[string]string `json:"AppendField"`
	TimeoutSecond       int64             `json:"TimeoutSecond"`
	RetryTimes          int64             `json:"RetryTimes"`
	RetryInternalSecond int64             `json:"RetryInternalSecond"`
}

type CreateCertConsoleResp

type CreateCertConsoleResp struct {
	ResponseMetadata base.ResponseMetadata
	Result           OpenAPICreatChainResponse `json:"Result,omitempty"`
}

type CreateDomainResp

type CreateDomainResp struct {
	ResponseMetadata base.ResponseMetadata
}

type CreateRecordPresetResp

type CreateRecordPresetResp struct {
	ResponseMetadata base.ResponseMetadata
}

type CreateSnapshotPresetResp

type CreateSnapshotPresetResp struct {
	ResponseMetadata base.ResponseMetadata
}

type CreateTranscodePresetResp

type CreateTranscodePresetResp struct {
	ResponseMetadata base.ResponseMetadata
}

type DeleteCallbackResp

type DeleteCallbackResp struct {
	ResponseMetadata base.ResponseMetadata
}

type DeleteCertConsoleResp

type DeleteCertConsoleResp struct {
	ResponseMetadata base.ResponseMetadata
}

type DeleteDomainResp

type DeleteDomainResp struct {
	ResponseMetadata base.ResponseMetadata
}

type DeleteRecordPresetResp

type DeleteRecordPresetResp struct {
	ResponseMetadata base.ResponseMetadata
}

type DeleteRefererResp

type DeleteRefererResp struct {
	ResponseMetadata base.ResponseMetadata
}

type DeleteSnapshotPresetResp

type DeleteSnapshotPresetResp struct {
	ResponseMetadata base.ResponseMetadata
}

type DeleteTranscodePresetResp

type DeleteTranscodePresetResp struct {
	ResponseMetadata base.ResponseMetadata
}

type DescribeAuthOutput

type DescribeAuthOutput struct {
	AuthList []*AuthInfoItem `json:"AuthList"`
}

type DescribeAuthResp

type DescribeAuthResp struct {
	ResponseMetadata base.ResponseMetadata
	Result           *DescribeAuthOutput `json:"Result,omitempty"`
}

type DescribeCallbackOutput

type DescribeCallbackOutput struct {
	CallbackList []*CallbackInfo `json:"CallbackList"`
}

type DescribeCallbackResp

type DescribeCallbackResp struct {
	ResponseMetadata base.ResponseMetadata
	Result           *DescribeCallbackOutput `json:"Result,omitempty"`
}

type DescribeCertDetailConsoleResp

type DescribeCertDetailConsoleResp struct {
	ResponseMetadata base.ResponseMetadata
	Result           DescribeCertDetailResp `json:"Result,omitempty"`
}

type DescribeCertDetailResp

type DescribeCertDetailResp struct {
	ChainID    string           `json:"ChainID"`
	CertDomain string           `json:"Domain"`
	UseWay     string           `json:"UseWay,omitempty"`
	Status     string           `json:"Status,omitempty"`
	CertName   string           `json:"CertName,omitempty"`
	Rsa        *OpenAPICertData `json:"Rsa,omitempty"`
}

type DescribeDomainOutput

type DescribeDomainOutput struct {
	DomainList []*DomainInfo `json:"DomainList"`
}

type DescribeDomainResp

type DescribeDomainResp struct {
	ResponseMetadata base.ResponseMetadata
	Result           *DescribeDomainOutput `json:"Result,omitempty"`
}

type DescribeLiveStorageSpaceDataReq

type DescribeLiveStorageSpaceDataReq struct {
	StartTime   time.Time `json:"StartTime"`
	EndTime     time.Time `json:"EndTime"`
	Aggregation int       `json:"Aggregation,omitempty"`
	Buckets     []string  `json:"Buckets"`
}

type DescribeLiveStorageSpaceDataResp

type DescribeLiveStorageSpaceDataResp struct {
	ResponseMetadata base.ResponseMetadata
	Result           *DescribeLiveStorageSpaceDataResult `json:"Result,omitempty"`
}

type DescribeLiveStorageSpaceDataResult

type DescribeLiveStorageSpaceDataResult struct {
	Buckets         []string       `json:"Buckets"`
	StartTime       time.Time      `json:"StartTime"`
	EndTime         time.Time      `json:"EndTime"`
	StorageDataList []*StorageData `json:"StorageDataList"`
}

type DescribePullToPushBandwidthDataRequest

type DescribePullToPushBandwidthDataRequest struct {
	DomainList      []string  `json:"DomainList"`
	DstAddrTypeList []string  `json:"DstAddrTypeList"`
	StartTime       time.Time `json:"StartTime"`
	EndTime         time.Time `json:"EndTime"`
	Aggregation     int       `json:"Aggregation,omitempty"`
	ShowDetail      bool      `json:"ShowDetail,omitempty"`
}

type DescribePullToPushBandwidthDataResp

type DescribePullToPushBandwidthDataResp struct {
	ResponseMetadata base.ResponseMetadata
	Result           *DescribePullToPushBandwidthDataResult `json:"Result,omitempty"`
}

type DescribePullToPushBandwidthDataResult

type DescribePullToPushBandwidthDataResult struct {
	DomainList              []string              `json:"DomainList"`
	DstAddrTypeList         []string              `json:"DstAddrTypeList"`
	StartTime               time.Time             `json:"StartTime"`
	EndTime                 time.Time             `json:"EndTime"`
	Aggregation             int                   `json:"Aggregation"`
	ShowDetail              bool                  `json:"ShowDetail"`
	PeakUpBandwidth         float64               `json:"PeakUpBandwidth"`
	BandwidthDataList       []*BandwidthData      `json:"BandwidthDataList"`
	BandwidthDetailDataList []*BandwidthDtailData `json:"BandwidthDetailDataList"`
}

type DescribeRefererResp

type DescribeRefererResp struct {
	ResponseMetadata base.ResponseMetadata
	Result           *DescribeRefererResult `json:"Result,omitempty"`
}

type DescribeRefererResult

type DescribeRefererResult struct {
	RefererList []*RefererItem `json:"RefererList,omitempty"`
}

type DisableDomainResp

type DisableDomainResp struct {
	ResponseMetadata base.ResponseMetadata
}

type DomainInfo

type DomainInfo struct {
	Vhost       string `json:"Vhost"`
	Domain      string `json:"Domain"`
	Type        string `json:"Type"`
	Region      string `json:"Region"`
	Status      int64  `json:"Status"`
	CName       string `json:"CName"`
	ChainID     string `json:"ChainID"`
	CertDomain  string `json:"CertDomain"`
	CnameCheck  int64  `json:"CnameCheck"`
	DomainCheck int64  `json:"DomainCheck"`
	ICPCheck    int64  `json:"ICPCheck"`
	CreateTime  string `json:"CreateTime"`
	CertName    string `json:"CertName"`
	PushDomain  string `json:"PushDomain"`
}

type EnableDomainResp

type EnableDomainResp struct {
	ResponseMetadata base.ResponseMetadata
}

type ForbidStreamResp

type ForbidStreamResp struct {
	ResponseMetadata base.ResponseMetadata
}

type LIVE

type LIVE struct {
	Client *base.Client
}

LIVE .

func NewInstance

func NewInstance() *LIVE

NewInstance create a instance

func (*LIVE) BindCert

func (p *LIVE) BindCert(query url.Values, body string) (*BindCertConsoleResp, int, error)

* 5. 为某个domain绑定证书

func (*LIVE) CreateCert

func (p *LIVE) CreateCert(query url.Values, body string) (*CreateCertConsoleResp, int, error)

* 2. 上传第三方证书

func (*LIVE) CreateDomain

func (p *LIVE) CreateDomain(query url.Values, body string) (*CreateDomainResp, int, error)

* 域名相关的

* 添加域名

func (*LIVE) CreateRecordPreset

func (p *LIVE) CreateRecordPreset(query url.Values, body string) (*CreateRecordPresetResp, int, error)

* 录制相关

* 1,

func (*LIVE) CreateSnapshotPreset

func (p *LIVE) CreateSnapshotPreset(query url.Values, body string) (*CreateSnapshotPresetResp, int, error)

* 截图相关的

func (*LIVE) CreateTranscodePreset

func (p *LIVE) CreateTranscodePreset(query url.Values, body string) (*CreateTranscodePresetResp, int, error)

* 转码相关的

* 1。

func (*LIVE) DeleteCallback

func (p *LIVE) DeleteCallback(query url.Values, body string) (*DeleteCallbackResp, int, error)

* 通过入参messageType区分不同服务:

删除直播推流回调
删除直播断流回调
删除录制回调
删除截图回调

func (*LIVE) DeleteCert

func (p *LIVE) DeleteCert(query url.Values, body string) (*DeleteCertConsoleResp, int, error)

* 7. 删除一个证书

func (*LIVE) DeleteDomain

func (p *LIVE) DeleteDomain(query url.Values, body string) (*DeleteDomainResp, int, error)

* 删除域名

func (*LIVE) DeleteRecordPreset

func (p *LIVE) DeleteRecordPreset(query url.Values, body string) (*DeleteRecordPresetResp, int, error)

func (*LIVE) DeleteReferer

func (p *LIVE) DeleteReferer(query url.Values, body string) (*DeleteRefererResp, int, error)

* 2. 关闭防盗链

func (*LIVE) DeleteSnapshotPreset

func (p *LIVE) DeleteSnapshotPreset(query url.Values, body string) (*DeleteSnapshotPresetResp, int, error)

func (*LIVE) DeleteTranscodePreset

func (p *LIVE) DeleteTranscodePreset(query url.Values, body string) (*DeleteTranscodePresetResp, int, error)

* 3。

func (*LIVE) DescribeAuth

func (p *LIVE) DescribeAuth(query url.Values, body string) (*DescribeAuthResp, int, error)

func (*LIVE) DescribeCallback

func (p *LIVE) DescribeCallback(query url.Values, body string) (*DescribeCallbackResp, int, error)

* 通过入参messageType区分不同服务:

查询直播推流回调
查询直播断流回调
查询录制回调
查询截图回调

func (*LIVE) DescribeDomain

func (p *LIVE) DescribeDomain(query url.Values, body string) (*DescribeDomainResp, int, error)

* 查询域名信息

func (*LIVE) DescribeLiveStorageSpaceData

func (p *LIVE) DescribeLiveStorageSpaceData(query url.Values, body string) (*DescribeLiveStorageSpaceDataResp, int, error)

* 用量查询相关

func (*LIVE) DescribePullToPushBandwidthData

func (p *LIVE) DescribePullToPushBandwidthData(query url.Values, body string) (*DescribePullToPushBandwidthDataResp, int, error)

* 用量查询相关

func (*LIVE) DescribeReferer

func (p *LIVE) DescribeReferer(query url.Values, body string) (*DescribeRefererResp, int, error)

* 3. 查询防盗链内容

func (*LIVE) DisableDomain

func (p *LIVE) DisableDomain(query url.Values, body string) (*DisableDomainResp, int, error)

* 停用域名

func (*LIVE) EnableDomain

func (p *LIVE) EnableDomain(query url.Values, body string) (*EnableDomainResp, int, error)

* 启用域名

func (*LIVE) ForbidStream

func (p *LIVE) ForbidStream(query url.Values, body string) (*ForbidStreamResp, int, error)

* 流信息相关

* 禁播直播流

func (*LIVE) GetAPIInfo

func (p *LIVE) GetAPIInfo(api string) *base.ApiInfo

GetAPIInfo interface

func (*LIVE) GetServiceInfo

func (p *LIVE) GetServiceInfo() *base.ServiceInfo

GetServiceInfo interface

func (*LIVE) ListCert

func (p *LIVE) ListCert(query url.Values, body string) (*ListCertConsoleResp, int, error)

* 证书管理相关

* 1. 某个AccountID下的证书查询功能

func (*LIVE) ListCommonTransPresetDetail

func (p *LIVE) ListCommonTransPresetDetail(query url.Values, body string) (*ListCommonTransPresetDetailResp, int, error)

func (*LIVE) ListDomainDetail

func (p *LIVE) ListDomainDetail(query url.Values, body string) (*ListDomainDetailResp, int, error)

* 查询域名列表

func (*LIVE) ListStorageSpace

func (p *LIVE) ListStorageSpace(query url.Values, body string) (*ListStorageSpaceResp, int, error)

* 存储空间

* 1,查询账号下存储空间详情

func (*LIVE) ListVhostRecordPreset

func (p *LIVE) ListVhostRecordPreset(query url.Values, body string) (*ListVhostRecordPresetResp, int, error)

* 6。

func (*LIVE) ListVhostSnapshotPreset

func (p *LIVE) ListVhostSnapshotPreset(query url.Values, body string) (*ListVhostSnapshotPresetResp, int, error)

func (*LIVE) ListVhostTransCodePreset

func (p *LIVE) ListVhostTransCodePreset(query url.Values, body string) (*ListVhostTransCodePresetResp, int, error)

func (*LIVE) ManagerPullPushDomainBind

func (p *LIVE) ManagerPullPushDomainBind(query url.Values, body string) (*ManagerPullPushDomainBindResp, int, error)

* 通过请求参数区分这两个服务

拉流域名绑定推流域名
删除拉流域名绑定推流域名

func (*LIVE) ResumeStream

func (p *LIVE) ResumeStream(query url.Values, body string) (*ResumeStreamResp, int, error)

* 恢复禁播直播流

func (*LIVE) SetHost

func (p *LIVE) SetHost(host string)

SetHost .

func (*LIVE) SetRegion

func (p *LIVE) SetRegion(region string)

SetHost .

func (*LIVE) SetSchema

func (p *LIVE) SetSchema(schema string)

SetSchema .

func (*LIVE) UnbindCert

func (p *LIVE) UnbindCert(query url.Values, body string) (*UnbindCertConsoleResp, int, error)

* 6. 为这个domain解绑证书

func (*LIVE) UpdateAuthKey

func (p *LIVE) UpdateAuthKey(query url.Values, body string) (*UpdateAuthKeyResp, int, error)

func (*LIVE) UpdateCallback

func (p *LIVE) UpdateCallback(query url.Values, body string) (*UpdateCallbackResp, int, error)

* 通过入参messageType区分不同服务:

设置直播推流回调 - push
设置直播断流回调 - push_end
设置录制回调  - record
设置截图回调 - snapshot

func (*LIVE) UpdateCert

func (p *LIVE) UpdateCert(query url.Values, body string) (*UpdateCertConsoleResp, int, error)

* 4. 更新某个证书

func (*LIVE) UpdateRecordPreset

func (p *LIVE) UpdateRecordPreset(query url.Values, body string) (*UpdateRecordPresetResp, int, error)

* 2。

func (*LIVE) UpdateReferer

func (p *LIVE) UpdateReferer(query url.Values, body string) (*UpdateRefererResp, int, error)

* 防盗链相关

* 1. 创建/更新防盗链配置

func (*LIVE) UpdateSnapshotPreset

func (p *LIVE) UpdateSnapshotPreset(query url.Values, body string) (*UpdateSnapshotPresetResp, int, error)

func (*LIVE) UpdateTranscodePreset

func (p *LIVE) UpdateTranscodePreset(query url.Values, body string) (*UpdateTranscodePresetResp, int, error)

* 2。

type ListCertConsoleResp

type ListCertConsoleResp struct {
	ResponseMetadata base.ResponseMetadata
	Result           ListCertResp `json:"Result,omitempty"`
}

type ListCertResp

type ListCertResp struct {
	CertList []SimpleCertInfo `json:"CertList"`
}

type ListCommonTransPresetDetailReq

type ListCommonTransPresetDetailReq struct {
	PresetList []string `json:"PresetList"`
}

type ListCommonTransPresetDetailResp

type ListCommonTransPresetDetailResp struct {
	ResponseMetadata base.ResponseMetadata
	Result           ListCommonTransPresetDetailResult
}

type ListCommonTransPresetDetailResult

type ListCommonTransPresetDetailResult struct {
	StandardPresetDetail     []*TranscodePresetResult `json:"StandardPresetDetail"`
	NarrowBandHDPresetDetail []*TranscodePresetResult `json:"NarrowBandHDPresetDetail"`
}

type ListDomainDetailOutput

type ListDomainDetailOutput struct {
	DomainList []*DomainInfo `json:"DomainList"`
	Total      int64         `json:"Total"`
}

type ListDomainDetailResp

type ListDomainDetailResp struct {
	ResponseMetadata base.ResponseMetadata
	Result           *ListDomainDetailOutput `json:"Result,omitempty"`
}

type ListStorageSpaceReq

type ListStorageSpaceReq struct {
	PageSize int64 `json:"PageSize" binding:"required"`
	PageNum  int64 `json:"PageNum" binding:"required"`
}

type ListStorageSpaceResp

type ListStorageSpaceResp struct {
	ResponseMetadata base.ResponseMetadata
	Result           *ListStorageSpaceResult `json:"Result"`
}

type ListStorageSpaceResult

type ListStorageSpaceResult struct {
	StorageSpace []string `json:"StorageSpace"`
	CurPage      int64    `json:"CurPage"`
	Total        int64    `json:"Total"`
}

type ListVhostRecordPresetResp

type ListVhostRecordPresetResp struct {
	ResponseMetadata base.ResponseMetadata
	Result           *ListVhostRecordPresetRespOutput `json:"Result,omitempty"`
}

type ListVhostRecordPresetRespOutput

type ListVhostRecordPresetRespOutput struct {
	PresetList []*SlicePresetsVhostAPP `json:"PresetList"`
}

type ListVhostSnapshotPresetResp

type ListVhostSnapshotPresetResp struct {
	ResponseMetadata base.ResponseMetadata
	Result           *ListVhostSnapshotPresetRespOutput `json:"Result,omitempty"`
}

type ListVhostSnapshotPresetRespOutput

type ListVhostSnapshotPresetRespOutput struct {
	PresetList []*SlicePresetsVhostAPP `json:"PresetList"`
}

type ListVhostTransCodePresetResp

type ListVhostTransCodePresetResp struct {
	ResponseMetadata base.ResponseMetadata
	Result           *ListVhostTransCodePresetRespOutput `json:"Result,omitempty"`
}

type ListVhostTransCodePresetRespOutput

type ListVhostTransCodePresetRespOutput struct {
	CommonPresetList    []TranscodePresetVhostAPP `json:"CommonPresetList"`
	CustomizePresetList []TranscodePresetVhostAPP `json:"CustomizePresetList"`
}

type ManagerPullPushDomainBindResp

type ManagerPullPushDomainBindResp struct {
	ResponseMetadata base.ResponseMetadata
}

type OpenAPICertData

type OpenAPICertData struct {
	PubKey       string `json:"PubKey"`
	PriKey       string `json:"PriKey"`
	CertType     string `json:"CertType"`
	PubName      string `json:"PubName"`
	PriName      string `json:"PriName"`
	NotBefore    string `json:"NotBefore"`
	NotAfter     string `json:"NotAfter"`
	FingerPrint  string `json:"FingerPrint"`
	SerialNumber string `json:"SerialNumber"`
}

type OpenAPICreatChainResponse

type OpenAPICreatChainResponse struct {
	ChainID   string `json:"ChainID"`
	Domain    string `json:"Domain"`
	UseWay    string `json:"UseWay"`
	AccountID string `json:"AccountID"`
}

type RecordTob

type RecordTob struct {
	Format       *string `json:"Format"`
	Duration     *int64  `json:"Duration"`
	Splice       *int64  `json:"Splice"`
	RecordObject *string `json:"RecordObject"`
}

type RefererInfo

type RefererInfo struct {
	Type     string `json:"Type"`
	Key      string `json:"Key"`
	Value    string `json:"Value"`
	Priority int64  `json:"Priority"`
}

type RefererItem

type RefererItem struct {
	Vhost           string         `json:"Vhost"`
	Domain          string         `json:"Domain"`
	RefererInfoList []*RefererInfo `json:"RefererInfoList"`
}

type ResumeStreamResp

type ResumeStreamResp struct {
	ResponseMetadata base.ResponseMetadata
}

type SimpleCertInfo

type SimpleCertInfo struct {
	CertDomain string `json:"CertDomain"`
	CertName   string `json:"CertName"`
	ChainID    string `json:"ChainID"`
	NotBefore  string `json:"NotBefore"`
	NotAfter   string `json:"NotAfter"`
	Status     string `json:"Status"`
	StatusCode int    `json:"statuscode"`
}

type SlicePreset

type SlicePreset struct {
	Preset         *string         `json:"Preset,omitempty"`
	Description    *string         `json:"Description,omitempty"`
	AccountID      *string         `json:"AccountID,omitempty"`
	Bucket         *string         `json:"Bucket,omitempty"`
	Status         *int64          `json:"Status,omitempty"`
	AccessKey      *string         `json:"AccessKey,omitempty"`
	Interval       *int64          `json:"Interval,omitempty"`
	Format         []string        `json:"Format,omitempty"`
	Duration       *int64          `json:"Duration,omitempty"`
	SliceDuration  *int64          `json:"SliceDuration,omitempty"`
	ReserveDays    *int64          `json:"ReserveDays,omitempty"`
	SnapshotFormat *string         `json:"SnapshotFormat,omitempty"`
	SnapshotObject *string         `json:"SnapshotObject,omitempty"`
	RecordTob      []*RecordTob    `json:"RecordTob,omitempty""`
	CallbackDetail *CallbackDetail `json:"CallbackDetail"`
}

type SlicePresetsVhostAPP

type SlicePresetsVhostAPP struct {
	Vhost       string       `json:"Vhost"`
	App         string       `json:"App"`
	SlicePreset *SlicePreset `json:"SlicePreset"`
}

type StorageData

type StorageData struct {
	TimeStamp time.Time `json:"TimeStamp"`
	Storage   float64   `json:"Storage"`
}

type TranscodePreset

type TranscodePreset struct {
	Preset       *string `json:"Preset,omitempty"`
	Status       *int64  `json:"Status,omitempty"`
	SuffixName   *string `json:"SuffixName,omitempty"`
	StopInterval *int64  `json:"StopInterval,omitempty"`
	Describe     *string `json:"Describe,omitempty"`
	PresetKind   *int64  `json:"PresetKind,omitempty"`
	PresetType   *int    `json:"PresetType,omitempty"`
	Roi          *bool   `json:"Roi,omitempty"`
	Vclass       *bool   `json:"Vclass,omitempty"`
	Ocr          *bool   `json:"Ocr,omitempty"`
	Modifier     *string `json:"Modifier,omitempty"`
	Revision     *string `json:"Revision,omitempty"`
	//*****video param ******
	Vn           *int64  `json:"Vn,omitempty"`
	FPS          *int64  `json:"FPS,omitempty"`
	VideoBitrate *int64  `json:"VideoBitrate,omitempty"`
	VbThreshold  *string `json:"VbThreshold,omitempty"`
	Vcodec       *string `json:"Vcodec,omitempty"`
	VProfile     *string `json:"VProfile,omitempty"`
	VLevel       *string `json:"VLevel,omitempty"`
	VRateCtrl    *string `json:"VRateCtrl,omitempty"`
	GopMin       *int64  `json:"GopMin,omitempty"`
	GOP          *int64  `json:"GOP,omitempty"`
	BFrames      *int64  `json:"BFrames,omitempty"`
	LookAhead    *int64  `json:"LookAhead,omitempty"`
	VPreset      *string `json:"VPreset,omitempty"`
	Threads      *int64  `json:"Threads,omitempty"`
	Width        *int64  `json:"Width,omitempty"`
	Height       *int64  `json:"Height,omitempty"`
	As           *string `json:"As,omitempty"`
	AutoTrans    *int64  `json:"AutoTrans,omitempty"`
	LongSide     *int64  `json:"LongSide,omitempty"`
	ShortSide    *int64  `json:"ShortSide,omitempty"`
	Abr          *bool   `json:"Abr,omitempty"`
	VBVBufSize   *int64  `json:"VBVBufSize,omitempty"`
	VBVMaxRate   *int64  `json:"VBVMaxRate,omitempty"`
	Qp           *int64  `json:"Qp,omitempty"`
	HVSPre       *bool   `json:"HVSPre,omitempty"`
	BCM          *int64  `json:"BCM,omitempty"`
	VBRatio      *int64  `json:"VBRatio,omitempty"`
	SITI         *bool   `json:"SITI,omitempty"`

	// Nvidia hardware encoding related parameters, Vcodec, Width, Height, Vr, Vb, gop reuse the above general parameters, other software encoding parameters are ignored
	// When NvPriority = 0, it means that nvidia hardware transcoding is not enabled, and all nv parameters are not used
	NvPriority  *int64  `json:"NvPriority,omitempty"` // nvidia transcoding priority, 0 means off, >0 means on, the larger the priority, the higher the priority
	NvCodec     *string `json:"NvCodec,omitempty"`
	NvPreset    *string `json:"NvPreset,omitempty"`
	NvProfile   *string `json:"NvProfile,omitempty"`
	NvGop       *int64  `json:"NvGop,omitempty"`
	NvBf        *int64  `json:"NvBf,omitempty"`
	NvRefs      *int64  `json:"NvRefs,omitempty"`
	NvLookahead *int64  `json:"NvLookahead,omitempty"`
	NvTempAQ    *int64  `json:"NvTempAQ,omitempty"`
	NvHVSPre    *bool   `json:"NvHVSPre,omitempty"`
	NvPercent   *int64  `json:"NvPercent,omitempty"`
	//***** audio param *****
	An            *int64  `json:"An,omitempty"`
	AR            *int64  `json:"AR,omitempty"`
	AudioBitrate  *int64  `json:"AudioBitrate,omitempty"`
	Acodec        *string `json:"Acodec,omitempty"`
	AProfile      *string `json:"AProfile,omitempty"`
	RegionConfig  *string `json:"RegionConfig,omitempty"`
	AdvancedParam *string `json:"AdvancedParam,omitempty"`
}

type TranscodePresetResult

type TranscodePresetResult struct {
	Preset       *string `json:"Preset,omitempty"`
	Status       *int64  `json:"Status,omitempty"`
	SuffixName   *string `json:"SuffixName,omitempty"`
	VideoBitrate *int64  `json:"VideoBitrate,omitempty"`
	Vcodec       *string `json:"Vcodec,omitempty"`
	AudioBitrate *int64  `json:"AudioBitrate,omitempty"`
	Acodec       *string `json:"Acodec,omitempty"`
	FPS          *int64  `json:"FPS,omitempty"`
	GOP          *int64  `json:"GOP,omitempty"`
	Width        *int64  `json:"Width,omitempty"`
	Height       *int64  `json:"Height,omitempty"`
	AutoTrans    *int64  `json:"AutoTrans,omitempty"`
	As           *string `json:"As,omitempty"`
	ShortSide    *int64  `json:"ShortSide,omitempty"`
	LongSide     *int64  `json:"LongSide,omitempty"`
	Roi          *bool   `json:"Roi,omitempty"`
}

type TranscodePresetVhostAPP

type TranscodePresetVhostAPP struct {
	Vhost           string           `json:"Vhost"`
	App             string           `json:"App"`
	TranscodePreset *TranscodePreset `json:"TranscodePreset"`
}

type UnbindCertConsoleResp

type UnbindCertConsoleResp struct {
	ResponseMetadata base.ResponseMetadata
}

type UpdateAuthKeyResp

type UpdateAuthKeyResp struct {
	ResponseMetadata base.ResponseMetadata
}

type UpdateCallbackResp

type UpdateCallbackResp struct {
	ResponseMetadata base.ResponseMetadata
}

type UpdateCertConsoleResp

type UpdateCertConsoleResp struct {
	ResponseMetadata base.ResponseMetadata
	Result           OpenAPICreatChainResponse `json:"Result,omitempty"`
}

type UpdateRecordPresetResp

type UpdateRecordPresetResp struct {
	ResponseMetadata base.ResponseMetadata
}

type UpdateRefererResp

type UpdateRefererResp struct {
	ResponseMetadata base.ResponseMetadata
}

type UpdateSnapshotPresetResp

type UpdateSnapshotPresetResp struct {
	ResponseMetadata base.ResponseMetadata
}

type UpdateTranscodePresetResp

type UpdateTranscodePresetResp struct {
	ResponseMetadata base.ResponseMetadata
}

Jump to

Keyboard shortcuts

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