wire

package
Version: v0.0.0-...-7271f6c Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2015 License: MIT Imports: 7 Imported by: 2

Documentation

Overview

The wire package contains all of the Protocol Buffers source files and compiled go files. Additionally, it contains certain important constants for AirDispatch servers.

Index

Constants

View Source
const (
	MessageDescriptionCode  = "MDE"
	MessageListCode         = "MLI"
	TransferMessageCode     = "XFM"
	TransferMessageListCode = "XFL"
	MailCode                = "MAI"
	DataCode                = "DAT"
	ErrorCode               = "ERR"
)

The constants represent the three-letter codes that denote each type of Airdispatch message. The names of each constant should make the message that they each represent self-apparent.

Variables

View Source
var Prefix []byte = []byte("AD")

Functions

func PrefixBytes

func PrefixBytes(data []byte) []byte

func ReadBytes

func ReadBytes(conn io.Reader) ([]byte, error)

Types

type Container

type Container struct {
	Header           *Header `protobuf:"bytes,1,req,name=header" json:"header,omitempty"`
	Data             []byte  `protobuf:"bytes,2,req,name=data" json:"data,omitempty"`
	Type             *string `protobuf:"bytes,3,req,name=type" json:"type,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

func (*Container) GetData

func (m *Container) GetData() []byte

func (*Container) GetHeader

func (m *Container) GetHeader() *Header

func (*Container) GetType

func (m *Container) GetType() string

func (*Container) ProtoMessage

func (*Container) ProtoMessage()

func (*Container) Reset

func (m *Container) Reset()

func (*Container) String

func (m *Container) String() string

type Data

type Data struct {
	Hash             []byte  `protobuf:"bytes,1,req,name=hash" json:"hash,omitempty"`
	Length           *uint64 `protobuf:"varint,2,req,name=length" json:"length,omitempty"`
	Key              []byte  `protobuf:"bytes,3,req,name=key" json:"key,omitempty"`
	Type             *string `protobuf:"bytes,4,req,name=type" json:"type,omitempty"`
	Name             *string `protobuf:"bytes,5,opt,name=name" json:"name,omitempty"`
	File             *string `protobuf:"bytes,6,opt,name=file" json:"file,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

func (*Data) GetFile

func (m *Data) GetFile() string

func (*Data) GetHash

func (m *Data) GetHash() []byte

func (*Data) GetKey

func (m *Data) GetKey() []byte

func (*Data) GetLength

func (m *Data) GetLength() uint64

func (*Data) GetName

func (m *Data) GetName() string

func (*Data) GetType

func (m *Data) GetType() string

func (*Data) ProtoMessage

func (*Data) ProtoMessage()

func (*Data) Reset

func (m *Data) Reset()

func (*Data) String

func (m *Data) String() string

type EncryptedHeader

type EncryptedHeader struct {
	ToAddr           []byte `protobuf:"bytes,1,req,name=to_addr" json:"to_addr,omitempty"`
	Key              []byte `protobuf:"bytes,2,req,name=key" json:"key,omitempty"`
	EncFun           []byte `protobuf:"bytes,3,opt,name=enc_fun" json:"enc_fun,omitempty"`
	XXX_unrecognized []byte `json:"-"`
}

func (*EncryptedHeader) GetEncFun

func (m *EncryptedHeader) GetEncFun() []byte

func (*EncryptedHeader) GetKey

func (m *EncryptedHeader) GetKey() []byte

func (*EncryptedHeader) GetToAddr

func (m *EncryptedHeader) GetToAddr() []byte

func (*EncryptedHeader) ProtoMessage

func (*EncryptedHeader) ProtoMessage()

func (*EncryptedHeader) Reset

func (m *EncryptedHeader) Reset()

func (*EncryptedHeader) String

func (m *EncryptedHeader) String() string

type EncryptedMessage

type EncryptedMessage struct {
	Data             []byte             `protobuf:"bytes,1,req,name=data" json:"data,omitempty"`
	Header           []*EncryptedHeader `protobuf:"bytes,2,rep,name=header" json:"header,omitempty"`
	XXX_unrecognized []byte             `json:"-"`
}

func (*EncryptedMessage) GetData

func (m *EncryptedMessage) GetData() []byte

func (*EncryptedMessage) GetHeader

func (m *EncryptedMessage) GetHeader() []*EncryptedHeader

func (*EncryptedMessage) ProtoMessage

func (*EncryptedMessage) ProtoMessage()

func (*EncryptedMessage) Reset

func (m *EncryptedMessage) Reset()

func (*EncryptedMessage) String

func (m *EncryptedMessage) String() string

type Error

type Error struct {
	Code             *uint32 `protobuf:"varint,1,req,name=code" json:"code,omitempty"`
	Description      *string `protobuf:"bytes,2,opt,name=description" json:"description,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

func (*Error) GetCode

func (m *Error) GetCode() uint32

func (*Error) GetDescription

func (m *Error) GetDescription() string

func (*Error) ProtoMessage

func (*Error) ProtoMessage()

func (*Error) Reset

func (m *Error) Reset()

func (*Error) String

func (m *Error) String() string
type Header struct {
	FromAddr         []byte   `protobuf:"bytes,1,req,name=from_addr" json:"from_addr,omitempty"`
	ToAddr           [][]byte `protobuf:"bytes,2,rep,name=to_addr" json:"to_addr,omitempty"`
	Timestamp        *uint64  `protobuf:"varint,3,req,name=timestamp" json:"timestamp,omitempty"`
	Alias            *string  `protobuf:"bytes,4,opt,name=alias" json:"alias,omitempty"`
	EncryptionKey    []byte   `protobuf:"bytes,5,opt,name=encryption_key" json:"encryption_key,omitempty"`
	XXX_unrecognized []byte   `json:"-"`
}

func (*Header) GetAlias

func (m *Header) GetAlias() string

func (*Header) GetEncryptionKey

func (m *Header) GetEncryptionKey() []byte

func (*Header) GetFromAddr

func (m *Header) GetFromAddr() []byte

func (*Header) GetTimestamp

func (m *Header) GetTimestamp() uint64

func (*Header) GetToAddr

func (m *Header) GetToAddr() [][]byte

func (*Header) ProtoMessage

func (*Header) ProtoMessage()

func (*Header) Reset

func (m *Header) Reset()

func (*Header) String

func (m *Header) String() string

type Mail

type Mail struct {
	Components       []*Mail_Component `protobuf:"bytes,1,rep,name=components" json:"components,omitempty"`
	Name             *string           `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
	XXX_unrecognized []byte            `json:"-"`
}

func (*Mail) GetComponents

func (m *Mail) GetComponents() []*Mail_Component

func (*Mail) GetName

func (m *Mail) GetName() string

func (*Mail) ProtoMessage

func (*Mail) ProtoMessage()

func (*Mail) Reset

func (m *Mail) Reset()

func (*Mail) String

func (m *Mail) String() string

type Mail_Component

type Mail_Component struct {
	Type             *string `protobuf:"bytes,1,req,name=type" json:"type,omitempty"`
	Data             []byte  `protobuf:"bytes,2,req,name=data" json:"data,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

func (*Mail_Component) GetData

func (m *Mail_Component) GetData() []byte

func (*Mail_Component) GetType

func (m *Mail_Component) GetType() string

func (*Mail_Component) ProtoMessage

func (*Mail_Component) ProtoMessage()

func (*Mail_Component) Reset

func (m *Mail_Component) Reset()

func (*Mail_Component) String

func (m *Mail_Component) String() string

type MessageDescription

type MessageDescription struct {
	Location         *string `protobuf:"bytes,1,req,name=location" json:"location,omitempty"`
	Name             *string `protobuf:"bytes,2,req,name=name" json:"name,omitempty"`
	Nonce            *uint64 `protobuf:"varint,3,opt,name=nonce" json:"nonce,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

func (*MessageDescription) GetLocation

func (m *MessageDescription) GetLocation() string

func (*MessageDescription) GetName

func (m *MessageDescription) GetName() string

func (*MessageDescription) GetNonce

func (m *MessageDescription) GetNonce() uint64

func (*MessageDescription) ProtoMessage

func (*MessageDescription) ProtoMessage()

func (*MessageDescription) Reset

func (m *MessageDescription) Reset()

func (*MessageDescription) String

func (m *MessageDescription) String() string

type MessageList

type MessageList struct {
	Length           *uint64 `protobuf:"varint,1,req,name=length" json:"length,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

func (*MessageList) GetLength

func (m *MessageList) GetLength() uint64

func (*MessageList) ProtoMessage

func (*MessageList) ProtoMessage()

func (*MessageList) Reset

func (m *MessageList) Reset()

func (*MessageList) String

func (m *MessageList) String() string

type Signature

type Signature struct {
	R                []byte `protobuf:"bytes,1,req,name=r" json:"r,omitempty"`
	S                []byte `protobuf:"bytes,2,req,name=s" json:"s,omitempty"`
	SigningKey       []byte `protobuf:"bytes,3,opt,name=signing_key" json:"signing_key,omitempty"`
	XXX_unrecognized []byte `json:"-"`
}

func (*Signature) GetR

func (m *Signature) GetR() []byte

func (*Signature) GetS

func (m *Signature) GetS() []byte

func (*Signature) GetSigningKey

func (m *Signature) GetSigningKey() []byte

func (*Signature) ProtoMessage

func (*Signature) ProtoMessage()

func (*Signature) Reset

func (m *Signature) Reset()

func (*Signature) String

func (m *Signature) String() string

type SignedMessage

type SignedMessage struct {
	Data             []byte       `protobuf:"bytes,1,req,name=data" json:"data,omitempty"`
	Signature        []*Signature `protobuf:"bytes,2,rep,name=signature" json:"signature,omitempty"`
	SigningFunc      []byte       `protobuf:"bytes,3,opt,name=signing_func" json:"signing_func,omitempty"`
	XXX_unrecognized []byte       `json:"-"`
}

func (*SignedMessage) GetData

func (m *SignedMessage) GetData() []byte

func (*SignedMessage) GetSignature

func (m *SignedMessage) GetSignature() []*Signature

func (*SignedMessage) GetSigningFunc

func (m *SignedMessage) GetSigningFunc() []byte

func (*SignedMessage) ProtoMessage

func (*SignedMessage) ProtoMessage()

func (*SignedMessage) Reset

func (m *SignedMessage) Reset()

func (*SignedMessage) String

func (m *SignedMessage) String() string

type TransferMessage

type TransferMessage struct {
	Author           *string `protobuf:"bytes,1,req,name=author" json:"author,omitempty"`
	Name             *string `protobuf:"bytes,2,req,name=name" json:"name,omitempty"`
	Data             *bool   `protobuf:"varint,3,opt,name=data" json:"data,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

func (*TransferMessage) GetAuthor

func (m *TransferMessage) GetAuthor() string

func (*TransferMessage) GetData

func (m *TransferMessage) GetData() bool

func (*TransferMessage) GetName

func (m *TransferMessage) GetName() string

func (*TransferMessage) ProtoMessage

func (*TransferMessage) ProtoMessage()

func (*TransferMessage) Reset

func (m *TransferMessage) Reset()

func (*TransferMessage) String

func (m *TransferMessage) String() string

type TransferMessageList

type TransferMessageList struct {
	Author           *string `protobuf:"bytes,1,req,name=author" json:"author,omitempty"`
	LastUpdated      *uint64 `protobuf:"varint,2,req,name=last_updated" json:"last_updated,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

func (*TransferMessageList) GetAuthor

func (m *TransferMessageList) GetAuthor() string

func (*TransferMessageList) GetLastUpdated

func (m *TransferMessageList) GetLastUpdated() uint64

func (*TransferMessageList) ProtoMessage

func (*TransferMessageList) ProtoMessage()

func (*TransferMessageList) Reset

func (m *TransferMessageList) Reset()

func (*TransferMessageList) String

func (m *TransferMessageList) String() string

Jump to

Keyboard shortcuts

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