vikjapb

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MsgType_name = map[int32]string{
		0:   "MSG_TYPE_ERROR_RESPONSE",
		100: "MSG_TYPE_VIKJA_STATE",
		101: "MSG_TYPE_VIKJA_ENTITY_ACTION_REQUEST",
		102: "MSG_TYPE_VIKJA_ENTITY_ACTION_RESPONSE",
		103: "MSG_TYPE_VIKJA_ENTITY_ACTION_BROADCAST",
	}
	MsgType_value = map[string]int32{
		"MSG_TYPE_ERROR_RESPONSE":                0,
		"MSG_TYPE_VIKJA_STATE":                   100,
		"MSG_TYPE_VIKJA_ENTITY_ACTION_REQUEST":   101,
		"MSG_TYPE_VIKJA_ENTITY_ACTION_RESPONSE":  102,
		"MSG_TYPE_VIKJA_ENTITY_ACTION_BROADCAST": 103,
	}
)

Enum value maps for MsgType.

View Source
var File_messages_vikjapb_vikja_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type EntityAction

type EntityAction struct {

	// The entity id the action acts upon.
	EntityId uint32 `protobuf:"varint,1,opt,name=entity_id,json=entityId,proto3" json:"entity_id,omitempty"`
	// The name (or key) of the action.
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// The time the action was sent by client.
	Timestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// The data associated with the action.
	Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

An arbitrary (user-defined) action related to an entity that is broadcasted to all participants in a session. An action name is prefixed with the application name to avoid conflict between multiple apps in the same session using the same action.

func (*EntityAction) Descriptor deprecated

func (*EntityAction) Descriptor() ([]byte, []int)

Deprecated: Use EntityAction.ProtoReflect.Descriptor instead.

func (*EntityAction) GetData

func (x *EntityAction) GetData() []byte

func (*EntityAction) GetEntityId

func (x *EntityAction) GetEntityId() uint32

func (*EntityAction) GetName

func (x *EntityAction) GetName() string

func (*EntityAction) GetTimestamp

func (x *EntityAction) GetTimestamp() *timestamppb.Timestamp

func (*EntityAction) ProtoMessage

func (*EntityAction) ProtoMessage()

func (*EntityAction) ProtoReflect

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

func (*EntityAction) Reset

func (x *EntityAction) Reset()

func (*EntityAction) String

func (x *EntityAction) String() string

type EntityActionBroadcast

type EntityActionBroadcast struct {

	// The type of the message.
	Type MsgType `protobuf:"varint,1,opt,name=type,proto3,enum=vikja.MsgType" json:"type,omitempty"`
	// The time the message is sent.
	Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// The timestamp of the request that triggered the broadcast.
	OriginTimestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=origin_timestamp,json=originTimestamp,proto3" json:"origin_timestamp,omitempty"`
	// The entity action.
	EntityAction *EntityAction `protobuf:"bytes,4,opt,name=entity_action,json=entityAction,proto3" json:"entity_action,omitempty"`
	// contains filtered or unexported fields
}

EntityActionResponse represents a message that notifies that an entity action has been set.

func (*EntityActionBroadcast) Descriptor deprecated

func (*EntityActionBroadcast) Descriptor() ([]byte, []int)

Deprecated: Use EntityActionBroadcast.ProtoReflect.Descriptor instead.

func (*EntityActionBroadcast) GetEntityAction

func (x *EntityActionBroadcast) GetEntityAction() *EntityAction

func (*EntityActionBroadcast) GetOriginTimestamp

func (x *EntityActionBroadcast) GetOriginTimestamp() *timestamppb.Timestamp

func (*EntityActionBroadcast) GetTimestamp

func (x *EntityActionBroadcast) GetTimestamp() *timestamppb.Timestamp

func (*EntityActionBroadcast) GetType

func (x *EntityActionBroadcast) GetType() MsgType

func (*EntityActionBroadcast) ProtoMessage

func (*EntityActionBroadcast) ProtoMessage()

func (*EntityActionBroadcast) ProtoReflect

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

func (*EntityActionBroadcast) Reset

func (x *EntityActionBroadcast) Reset()

func (*EntityActionBroadcast) String

func (x *EntityActionBroadcast) String() string

type EntityActionRequest

type EntityActionRequest struct {

	// The type of the message.
	Type MsgType `protobuf:"varint,1,opt,name=type,proto3,enum=vikja.MsgType" json:"type,omitempty"`
	// The time the message is sent.
	Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// The id that identifies a request.
	RequestId uint32 `protobuf:"varint,1337,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
	// The entity action to set.
	EntityAction *EntityAction `protobuf:"bytes,3,opt,name=entity_action,json=entityAction,proto3" json:"entity_action,omitempty"`
	// contains filtered or unexported fields
}

EntityActionRequest represents a message to set an entity action to the current session.

func (*EntityActionRequest) Descriptor deprecated

func (*EntityActionRequest) Descriptor() ([]byte, []int)

Deprecated: Use EntityActionRequest.ProtoReflect.Descriptor instead.

func (*EntityActionRequest) GetEntityAction

func (x *EntityActionRequest) GetEntityAction() *EntityAction

func (*EntityActionRequest) GetRequestId

func (x *EntityActionRequest) GetRequestId() uint32

func (*EntityActionRequest) GetTimestamp

func (x *EntityActionRequest) GetTimestamp() *timestamppb.Timestamp

func (*EntityActionRequest) GetType

func (x *EntityActionRequest) GetType() MsgType

func (*EntityActionRequest) ProtoMessage

func (*EntityActionRequest) ProtoMessage()

func (*EntityActionRequest) ProtoReflect

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

func (*EntityActionRequest) Reset

func (x *EntityActionRequest) Reset()

func (*EntityActionRequest) String

func (x *EntityActionRequest) String() string

type EntityActionResponse

type EntityActionResponse struct {

	// The type of the message.
	Type MsgType `protobuf:"varint,1,opt,name=type,proto3,enum=vikja.MsgType" json:"type,omitempty"`
	// The time the message is sent.
	Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// The id that identifies a request.
	RequestId uint32 `protobuf:"varint,1337,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
	// contains filtered or unexported fields
}

EntityActionResponse represents a message returned in response to an entity action request.

func (*EntityActionResponse) Descriptor deprecated

func (*EntityActionResponse) Descriptor() ([]byte, []int)

Deprecated: Use EntityActionResponse.ProtoReflect.Descriptor instead.

func (*EntityActionResponse) GetRequestId

func (x *EntityActionResponse) GetRequestId() uint32

func (*EntityActionResponse) GetTimestamp

func (x *EntityActionResponse) GetTimestamp() *timestamppb.Timestamp

func (*EntityActionResponse) GetType

func (x *EntityActionResponse) GetType() MsgType

func (*EntityActionResponse) ProtoMessage

func (*EntityActionResponse) ProtoMessage()

func (*EntityActionResponse) ProtoReflect

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

func (*EntityActionResponse) Reset

func (x *EntityActionResponse) Reset()

func (*EntityActionResponse) String

func (x *EntityActionResponse) String() string

type MsgType

type MsgType int32
const (
	MsgType_MSG_TYPE_ERROR_RESPONSE                MsgType = 0
	MsgType_MSG_TYPE_VIKJA_STATE                   MsgType = 100
	MsgType_MSG_TYPE_VIKJA_ENTITY_ACTION_REQUEST   MsgType = 101
	MsgType_MSG_TYPE_VIKJA_ENTITY_ACTION_RESPONSE  MsgType = 102
	MsgType_MSG_TYPE_VIKJA_ENTITY_ACTION_BROADCAST MsgType = 103
)

func (MsgType) Descriptor

func (MsgType) Descriptor() protoreflect.EnumDescriptor

func (MsgType) Enum

func (x MsgType) Enum() *MsgType

func (MsgType) EnumDescriptor deprecated

func (MsgType) EnumDescriptor() ([]byte, []int)

Deprecated: Use MsgType.Descriptor instead.

func (MsgType) Number

func (x MsgType) Number() protoreflect.EnumNumber

func (MsgType) String

func (x MsgType) String() string

func (MsgType) Type

func (MsgType) Type() protoreflect.EnumType

type State

type State struct {

	// The type of the message.
	Type MsgType `protobuf:"varint,1,opt,name=type,proto3,enum=vikja.MsgType" json:"type,omitempty"`
	// The time the message is sent.
	Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// The latest entity actions.
	EntityActions []*EntityAction `protobuf:"bytes,3,rep,name=entity_actions,json=entityActions,proto3" json:"entity_actions,omitempty"`
	// contains filtered or unexported fields
}

State represents a Vikja state within a session.

func (*State) Descriptor deprecated

func (*State) Descriptor() ([]byte, []int)

Deprecated: Use State.ProtoReflect.Descriptor instead.

func (*State) GetEntityActions

func (x *State) GetEntityActions() []*EntityAction

func (*State) GetTimestamp

func (x *State) GetTimestamp() *timestamppb.Timestamp

func (*State) GetType

func (x *State) GetType() MsgType

func (*State) ProtoMessage

func (*State) ProtoMessage()

func (*State) ProtoReflect

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

func (*State) Reset

func (x *State) Reset()

func (*State) String

func (x *State) String() string

Jump to

Keyboard shortcuts

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