Documentation
¶
Index ¶
- Variables
- type Message
- func (*Message) Descriptor() ([]byte, []int)deprecated
- func (em *Message) Encode(w io.Writer) error
- func (x *Message) GetChatContent() string
- func (x *Message) GetErrorMessage() string
- func (x *Message) GetExpirationId() uint64
- func (m *Message) GetPayload() isMessage_Payload
- func (x *Message) GetPlaybackStatus() *Status
- func (x *Message) GetSender() *Sender
- func (x *Message) GetTimestamp() int64
- func (x *Message) GetType() MessageType
- func (x *Message) GetViewerCount() int64
- func (em *Message) MessageType() int
- func (*Message) ProtoMessage()
- func (x *Message) ProtoReflect() protoreflect.Message
- func (x *Message) Reset()
- func (x *Message) String() string
- type MessageType
- func (MessageType) Descriptor() protoreflect.EnumDescriptor
- func (x MessageType) Enum() *MessageType
- func (MessageType) EnumDescriptor() ([]byte, []int)deprecated
- func (x MessageType) Number() protoreflect.EnumNumber
- func (x MessageType) String() string
- func (MessageType) Type() protoreflect.EnumType
- type Message_ChatContent
- type Message_ErrorMessage
- type Message_ExpirationId
- type Message_PlaybackStatus
- type Message_ViewerCount
- type Sender
- type Status
- func (*Status) Descriptor() ([]byte, []int)deprecated
- func (x *Status) GetCurrentTime() float64
- func (x *Status) GetIsPlaying() bool
- func (x *Status) GetPlaybackRate() float64
- func (*Status) ProtoMessage()
- func (x *Status) ProtoReflect() protoreflect.Message
- func (x *Status) Reset()
- func (x *Status) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var ( MessageType_name = map[int32]string{ 0: "UNKNOWN", 1: "ERROR", 2: "CHAT", 3: "STATUS", 4: "CHECK_STATUS", 5: "EXPIRED", 6: "CURRENT", 7: "MOVIES", 8: "VIEWER_COUNT", 9: "SYNC", 10: "MY_STATUS", } MessageType_value = map[string]int32{ "UNKNOWN": 0, "ERROR": 1, "CHAT": 2, "STATUS": 3, "CHECK_STATUS": 4, "EXPIRED": 5, "CURRENT": 6, "MOVIES": 7, "VIEWER_COUNT": 8, "SYNC": 9, "MY_STATUS": 10, } )
Enum value maps for MessageType.
View Source
var File_proto_message_message_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Message ¶ added in v0.7.0
type Message struct {
Type MessageType `protobuf:"varint,1,opt,name=type,proto3,enum=proto.MessageType" json:"type,omitempty"`
Timestamp int64 `protobuf:"fixed64,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
Sender *Sender `protobuf:"bytes,3,opt,name=sender,proto3,oneof" json:"sender,omitempty"`
// Types that are assignable to Payload:
//
// *Message_ErrorMessage
// *Message_ChatContent
// *Message_PlaybackStatus
// *Message_ExpirationId
// *Message_ViewerCount
Payload isMessage_Payload `protobuf_oneof:"payload"`
// contains filtered or unexported fields
}
func (*Message) Descriptor
deprecated
added in
v0.7.0
func (*Message) GetChatContent ¶ added in v0.7.0
func (*Message) GetErrorMessage ¶ added in v0.7.0
func (*Message) GetExpirationId ¶ added in v0.7.0
func (*Message) GetPayload ¶ added in v0.7.0
func (m *Message) GetPayload() isMessage_Payload
func (*Message) GetPlaybackStatus ¶ added in v0.7.0
func (*Message) GetTimestamp ¶ added in v0.7.0
func (*Message) GetType ¶ added in v0.7.0
func (x *Message) GetType() MessageType
func (*Message) GetViewerCount ¶ added in v0.7.0
func (*Message) MessageType ¶ added in v0.7.0
func (*Message) ProtoMessage ¶ added in v0.7.0
func (*Message) ProtoMessage()
func (*Message) ProtoReflect ¶ added in v0.7.0
func (x *Message) ProtoReflect() protoreflect.Message
type MessageType ¶ added in v0.7.0
type MessageType int32
const ( MessageType_UNKNOWN MessageType = 0 MessageType_ERROR MessageType = 1 MessageType_CHAT MessageType = 2 MessageType_STATUS MessageType = 3 MessageType_CHECK_STATUS MessageType = 4 MessageType_EXPIRED MessageType = 5 MessageType_CURRENT MessageType = 6 MessageType_MOVIES MessageType = 7 MessageType_VIEWER_COUNT MessageType = 8 MessageType_SYNC MessageType = 9 MessageType_MY_STATUS MessageType = 10 )
func (MessageType) Descriptor ¶ added in v0.7.0
func (MessageType) Descriptor() protoreflect.EnumDescriptor
func (MessageType) Enum ¶ added in v0.7.0
func (x MessageType) Enum() *MessageType
func (MessageType) EnumDescriptor
deprecated
added in
v0.7.0
func (MessageType) EnumDescriptor() ([]byte, []int)
Deprecated: Use MessageType.Descriptor instead.
func (MessageType) Number ¶ added in v0.7.0
func (x MessageType) Number() protoreflect.EnumNumber
func (MessageType) String ¶ added in v0.7.0
func (x MessageType) String() string
func (MessageType) Type ¶ added in v0.7.0
func (MessageType) Type() protoreflect.EnumType
type Message_ChatContent ¶ added in v0.7.0
type Message_ChatContent struct {
ChatContent string `protobuf:"bytes,5,opt,name=chat_content,json=chatContent,proto3,oneof"`
}
type Message_ErrorMessage ¶ added in v0.7.0
type Message_ErrorMessage struct {
ErrorMessage string `protobuf:"bytes,4,opt,name=error_message,json=errorMessage,proto3,oneof"`
}
type Message_ExpirationId ¶ added in v0.7.0
type Message_ExpirationId struct {
ExpirationId uint64 `protobuf:"fixed64,7,opt,name=expiration_id,json=expirationId,proto3,oneof"`
}
type Message_PlaybackStatus ¶ added in v0.7.0
type Message_PlaybackStatus struct {
PlaybackStatus *Status `protobuf:"bytes,6,opt,name=playback_status,json=playbackStatus,proto3,oneof"`
}
type Message_ViewerCount ¶ added in v0.7.0
type Message_ViewerCount struct {
ViewerCount int64 `protobuf:"varint,8,opt,name=viewer_count,json=viewerCount,proto3,oneof"`
}
type Sender ¶ added in v0.3.6
type Sender struct {
UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
// contains filtered or unexported fields
}
func (*Sender) Descriptor
deprecated
added in
v0.3.6
func (*Sender) GetUsername ¶ added in v0.3.6
func (*Sender) ProtoMessage ¶ added in v0.3.6
func (*Sender) ProtoMessage()
func (*Sender) ProtoReflect ¶ added in v0.3.6
func (x *Sender) ProtoReflect() protoreflect.Message
type Status ¶
type Status struct {
IsPlaying bool `protobuf:"varint,1,opt,name=is_playing,json=isPlaying,proto3" json:"is_playing,omitempty"`
CurrentTime float64 `protobuf:"fixed64,2,opt,name=current_time,json=currentTime,proto3" json:"current_time,omitempty"`
PlaybackRate float64 `protobuf:"fixed64,3,opt,name=playback_rate,json=playbackRate,proto3" json:"playback_rate,omitempty"`
// contains filtered or unexported fields
}
func (*Status) Descriptor
deprecated
func (*Status) GetCurrentTime ¶ added in v0.7.0
func (*Status) GetIsPlaying ¶ added in v0.7.0
func (*Status) GetPlaybackRate ¶ added in v0.7.0
func (*Status) ProtoMessage ¶
func (*Status) ProtoMessage()
func (*Status) ProtoReflect ¶
func (x *Status) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.