Documentation ¶
Overview ¶
Package message defines websocket message protobuf type.
Index ¶
- Variables
- type ErrorSpec
- type ItemUpdateSpec
- func (*ItemUpdateSpec) Descriptor() ([]byte, []int)deprecated
- func (x *ItemUpdateSpec) GetNew() []byte
- func (x *ItemUpdateSpec) GetOld() []byte
- func (*ItemUpdateSpec) ProtoMessage()
- func (x *ItemUpdateSpec) ProtoReflect() protoreflect.Message
- func (x *ItemUpdateSpec) Reset()
- func (x *ItemUpdateSpec) String() string
- type Kind
- type Message
- func (*Message) Descriptor() ([]byte, []int)deprecated
- func (x *Message) GetKind() Kind
- func (x *Message) GetMetadata() *Metadata
- func (x *Message) GetSpec() string
- func (*Message) ProtoMessage()
- func (x *Message) ProtoReflect() protoreflect.Message
- func (x *Message) Reset()
- func (x *Message) String() string
- func (x *Message) UnmarshalSpec(dest interface{}) error
- type Metadata
- type SubscribedSpec
- type UnsubscribeSpec
- type WatchSpec
- func (*WatchSpec) Descriptor() ([]byte, []int)deprecated
- func (x *WatchSpec) GetContext() *common.Context
- func (x *WatchSpec) GetResource() *resource.WatchRequest
- func (x *WatchSpec) GetSelector() string
- func (x *WatchSpec) GetSource() common.Runtime
- func (*WatchSpec) ProtoMessage()
- func (x *WatchSpec) ProtoReflect() protoreflect.Message
- func (x *WatchSpec) Reset()
- func (x *WatchSpec) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Kind_name = map[int32]string{ 0: "Error", 1: "OK", 2: "Watch", 3: "Unsubscribe", 4: "Subscribed", 5: "EventItemAdd", 6: "EventItemUpdate", 7: "EventItemDelete", 8: "EventError", } Kind_value = map[string]int32{ "Error": 0, "OK": 1, "Watch": 2, "Unsubscribe": 3, "Subscribed": 4, "EventItemAdd": 5, "EventItemUpdate": 6, "EventItemDelete": 7, "EventError": 8, } )
Enum value maps for Kind.
View Source
var File_socket_message_message_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type ErrorSpec ¶
type ErrorSpec struct { Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` // contains filtered or unexported fields }
func (*ErrorSpec) Descriptor
deprecated
func (*ErrorSpec) ProtoMessage ¶
func (*ErrorSpec) ProtoMessage()
func (*ErrorSpec) ProtoReflect ¶
func (x *ErrorSpec) ProtoReflect() protoreflect.Message
type ItemUpdateSpec ¶
type ItemUpdateSpec struct { Old []byte `protobuf:"bytes,1,opt,name=old,proto3" json:"old,omitempty"` New []byte `protobuf:"bytes,2,opt,name=new,proto3" json:"new,omitempty"` // contains filtered or unexported fields }
func (*ItemUpdateSpec) Descriptor
deprecated
func (*ItemUpdateSpec) Descriptor() ([]byte, []int)
Deprecated: Use ItemUpdateSpec.ProtoReflect.Descriptor instead.
func (*ItemUpdateSpec) GetNew ¶
func (x *ItemUpdateSpec) GetNew() []byte
func (*ItemUpdateSpec) GetOld ¶
func (x *ItemUpdateSpec) GetOld() []byte
func (*ItemUpdateSpec) ProtoMessage ¶
func (*ItemUpdateSpec) ProtoMessage()
func (*ItemUpdateSpec) ProtoReflect ¶
func (x *ItemUpdateSpec) ProtoReflect() protoreflect.Message
func (*ItemUpdateSpec) Reset ¶
func (x *ItemUpdateSpec) Reset()
func (*ItemUpdateSpec) String ¶
func (x *ItemUpdateSpec) String() string
type Kind ¶
type Kind int32
Message kinds.
const ( Kind_Error Kind = 0 // A generic error response. Kind_OK Kind = 1 // A generic ok response. Kind_Watch Kind = 2 // Watch request. Kind_Unsubscribe Kind = 3 // Unsubscribe request. Kind_Subscribed Kind = 4 // Subscribed response. Kind_EventItemAdd Kind = 5 // Watch add item event. Kind_EventItemUpdate Kind = 6 // Watch update item event. Kind_EventItemDelete Kind = 7 // Watch delete item event. Kind_EventError Kind = 8 // Watch error which means that watch is invalid. )
func (Kind) Descriptor ¶
func (Kind) Descriptor() protoreflect.EnumDescriptor
func (Kind) EnumDescriptor
deprecated
func (Kind) Number ¶
func (x Kind) Number() protoreflect.EnumNumber
func (Kind) Type ¶
func (Kind) Type() protoreflect.EnumType
type Message ¶
type Message struct { Kind Kind `protobuf:"varint,1,opt,name=kind,proto3,enum=socket.Kind" json:"kind,omitempty"` Metadata *Metadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` // Spec can vary on the message kind. // Can either have some specific data for the kind or be empty. Spec string `protobuf:"bytes,3,opt,name=spec,proto3" json:"spec,omitempty"` // contains filtered or unexported fields }
Web socket message.
func (*Message) Descriptor
deprecated
func (*Message) GetMetadata ¶
func (*Message) ProtoMessage ¶
func (*Message) ProtoMessage()
func (*Message) ProtoReflect ¶
func (x *Message) ProtoReflect() protoreflect.Message
func (*Message) UnmarshalSpec ¶
UnmarshalSpec decode spec into a go struct.
type Metadata ¶
type Metadata struct { // Uid match/route identifier. Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"` // contains filtered or unexported fields }
Message metadata which helps matching request vs response and routing to any specific subscription.
func (*Metadata) Descriptor
deprecated
func (*Metadata) ProtoMessage ¶
func (*Metadata) ProtoMessage()
func (*Metadata) ProtoReflect ¶
func (x *Metadata) ProtoReflect() protoreflect.Message
type SubscribedSpec ¶
type SubscribedSpec struct { // Subscription uid generated for the subscription. Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"` // contains filtered or unexported fields }
Watch response.
func (*SubscribedSpec) Descriptor
deprecated
func (*SubscribedSpec) Descriptor() ([]byte, []int)
Deprecated: Use SubscribedSpec.ProtoReflect.Descriptor instead.
func (*SubscribedSpec) GetUid ¶
func (x *SubscribedSpec) GetUid() string
func (*SubscribedSpec) ProtoMessage ¶
func (*SubscribedSpec) ProtoMessage()
func (*SubscribedSpec) ProtoReflect ¶
func (x *SubscribedSpec) ProtoReflect() protoreflect.Message
func (*SubscribedSpec) Reset ¶
func (x *SubscribedSpec) Reset()
func (*SubscribedSpec) String ¶
func (x *SubscribedSpec) String() string
type UnsubscribeSpec ¶
type UnsubscribeSpec struct { // Subscription to destroy. Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"` // contains filtered or unexported fields }
Unsubscribe request.
func (*UnsubscribeSpec) Descriptor
deprecated
func (*UnsubscribeSpec) Descriptor() ([]byte, []int)
Deprecated: Use UnsubscribeSpec.ProtoReflect.Descriptor instead.
func (*UnsubscribeSpec) GetUid ¶
func (x *UnsubscribeSpec) GetUid() string
func (*UnsubscribeSpec) ProtoMessage ¶
func (*UnsubscribeSpec) ProtoMessage()
func (*UnsubscribeSpec) ProtoReflect ¶
func (x *UnsubscribeSpec) ProtoReflect() protoreflect.Message
func (*UnsubscribeSpec) Reset ¶
func (x *UnsubscribeSpec) Reset()
func (*UnsubscribeSpec) String ¶
func (x *UnsubscribeSpec) String() string
type WatchSpec ¶
type WatchSpec struct { // Resource name to watch. Resource *resource.WatchRequest `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` // Source to get the watch data from. Source common.Runtime `protobuf:"varint,2,opt,name=source,proto3,enum=common.Runtime" json:"source,omitempty"` // Context settings to fetch the data from. Context *common.Context `protobuf:"bytes,3,opt,name=context,proto3" json:"context,omitempty"` // Selector represents watch label selector. Selector string `protobuf:"bytes,4,opt,name=selector,proto3" json:"selector,omitempty"` // contains filtered or unexported fields }
func (*WatchSpec) Descriptor
deprecated
func (*WatchSpec) GetContext ¶
func (*WatchSpec) GetResource ¶
func (x *WatchSpec) GetResource() *resource.WatchRequest
func (*WatchSpec) GetSelector ¶
func (*WatchSpec) ProtoMessage ¶
func (*WatchSpec) ProtoMessage()
func (*WatchSpec) ProtoReflect ¶
func (x *WatchSpec) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.