Documentation ¶
Index ¶
- Variables
- type Connection
- func (c *Connection) Connect()
- func (c *Connection) Disconnect()
- func (r *Connection) Dispatch(e events.Event)
- func (r *Connection) RegisterDispatch(dispatch func(events.Event))
- func (r *Connection) RegisterRequest(send func(responses.Payload) (*api.CastMessage, error))
- func (r *Connection) RegisterSend(send func(responses.Payload) error)
- func (r *Connection) Request(p responses.Payload) (*api.CastMessage, error)
- func (r *Connection) Send(p responses.Payload) error
- func (c *Connection) Unmarshal(message string)
- type Heartbeat
- func (h *Heartbeat) Connect()
- func (h *Heartbeat) Disconnect()
- func (r *Heartbeat) Dispatch(e events.Event)
- func (h *Heartbeat) Ping()
- func (h *Heartbeat) Pong()
- func (r *Heartbeat) RegisterDispatch(dispatch func(events.Event))
- func (r *Heartbeat) RegisterRequest(send func(responses.Payload) (*api.CastMessage, error))
- func (r *Heartbeat) RegisterSend(send func(responses.Payload) error)
- func (r *Heartbeat) Request(p responses.Payload) (*api.CastMessage, error)
- func (r *Heartbeat) Send(p responses.Payload) error
- func (h *Heartbeat) Unmarshal(message string)
- type LaunchRequest
- type Media
- func (m *Media) Connect()
- func (m *Media) Disconnect()
- func (r *Media) Dispatch(e events.Event)
- func (c *Media) LoadMedia(media responses.MediaItem, currentTime int, autoplay bool, ...) error
- func (m *Media) Pause()
- func (m *Media) Play()
- func (r *Media) RegisterDispatch(dispatch func(events.Event))
- func (r *Media) RegisterRequest(send func(responses.Payload) (*api.CastMessage, error))
- func (r *Media) RegisterSend(send func(responses.Payload) error)
- func (r *Media) Request(p responses.Payload) (*api.CastMessage, error)
- func (m *Media) Seek(currentTime int)
- func (r *Media) Send(p responses.Payload) error
- func (m *Media) Stop()
- func (m *Media) Unmarshal(message string)
- type Receiver
- func (r *Receiver) Connect()
- func (r *Receiver) Disconnect()
- func (r *Receiver) Dispatch(e events.Event)
- func (r *Receiver) GetSessionByAppId(appId string) *responses.ApplicationSession
- func (r *Receiver) LaunchApp(appId string) error
- func (r *Receiver) RegisterDispatch(dispatch func(events.Event))
- func (r *Receiver) RegisterRequest(send func(responses.Payload) (*api.CastMessage, error))
- func (r *Receiver) RegisterSend(send func(responses.Payload) error)
- func (r *Receiver) Request(p responses.Payload) (*api.CastMessage, error)
- func (r *Receiver) Send(p responses.Payload) error
- func (r *Receiver) SetVolume(volume float64) (*api.CastMessage, error)
- func (r *Receiver) Unmarshal(message string)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrAppAlreadyLaunched = fmt.Errorf("app already launched")
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
func (*Connection) Connect ¶
func (c *Connection) Connect()
func (*Connection) Disconnect ¶
func (c *Connection) Disconnect()
func (*Connection) RegisterDispatch ¶
func (*Connection) RegisterRequest ¶
func (r *Connection) RegisterRequest(send func(responses.Payload) (*api.CastMessage, error))
func (*Connection) RegisterSend ¶
func (*Connection) Request ¶
func (r *Connection) Request(p responses.Payload) (*api.CastMessage, error)
func (*Connection) Unmarshal ¶
func (c *Connection) Unmarshal(message string)
type Heartbeat ¶
type Heartbeat struct { OnFailure func() // contains filtered or unexported fields }
func NewHeartbeat ¶
func NewHeartbeat() *Heartbeat
func (*Heartbeat) Disconnect ¶
func (h *Heartbeat) Disconnect()
func (*Heartbeat) RegisterDispatch ¶
func (*Heartbeat) RegisterRequest ¶
func (r *Heartbeat) RegisterRequest(send func(responses.Payload) (*api.CastMessage, error))
func (*Heartbeat) RegisterSend ¶
type LaunchRequest ¶
type Media ¶
type Media struct {
// contains filtered or unexported fields
}
func (*Media) Disconnect ¶
func (m *Media) Disconnect()
func (*Media) RegisterDispatch ¶
func (*Media) RegisterRequest ¶
func (r *Media) RegisterRequest(send func(responses.Payload) (*api.CastMessage, error))
func (*Media) RegisterSend ¶
type Receiver ¶
type Receiver struct {
// contains filtered or unexported fields
}
func (*Receiver) Disconnect ¶
func (r *Receiver) Disconnect()
func (*Receiver) GetSessionByAppId ¶
func (r *Receiver) GetSessionByAppId(appId string) *responses.ApplicationSession
func (*Receiver) RegisterDispatch ¶
func (*Receiver) RegisterRequest ¶
func (r *Receiver) RegisterRequest(send func(responses.Payload) (*api.CastMessage, error))
func (*Receiver) RegisterSend ¶
func (*Receiver) Request ¶
func (r *Receiver) Request(p responses.Payload) (*api.CastMessage, error)
Click to show internal directories.
Click to hide internal directories.