pb

package
v0.7.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2024 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

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) Descriptor() ([]byte, []int)

Deprecated: Use Message.ProtoReflect.Descriptor instead.

func (*Message) Encode added in v0.7.0

func (em *Message) Encode(w io.Writer) error

func (*Message) GetChatContent added in v0.7.0

func (x *Message) GetChatContent() string

func (*Message) GetErrorMessage added in v0.7.0

func (x *Message) GetErrorMessage() string

func (*Message) GetExpirationId added in v0.7.0

func (x *Message) GetExpirationId() uint64

func (*Message) GetPayload added in v0.7.0

func (m *Message) GetPayload() isMessage_Payload

func (*Message) GetPlaybackStatus added in v0.7.0

func (x *Message) GetPlaybackStatus() *Status

func (*Message) GetSender added in v0.7.0

func (x *Message) GetSender() *Sender

func (*Message) GetTimestamp added in v0.7.0

func (x *Message) GetTimestamp() int64

func (*Message) GetType added in v0.7.0

func (x *Message) GetType() MessageType

func (*Message) GetViewerCount added in v0.7.0

func (x *Message) GetViewerCount() int64

func (*Message) MessageType added in v0.7.0

func (em *Message) MessageType() int

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

func (*Message) Reset added in v0.7.0

func (x *Message) Reset()

func (*Message) String added in v0.7.0

func (x *Message) String() string

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) 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

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) Descriptor() ([]byte, []int)

Deprecated: Use Sender.ProtoReflect.Descriptor instead.

func (*Sender) GetUserId added in v0.7.0

func (x *Sender) GetUserId() string

func (*Sender) GetUsername added in v0.3.6

func (x *Sender) GetUsername() string

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

func (*Sender) Reset added in v0.3.6

func (x *Sender) Reset()

func (*Sender) String added in v0.3.6

func (x *Sender) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Status.ProtoReflect.Descriptor instead.

func (*Status) GetCurrentTime added in v0.7.0

func (x *Status) GetCurrentTime() float64

func (*Status) GetIsPlaying added in v0.7.0

func (x *Status) GetIsPlaying() bool

func (*Status) GetPlaybackRate added in v0.7.0

func (x *Status) GetPlaybackRate() float64

func (*Status) ProtoMessage

func (*Status) ProtoMessage()

func (*Status) ProtoReflect

func (x *Status) ProtoReflect() protoreflect.Message

func (*Status) Reset

func (x *Status) Reset()

func (*Status) String

func (x *Status) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL