msgprotov1

package
v0.0.0-...-2384e91 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrType_name = map[int32]string{
		0: "ErrConnection",
		1: "ErrBadRequest",
		2: "ErrInternal",
		3: "ErrMessage",
		4: "ErrAuth",
		5: "ErrACL",
	}
	ErrType_value = map[string]int32{
		"ErrConnection": 0,
		"ErrBadRequest": 1,
		"ErrInternal":   2,
		"ErrMessage":    3,
		"ErrAuth":       4,
		"ErrACL":        5,
	}
)

Enum value maps for ErrType.

View Source
var (
	MsgType_name = map[int32]string{
		0: "MSG",
		1: "ACK",
		2: "ERR",
		3: "AUTH",
		5: "WTC",
		6: "STS",
	}
	MsgType_value = map[string]int32{
		"MSG":  0,
		"ACK":  1,
		"ERR":  2,
		"AUTH": 3,
		"WTC":  5,
		"STS":  6,
	}
)

Enum value maps for MsgType.

View Source
var File_errtype_proto protoreflect.FileDescriptor
View Source
var File_header_proto protoreflect.FileDescriptor
View Source
var File_message_proto protoreflect.FileDescriptor
View Source
var File_msgtype_proto protoreflect.FileDescriptor
View Source
var File_notification_proto protoreflect.FileDescriptor
View Source
var File_status_proto protoreflect.FileDescriptor
View Source
var File_watch_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Auth

type Auth struct {
	Type   MsgType `protobuf:"varint,1,opt,name=type,proto3,enum=msgproto.MsgType" json:"type,omitempty"`
	Id     string  `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	Token  string  `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"`
	Device string  `protobuf:"bytes,4,opt,name=device,proto3" json:"device,omitempty"`
	Offset int64   `protobuf:"varint,5,opt,name=offset,proto3" json:"offset,omitempty"`
	// contains filtered or unexported fields
}

func (*Auth) Descriptor deprecated

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

Deprecated: Use Auth.ProtoReflect.Descriptor instead.

func (*Auth) GetDevice

func (x *Auth) GetDevice() string

func (*Auth) GetId

func (x *Auth) GetId() string

func (*Auth) GetOffset

func (x *Auth) GetOffset() int64

func (*Auth) GetToken

func (x *Auth) GetToken() string

func (*Auth) GetType

func (x *Auth) GetType() MsgType

func (*Auth) ProtoMessage

func (*Auth) ProtoMessage()

func (*Auth) ProtoReflect

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

func (*Auth) Reset

func (x *Auth) Reset()

func (*Auth) String

func (x *Auth) String() string

type ErrType

type ErrType int32
const (
	ErrType_ErrConnection ErrType = 0
	ErrType_ErrBadRequest ErrType = 1
	ErrType_ErrInternal   ErrType = 2
	ErrType_ErrMessage    ErrType = 3
	ErrType_ErrAuth       ErrType = 4
	ErrType_ErrACL        ErrType = 5
)

func (ErrType) Descriptor

func (ErrType) Descriptor() protoreflect.EnumDescriptor

func (ErrType) Enum

func (x ErrType) Enum() *ErrType

func (ErrType) EnumDescriptor deprecated

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

Deprecated: Use ErrType.Descriptor instead.

func (ErrType) Number

func (x ErrType) Number() protoreflect.EnumNumber

func (ErrType) String

func (x ErrType) String() string

func (ErrType) Type

func (ErrType) Type() protoreflect.EnumType
type Header struct {
	Type MsgType `protobuf:"varint,1,opt,name=type,proto3,enum=msgproto.MsgType" json:"type,omitempty"`
	Id   string  `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*Header) Descriptor deprecated

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

Deprecated: Use Header.ProtoReflect.Descriptor instead.

func (*Header) GetId

func (x *Header) GetId() string

func (*Header) GetType

func (x *Header) GetType() MsgType

func (*Header) ProtoMessage

func (*Header) ProtoMessage()

func (*Header) ProtoReflect

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

func (*Header) Reset

func (x *Header) Reset()

func (*Header) String

func (x *Header) String() string

type Message

type Message struct {
	Type                MsgType                `protobuf:"varint,1,opt,name=type,proto3,enum=msgproto.MsgType" json:"type,omitempty"`
	Id                  string                 `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	Sender              string                 `protobuf:"bytes,3,opt,name=sender,proto3" json:"sender,omitempty"`
	Recipient           string                 `protobuf:"bytes,4,opt,name=recipient,proto3" json:"recipient,omitempty"`
	Ciphertext          []byte                 `protobuf:"bytes,5,opt,name=ciphertext,proto3" json:"ciphertext,omitempty"`
	Timestamp           *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	Offset              int64                  `protobuf:"varint,7,opt,name=offset,proto3" json:"offset,omitempty"`
	Priority            uint32                 `protobuf:"varint,8,opt,name=priority,proto3" json:"priority,omitempty"`
	MessageType         []byte                 `protobuf:"bytes,9,opt,name=message_type,json=messageType,proto3" json:"message_type,omitempty"`
	CollapseKey         []byte                 `protobuf:"bytes,10,opt,name=collapse_key,json=collapseKey,proto3" json:"collapse_key,omitempty"`
	NotificationPayload []byte                 `protobuf:"bytes,11,opt,name=notification_payload,json=notificationPayload,proto3" json:"notification_payload,omitempty"`
	Authorization       []byte                 `protobuf:"bytes,12,opt,name=authorization,proto3" json:"authorization,omitempty"`
	// contains filtered or unexported fields
}

func (*Message) Descriptor deprecated

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

Deprecated: Use Message.ProtoReflect.Descriptor instead.

func (*Message) GetAuthorization

func (x *Message) GetAuthorization() []byte

func (*Message) GetCiphertext

func (x *Message) GetCiphertext() []byte

func (*Message) GetCollapseKey

func (x *Message) GetCollapseKey() []byte

func (*Message) GetId

func (x *Message) GetId() string

func (*Message) GetMessageType

func (x *Message) GetMessageType() []byte

func (*Message) GetNotificationPayload

func (x *Message) GetNotificationPayload() []byte

func (*Message) GetOffset

func (x *Message) GetOffset() int64

func (*Message) GetPriority

func (x *Message) GetPriority() uint32

func (*Message) GetRecipient

func (x *Message) GetRecipient() string

func (*Message) GetSender

func (x *Message) GetSender() string

func (*Message) GetTimestamp

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

func (*Message) GetType

func (x *Message) GetType() MsgType

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) ProtoReflect

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

func (*Message) Reset

func (x *Message) Reset()

func (*Message) String

func (x *Message) String() string

type MsgType

type MsgType int32
const (
	MsgType_MSG  MsgType = 0
	MsgType_ACK  MsgType = 1
	MsgType_ERR  MsgType = 2
	MsgType_AUTH MsgType = 3
	MsgType_WTC  MsgType = 5
	MsgType_STS  MsgType = 6
)

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 Notification

type Notification struct {
	Type    MsgType `protobuf:"varint,1,opt,name=type,proto3,enum=msgproto.MsgType" json:"type,omitempty"`
	Id      string  `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	Error   string  `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"`
	Errtype ErrType `protobuf:"varint,4,opt,name=errtype,proto3,enum=msgproto.ErrType" json:"errtype,omitempty"`
	// contains filtered or unexported fields
}

func (*Notification) Descriptor deprecated

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

Deprecated: Use Notification.ProtoReflect.Descriptor instead.

func (*Notification) GetError

func (x *Notification) GetError() string

func (*Notification) GetErrtype

func (x *Notification) GetErrtype() ErrType

func (*Notification) GetId

func (x *Notification) GetId() string

func (*Notification) GetType

func (x *Notification) GetType() MsgType

func (*Notification) ProtoMessage

func (*Notification) ProtoMessage()

func (*Notification) ProtoReflect

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

func (*Notification) Reset

func (x *Notification) Reset()

func (*Notification) String

func (x *Notification) String() string

type Status

type Status struct {
	Type      MsgType                `protobuf:"varint,1,opt,name=type,proto3,enum=msgproto.MsgType" json:"type,omitempty"`
	Id        string                 `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	Recipient string                 `protobuf:"bytes,3,opt,name=recipient,proto3" json:"recipient,omitempty"`
	Online    bool                   `protobuf:"varint,4,opt,name=online,proto3" json:"online,omitempty"`
	LastSeen  *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=last_seen,json=lastSeen,proto3" json:"last_seen,omitempty"`
	// contains filtered or unexported fields
}

func (*Status) Descriptor deprecated

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

Deprecated: Use Status.ProtoReflect.Descriptor instead.

func (*Status) GetId

func (x *Status) GetId() string

func (*Status) GetLastSeen

func (x *Status) GetLastSeen() *timestamppb.Timestamp

func (*Status) GetOnline

func (x *Status) GetOnline() bool

func (*Status) GetRecipient

func (x *Status) GetRecipient() string

func (*Status) GetType

func (x *Status) GetType() MsgType

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

type Watch

type Watch struct {
	Type      MsgType `protobuf:"varint,1,opt,name=type,proto3,enum=msgproto.MsgType" json:"type,omitempty"`
	Id        string  `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	Recipient string  `protobuf:"bytes,3,opt,name=recipient,proto3" json:"recipient,omitempty"`
	Watch     bool    `protobuf:"varint,4,opt,name=watch,proto3" json:"watch,omitempty"`
	// contains filtered or unexported fields
}

func (*Watch) Descriptor deprecated

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

Deprecated: Use Watch.ProtoReflect.Descriptor instead.

func (*Watch) GetId

func (x *Watch) GetId() string

func (*Watch) GetRecipient

func (x *Watch) GetRecipient() string

func (*Watch) GetType

func (x *Watch) GetType() MsgType

func (*Watch) GetWatch

func (x *Watch) GetWatch() bool

func (*Watch) ProtoMessage

func (*Watch) ProtoMessage()

func (*Watch) ProtoReflect

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

func (*Watch) Reset

func (x *Watch) Reset()

func (*Watch) String

func (x *Watch) String() string

Jump to

Keyboard shortcuts

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