Documentation ¶
Index ¶
- Constants
- Variables
- func ResponseError(resp *http.Response) (err error)
- func Sign(secret, data []byte) (token string)
- func URI_DelStream(id string) string
- func URI_GetStream(id string) string
- func URI_GetStreamSegments(id string, options map[string]interface{}) (httpurl string)
- func URI_GetStreamStatus(id string) string
- func URI_ListStreams(hub string, options map[string]interface{}) (httpurl string)
- func URI_NewStream() string
- func URI_SetStream(id string) string
- func UserAgent() string
- type API_Client
- func (app API_Client) CreateStream(hub, title, publishKey, publishSecurity string) (ret Stream, err error)
- func (app API_Client) DelStream(id string) (ret interface{}, err error)
- func (app API_Client) GetStream(id string) (ret Stream, err error)
- func (app API_Client) GetStreamSegments(id string, startTime, endTime int64) (ret StreamSegmentList, err error)
- func (app API_Client) GetStreamStatus(id string) (ret StreamStatus, err error)
- func (app API_Client) ListStreams(hub, marker string, limit int64) (ret StreamList, err error)
- func (app API_Client) SetStream(id, publishKey, publishSecurity string, disabled bool) (ret Stream, err error)
- type Error
- type ErrorInfo
- type ErrorRet
- type Mac
- 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) HlsLiveUrl(hlsPlayHost, profile string) (url string)
- func (s Stream) HlsPlaybackUrl(hlsPlayHost, profile string, start, end int64) (url string)
- func (s Stream) PublishToken(rtmpPublishHost string, nonce int64) (token string)
- func (s Stream) RtmpLiveUrl(rtmpPlayHost, profile string) (url string)
- func (s Stream) RtmpPublishUrl(rtmpPublishHost string, nonce int64) (url string)
- type StreamList
- type StreamSegment
- type StreamSegmentList
- type StreamStatus
- type Transport
Constants ¶
View Source
const ( SDK_VERSION = "1.1.0" API_VERSION = "v1" DEFAULT_API_HOST = "pili.qiniuapi.com" )
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 ¶
func URI_DelStream ¶
func URI_GetStream ¶
func URI_GetStreamSegments ¶
func URI_GetStreamStatus ¶ added in v1.1.0
func URI_ListStreams ¶
func URI_NewStream ¶
func URI_NewStream() string
func URI_SetStream ¶
Types ¶
type API_Client ¶
type API_Client struct {
Conn RPC_Client
}
func NewClient ¶
func NewClient(mac *Mac) API_Client
func (API_Client) CreateStream ¶
func (app API_Client) CreateStream(hub, title, publishKey, publishSecurity string) (ret Stream, err error)
func (API_Client) DelStream ¶
func (app API_Client) DelStream(id string) (ret interface{}, err error)
func (API_Client) GetStreamSegments ¶
func (app API_Client) GetStreamSegments(id string, startTime, endTime int64) (ret StreamSegmentList, err error)
func (API_Client) GetStreamStatus ¶ added in v1.1.0
func (app API_Client) GetStreamStatus(id string) (ret StreamStatus, err error)
func (API_Client) ListStreams ¶
func (app API_Client) ListStreams(hub, marker string, limit int64) (ret StreamList, err error)
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"` Hub string `json:"hub"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` Title string `json:"title"` PublishKey string `json:"publishKey"` PublishSecurity string `json:"publishSecurity"` Disabled bool `json:"disabled"` }
func (Stream) HlsLiveUrl ¶ added in v1.1.0
func (Stream) HlsPlaybackUrl ¶ added in v1.1.0
func (Stream) PublishToken ¶ added in v1.1.0
func (Stream) RtmpLiveUrl ¶ added in v1.1.0
Play URL --------------------------------------------------------------------------------
type StreamList ¶
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.