-
空间管理
- 创建空间: AddNamespace(ns *NameSpace)
- 删除空间: DeleteNamespace(nsId string)
- 更新空间: UpdateNamespace(nsId string, ops []PatchOperation)
- 查询空间信息: QueryNamespace(nsId string)
- 获取空间列表: ListNamespace(offset, line int, sortBy string)
- 禁用空间: DisableNamespace(nsId string)
- 启用空间: EnableNamespace(nsId string)
-
流管理
- 创建流: AddStream(nsId string, stream *Stream)
- 删除流: DeleteStream(nsId string, streamId string)
- 查询流信息: QueryStream(nsId string, streamId string)
- 更新流: UpdateStream(nsId string, streamId string, ops []PatchOperation)
- 获取流列表: ListStream(nsId string, offset, line int, prefix, sortBy string, qType int)
- 获取流地址
- 动态模式: DynamicPublishPlayURL(nsId string, streamId string, route *DynamicLiveRoute)
- 静态模式: StaticPublishPlayURL(nsId string, streamId string, route *StaticLiveRoute)
- 禁用流: DisableStream(nsId string, streamId string)
- 启用流: EnableStream(nsId string, streamId string)
- 查询推流记录: QueryStreamPubhistories(nsId string, streamId string, start, end int, line, offset int)
-
模板管理
- 创建模板: AddTemplate(tmpl *Template)
- 删除模板: DeleteTemplate(templId string)
- 更新模板: UpdateTemplate(templId string, ops []PatchOperation)
- 查询模板信息: QueryTemplate(templId string)
- 获取模板列表: ListTemplate(offset, line int, sortBy string, templateType int, match string)
-
录制管理相关接口
- 查询录制记录: QueryStreamRecordHistories(nsId string, streamId string, start, end int, marker string, line int)
- 获取截图列表: StreamsSnapshots(nsId string, streamId string, start, end int, qtype int, limit int, marker string)
- 获取直播封面截图: QueryStreamCover(nsId string, streamId string)
package main
import (
// ...
"github.com/qiniu/api.v7/v7/auth"
"github.com/qiniu/api.v7/v7/qvs"
)
var (
AccessKey = "<QINIU ACCESS KEY>" // 替换成自己 Qiniu 账号的 AccessKey.
SecretKey = "<QINIU SECRET KEY>" // 替换成自己 Qiniu 账号的 SecretKey.
)
func main() {
// ...
mac := auth.New(AccessKey, SecretKey)
manager := qvs.NewManager(mac, nil)
// ...
}