Documentation
¶
Index ¶
- Constants
- Variables
- func ResponseError(resp *http.Response) (err error)
- func UserAgent() string
- type Credentials
- type ErrorInfo
- type Hub
- type OptionalArguments
- type RPC
- func (r RPC) Del(url string) (resp *http.Response, err error)
- func (r RPC) DelCall(ret interface{}, url string) (err error)
- func (r RPC) Do(req *http.Request) (resp *http.Response, err error)
- func (r RPC) Get(url string) (resp *http.Response, err error)
- func (r RPC) GetCall(ret interface{}, url string) (err error)
- func (r RPC) Post(url string, data interface{}) (resp *http.Response, err error)
- func (r RPC) PostCall(ret interface{}, url string, params interface{}) (err error)
- func (r RPC) RequestWith(method string, url string, bodyType string, body io.Reader, bodyLength int) (resp *http.Response, err error)
- type Stream
- func (s Stream) Delete() (ret interface{}, err error)
- func (s Stream) Disable() (stream Stream, err error)
- func (s Stream) Enable() (stream Stream, err error)
- func (s Stream) HlsLiveUrls() (urls map[string]string, err error)
- func (s Stream) HlsPlaybackUrls(start, end int64) (urls map[string]string, err error)
- func (s Stream) HttpFlvLiveUrls() (urls map[string]string, err error)
- func (s Stream) Refresh() (stream Stream, err error)
- func (s Stream) RtmpLiveUrls() (urls map[string]string, err error)
- func (s Stream) RtmpPublishUrl() (url string)
- func (s Stream) SaveAs(name, format string, start, end int64, args OptionalArguments) (ret StreamSaveAsResponse, err error)
- func (s Stream) Segments(args OptionalArguments) (ret StreamSegmentList, err error)
- func (s Stream) Snapshot(name, format string, args OptionalArguments) (ret StreamSnapshotResponse, err error)
- func (s Stream) Status() (ret StreamStatus, err error)
- func (s Stream) ToJSONString() (jsonBlob string, err error)
- func (s Stream) Update() (stream Stream, err error)
- type StreamId
- type StreamIdList
- type StreamList
- type StreamSaveAsResponse
- type StreamSegment
- type StreamSegmentList
- type StreamSnapshotResponse
- type StreamStatus
- type Transport
Constants ¶
View Source
const ( SDK_VERSION = "1.5.2" SDK_USER_AGENT = "pili-sdk-go" DEFAULT_API_VERSION = "v1" DEFAULT_API_HOST = "pili.qiniuapi.com" ORIGIN = "ORIGIN" )
Variables ¶
View Source
var ( API_HOST string USE_HTTPS bool )
Functions ¶
func ResponseError ¶
Types ¶
type Credentials ¶ added in v1.5.0
func NewCredentials ¶ added in v1.5.0
func NewCredentials(accessKey, secretKey string) *Credentials
type ErrorInfo ¶
type Hub ¶ added in v1.5.0
type Hub struct {
// contains filtered or unexported fields
}
func NewHub ¶ added in v1.5.0
func NewHub(creds *Credentials, hubName string) Hub
func (Hub) CreateStream ¶ added in v1.5.0
func (c Hub) CreateStream(args OptionalArguments) (stream Stream, err error)
func (Hub) ListStreams ¶ added in v1.5.0
func (c Hub) ListStreams(args OptionalArguments) (ret StreamList, err error)
type OptionalArguments ¶ added in v1.2.0
type RPC ¶ added in v1.5.0
func NewRPC ¶ added in v1.5.0
func NewRPC(creds *Credentials) *RPC
type Stream ¶
type Stream struct {
Id string `json:"id"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
Title string `json:"title"`
Hub string `json:"hub"`
Disabled bool `json:"disabled"`
PublishKey string `json:"publishKey"`
PublishSecurity string `json:"publishSecurity"`
Profiles []string `json:"profiles,omitempty"`
Hosts struct {
Publish map[string]string `json:"publish,omitempty"`
Live map[string]string `json:"live,omitempty"`
Playback map[string]string `json:"playback,omitempty"`
} `json:"hosts,omitempty"`
// contains filtered or unexported fields
}
func (Stream) HlsLiveUrls ¶ added in v1.2.0
func (Stream) HlsPlaybackUrls ¶ added in v1.2.0
func (Stream) HttpFlvLiveUrls ¶ added in v1.5.0
func (Stream) RtmpLiveUrls ¶ added in v1.2.0
func (Stream) RtmpPublishUrl ¶ added in v1.1.0
Publish URL -------------------------------------------------------------------------------
func (Stream) SaveAs ¶ added in v1.3.0
func (s Stream) SaveAs(name, format string, start, end int64, args OptionalArguments) (ret StreamSaveAsResponse, err error)
func (Stream) Segments ¶ added in v1.2.0
func (s Stream) Segments(args OptionalArguments) (ret StreamSegmentList, err error)
func (Stream) Snapshot ¶ added in v1.5.0
func (s Stream) Snapshot(name, format string, args OptionalArguments) (ret StreamSnapshotResponse, err error)
func (Stream) Status ¶ added in v1.2.0
func (s Stream) Status() (ret StreamStatus, err error)
func (Stream) ToJSONString ¶ added in v1.2.0
type StreamIdList ¶ added in v1.5.1
type StreamList ¶
type StreamSaveAsResponse ¶ added in v1.3.0
type StreamSegment ¶
type StreamSegmentList ¶
type StreamSegmentList struct {
Start int64 `json:"start"`
End int64 `json:"end"`
Duration int64 `json:"duration"`
Segments []*StreamSegment `json:"segments"`
}
type StreamSnapshotResponse ¶ added in v1.5.0
type StreamStatus ¶ added in v1.1.0
type StreamStatus struct {
Addr string `json:"addr"`
StartFrom string `json:"startFrom"`
Status string `json:"status"`
BytesPerSecond float64 `json:"bytesPerSecond"`
FramesPerSecond struct {
Audio float64 `json:"audio"`
Video float64 `json:"video"`
Data float64 `json:"data"`
} `json:"framesPerSecond"`
}
Click to show internal directories.
Click to hide internal directories.