msgproto

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ACLCommand_name = map[int32]string{
	0: "LIST",
	1: "PERMIT",
	2: "REVOKE",
}
View Source
var ACLCommand_value = map[string]int32{
	"LIST":   0,
	"PERMIT": 1,
	"REVOKE": 2,
}
View Source
var ErrType_name = map[int32]string{
	0: "ErrConnection",
	1: "ErrBadRequest",
	2: "ErrInternal",
	3: "ErrMessage",
	4: "ErrAuth",
	5: "ErrACL",
}
View Source
var ErrType_value = map[string]int32{
	"ErrConnection": 0,
	"ErrBadRequest": 1,
	"ErrInternal":   2,
	"ErrMessage":    3,
	"ErrAuth":       4,
	"ErrACL":        5,
}
View Source
var MsgType_name = map[int32]string{
	0: "MSG",
	1: "ACK",
	2: "ERR",
	3: "AUTH",
	4: "ACL",
}
View Source
var MsgType_value = map[string]int32{
	"MSG":  0,
	"ACK":  1,
	"ERR":  2,
	"AUTH": 3,
	"ACL":  4,
}

Functions

This section is empty.

Types

type ACLCommand

type ACLCommand int32
const (
	ACLCommand_LIST   ACLCommand = 0
	ACLCommand_PERMIT ACLCommand = 1
	ACLCommand_REVOKE ACLCommand = 2
)

func (ACLCommand) EnumDescriptor

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

func (ACLCommand) String

func (x ACLCommand) String() string

type AccessControlList

type AccessControlList 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"`
	Command              ACLCommand `protobuf:"varint,3,opt,name=command,proto3,enum=msgproto.ACLCommand" json:"command,omitempty"`
	Payload              []byte     `protobuf:"bytes,4,opt,name=payload,proto3" json:"payload,omitempty"`
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

func (*AccessControlList) Descriptor

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

func (*AccessControlList) GetCommand

func (m *AccessControlList) GetCommand() ACLCommand

func (*AccessControlList) GetId

func (m *AccessControlList) GetId() string

func (*AccessControlList) GetPayload

func (m *AccessControlList) GetPayload() []byte

func (*AccessControlList) GetType

func (m *AccessControlList) GetType() MsgType

func (*AccessControlList) ProtoMessage

func (*AccessControlList) ProtoMessage()

func (*AccessControlList) Reset

func (m *AccessControlList) Reset()

func (*AccessControlList) String

func (m *AccessControlList) String() string

func (*AccessControlList) XXX_DiscardUnknown

func (m *AccessControlList) XXX_DiscardUnknown()

func (*AccessControlList) XXX_Marshal

func (m *AccessControlList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AccessControlList) XXX_Merge

func (m *AccessControlList) XXX_Merge(src proto.Message)

func (*AccessControlList) XXX_Size

func (m *AccessControlList) XXX_Size() int

func (*AccessControlList) XXX_Unmarshal

func (m *AccessControlList) XXX_Unmarshal(b []byte) error

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               uint64   `protobuf:"varint,5,opt,name=offset,proto3" json:"offset,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Auth) Descriptor

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

func (*Auth) GetDevice

func (m *Auth) GetDevice() string

func (*Auth) GetId

func (m *Auth) GetId() string

func (*Auth) GetOffset

func (m *Auth) GetOffset() uint64

func (*Auth) GetToken

func (m *Auth) GetToken() string

func (*Auth) GetType

func (m *Auth) GetType() MsgType

func (*Auth) ProtoMessage

func (*Auth) ProtoMessage()

func (*Auth) Reset

func (m *Auth) Reset()

func (*Auth) String

func (m *Auth) String() string

func (*Auth) XXX_DiscardUnknown

func (m *Auth) XXX_DiscardUnknown()

func (*Auth) XXX_Marshal

func (m *Auth) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Auth) XXX_Merge

func (m *Auth) XXX_Merge(src proto.Message)

func (*Auth) XXX_Size

func (m *Auth) XXX_Size() int

func (*Auth) XXX_Unmarshal

func (m *Auth) XXX_Unmarshal(b []byte) error

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

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

func (ErrType) String

func (x ErrType) String() string
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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Header) Descriptor

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

func (*Header) GetId

func (m *Header) GetId() string

func (*Header) GetType

func (m *Header) GetType() MsgType

func (*Header) ProtoMessage

func (*Header) ProtoMessage()

func (*Header) Reset

func (m *Header) Reset()

func (*Header) String

func (m *Header) String() string

func (*Header) XXX_DiscardUnknown

func (m *Header) XXX_DiscardUnknown()

func (*Header) XXX_Marshal

func (m *Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Header) XXX_Merge

func (m *Header) XXX_Merge(src proto.Message)

func (*Header) XXX_Size

func (m *Header) XXX_Size() int

func (*Header) XXX_Unmarshal

func (m *Header) XXX_Unmarshal(b []byte) error

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            *timestamp.Timestamp `protobuf:"bytes,6,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	Offset               int64                `protobuf:"varint,7,opt,name=offset,proto3" json:"offset,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

func (*Message) Descriptor

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

func (*Message) GetCiphertext

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

func (*Message) GetId

func (m *Message) GetId() string

func (*Message) GetOffset

func (m *Message) GetOffset() int64

func (*Message) GetRecipient

func (m *Message) GetRecipient() string

func (*Message) GetSender

func (m *Message) GetSender() string

func (*Message) GetTimestamp

func (m *Message) GetTimestamp() *timestamp.Timestamp

func (*Message) GetType

func (m *Message) GetType() MsgType

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) Reset

func (m *Message) Reset()

func (*Message) String

func (m *Message) String() string

func (*Message) XXX_DiscardUnknown

func (m *Message) XXX_DiscardUnknown()

func (*Message) XXX_Marshal

func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Message) XXX_Merge

func (m *Message) XXX_Merge(src proto.Message)

func (*Message) XXX_Size

func (m *Message) XXX_Size() int

func (*Message) XXX_Unmarshal

func (m *Message) XXX_Unmarshal(b []byte) error

type MsgType

type MsgType int32
const (
	MsgType_MSG  MsgType = 0
	MsgType_ACK  MsgType = 1
	MsgType_ERR  MsgType = 2
	MsgType_AUTH MsgType = 3
	MsgType_ACL  MsgType = 4
)

func (MsgType) EnumDescriptor

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

func (MsgType) String

func (x MsgType) String() string

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Notification) Descriptor

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

func (*Notification) GetError

func (m *Notification) GetError() string

func (*Notification) GetErrtype

func (m *Notification) GetErrtype() ErrType

func (*Notification) GetId

func (m *Notification) GetId() string

func (*Notification) GetType

func (m *Notification) GetType() MsgType

func (*Notification) ProtoMessage

func (*Notification) ProtoMessage()

func (*Notification) Reset

func (m *Notification) Reset()

func (*Notification) String

func (m *Notification) String() string

func (*Notification) XXX_DiscardUnknown

func (m *Notification) XXX_DiscardUnknown()

func (*Notification) XXX_Marshal

func (m *Notification) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Notification) XXX_Merge

func (m *Notification) XXX_Merge(src proto.Message)

func (*Notification) XXX_Size

func (m *Notification) XXX_Size() int

func (*Notification) XXX_Unmarshal

func (m *Notification) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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