github.com/qiniu/go-sdk/v7@v7.27.0/qvs/README.md (about)

     1  # QVS Cloud Server-Side Library for Go
     2  
     3  ## Features
     4  
     5  - 空间管理
     6      - [x] 创建空间: AddNamespace(ns *NameSpace)
     7  	- [x] 删除空间: DeleteNamespace(nsId string)
     8  	- [x] 更新空间: UpdateNamespace(nsId string, ops []PatchOperation)
     9  	- [x] 查询空间信息: QueryNamespace(nsId string)
    10  	- [x] 获取空间列表: ListNamespace(offset, line int, sortBy string)
    11  	- [x] 禁用空间: DisableNamespace(nsId string)
    12      - [x] 启用空间: EnableNamespace(nsId string)
    13  
    14  - 流管理
    15      - [x] 创建流: AddStream(nsId string, stream *Stream)
    16      - [x] 删除流: DeleteStream(nsId string, streamId string)
    17      - [x] 查询流信息: QueryStream(nsId string, streamId string)
    18      - [x] 更新流: UpdateStream(nsId string, streamId string, ops []PatchOperation)
    19      - [x] 获取流列表: ListStream(nsId string, offset, line int, prefix, sortBy string, qType int)
    20      - [x] 获取流地址
    21          - [x] 动态模式: DynamicPublishPlayURL(nsId string, streamId string, route *DynamicLiveRoute)
    22          - [x] 静态模式: StaticPublishPlayURL(nsId string, streamId string, route *StaticLiveRoute)
    23      - [x] 禁用流: DisableStream(nsId string, streamId string)
    24      - [x] 启用流: EnableStream(nsId string, streamId string)
    25      - [x] 查询推流记录: QueryStreamPubhistories(nsId string, streamId string, start, end int, line, offset int)
    26  
    27  - 模板管理
    28      - [x] 创建模板: AddTemplate(tmpl *Template)
    29      - [x] 删除模板: DeleteTemplate(templId string)
    30      - [x] 更新模板: UpdateTemplate(templId string, ops []PatchOperation)
    31      - [x] 查询模板信息: QueryTemplate(templId string)
    32      - [x] 获取模板列表: ListTemplate(offset, line int, sortBy string, templateType int, match string)
    33  
    34  - 录制管理相关接口
    35      - [x] 查询录制记录: QueryStreamRecordHistories(nsId string, streamId string, start, end int, marker string, line int)
    36      - [x] 获取截图列表: StreamsSnapshots(nsId string, streamId string, start, end int, qtype int, limit int, marker string)
    37      - [x] 获取直播封面截图: QueryStreamCover(nsId string, streamId string)
    38  
    39  
    40  ## Usage
    41  
    42  ```go
    43  package main
    44  
    45  import (
    46  	// ...
    47  	"github.com/qiniu/go-sdk/v7/auth"
    48  	"github.com/qiniu/go-sdk/v7/qvs"
    49  )
    50  
    51  var (
    52  	AccessKey = "<QINIU ACCESS KEY>" // 替换成自己 Qiniu 账号的 AccessKey.
    53  	SecretKey = "<QINIU SECRET KEY>" // 替换成自己 Qiniu 账号的 SecretKey.
    54  )
    55  
    56  func main() {
    57  	// ...
    58  	mac := auth.New(AccessKey, SecretKey)
    59  	manager := qvs.NewManager(mac, nil)
    60  	// ...
    61  }
    62  ```
    63