Documentation ¶
Index ¶
- Constants
- Variables
- func ResponseError(resp *http.Response) (err error)
- func UserAgent() string
- type Client
- type Error
- type ErrorInfo
- type ErrorRet
- type Mac
- type OptionalArguments
- type RPC_Client
- func (r RPC_Client) Del(url string) (resp *http.Response, err error)
- func (r RPC_Client) DelCall(ret interface{}, url string) (err error)
- func (r RPC_Client) Do(req *http.Request) (resp *http.Response, err error)
- func (r RPC_Client) Get(url string) (resp *http.Response, err error)
- func (r RPC_Client) GetCall(ret interface{}, url string) (err error)
- func (r RPC_Client) Post(url string, data interface{}) (resp *http.Response, err error)
- func (r RPC_Client) PostCall(ret interface{}, url string, params interface{}) (err error)
- func (r RPC_Client) 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) 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) Status() (ret StreamStatus, err error)
- func (s Stream) ToJSONString() (jsonBlob string, err error)
- func (s Stream) Update(args OptionalArguments) (stream Stream, err error)
- type StreamList
- type StreamSaveAsResponse
- type StreamSegment
- type StreamSegmentList
- type StreamStatus
- type Transport
Constants ¶
View Source
const ( SDK_VERSION = "1.3.0" API_VERSION = "v1" DEFAULT_API_HOST = "pili.qiniuapi.com" ORIGIN = "ORIGIN" )
Variables ¶
View Source
var ( API_HOST string USE_HTTPS bool )
View Source
var API_BASE_URL = fmt.Sprintf("%s://%s/%s", getHttpScheme(), getApiHost(), API_VERSION)
View Source
var DefaultClient = RPC_Client{http.DefaultClient}
Functions ¶
func ResponseError ¶
Types ¶
type Client ¶ added in v1.2.0
type Client struct {
// contains filtered or unexported fields
}
func (Client) CreateStream ¶ added in v1.2.0
func (c Client) CreateStream(args OptionalArguments) (stream Stream, err error)
func (Client) ListStreams ¶ added in v1.2.0
func (c Client) ListStreams(args OptionalArguments) (ret StreamList, err error)
type OptionalArguments ¶ added in v1.2.0
type RPC_Client ¶
func (RPC_Client) DelCall ¶
func (r RPC_Client) DelCall(ret interface{}, url string) (err error)
func (RPC_Client) GetCall ¶
func (r RPC_Client) GetCall(ret interface{}, url string) (err error)
func (RPC_Client) Post ¶
func (r RPC_Client) Post(url string, data interface{}) (resp *http.Response, err error)
func (RPC_Client) PostCall ¶
func (r RPC_Client) PostCall(ret interface{}, url string, params interface{}) (err error)
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"` Play map[string]string `json:"play,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) 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) Status ¶ added in v1.2.0
func (s Stream) Status() (ret StreamStatus, err error)
func (Stream) ToJSONString ¶ added in v1.2.0
type StreamList ¶
type StreamSaveAsResponse ¶ added in v1.3.0
type StreamSegment ¶
type StreamSegmentList ¶
type StreamSegmentList struct {
Segments []*StreamSegment `json:"segments"`
}
type StreamStatus ¶ added in v1.1.0
Click to show internal directories.
Click to hide internal directories.