protos

package
v0.0.0-...-a85fb9e Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2015 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package protos is a generated protocol buffer package.

It is generated from these files:

pond.proto

It has these top-level messages:

Request
Reply
NewAccount
AccountDetails
AccountCreated
Delivery
Fetch
Fetched
ServerAnnounce
Upload
UploadReply
Download
DownloadReply
HMACSetup
HMACStrike
HMACPair
KeyExchange
SignedKeyExchange
Message

Index

Constants

View Source
const MaxSerializedMessage = TransportSize - (secretbox.Overhead + 4 + 4 + 32 + 24) - secretbox.Overhead - MessageOverhead

MaxSerializedMessage is the maximum size of the serialized Message protobuf. The message will end up looking like this:

[length - 4 bytes       ]  | NaCl box  | Message that server sees.
[nonce - 24 bytes               ]

  [secretbox.Overhead - 16 bytes]
  [message count - 4 bytes      ]
  [prev message count - 4 bytes ]
  [ratchet public - 32 bytes    ]
  [inner nonce - 32 bytes       ]

  [secretbox.Overhead - 16 bytes]
  [serialized message           ]
View Source
const MessageOverhead = 512

MessageOverhead is the number of bytes reserved for wrapping a Message up in protobufs. That includes the overhead of the protobufs themselves, as well as the metadata in the protobuf and the group signature.

View Source
const TransportSize = 16384 - 2 - secretbox.Overhead

TransportSize is the number of bytes that all payloads are padded to before sending on the network.

Variables

View Source
var Message_Encoding_name = map[int32]string{
	0: "RAW",
	1: "GZIP",
}
View Source
var Message_Encoding_value = map[string]int32{
	"RAW":  0,
	"GZIP": 1,
}
View Source
var Reply_Status_name = map[int32]string{
	0:  "OK",
	1:  "PARSE_ERROR",
	2:  "NO_REQUEST",
	3:  "INTERNAL_ERROR",
	10: "IDENTITY_ALREADY_KNOWN",
	11: "OVERLOAD",
	12: "NO_SUCH_ADDRESS",
	13: "DELIVERY_SIGNATURE_INVALID",
	14: "MAILBOX_FULL",
	15: "NO_ACCOUNT",
	16: "OVER_QUOTA",
	17: "FILE_LARGER_THAN_SIZE",
	18: "FILE_COMPLETE",
	19: "NO_SUCH_FILE",
	20: "RESUME_PAST_END_OF_FILE",
	21: "CANNOT_PARSE_REVOCATION",
	22: "REGISTRATION_DISABLED",
	23: "HMAC_KEY_ALREADY_SET",
	24: "HMAC_NOT_SETUP",
	25: "HMAC_INCORRECT",
	26: "HMAC_USED",
	27: "HMAC_REVOKED",
}
View Source
var Reply_Status_value = map[string]int32{
	"OK":                         0,
	"PARSE_ERROR":                1,
	"NO_REQUEST":                 2,
	"INTERNAL_ERROR":             3,
	"IDENTITY_ALREADY_KNOWN":     10,
	"OVERLOAD":                   11,
	"NO_SUCH_ADDRESS":            12,
	"DELIVERY_SIGNATURE_INVALID": 13,
	"MAILBOX_FULL":               14,
	"NO_ACCOUNT":                 15,
	"OVER_QUOTA":                 16,
	"FILE_LARGER_THAN_SIZE":      17,
	"FILE_COMPLETE":              18,
	"NO_SUCH_FILE":               19,
	"RESUME_PAST_END_OF_FILE":    20,
	"CANNOT_PARSE_REVOCATION":    21,
	"REGISTRATION_DISABLED":      22,
	"HMAC_KEY_ALREADY_SET":       23,
	"HMAC_NOT_SETUP":             24,
	"HMAC_INCORRECT":             25,
	"HMAC_USED":                  26,
	"HMAC_REVOKED":               27,
}

Functions

This section is empty.

Types

type AccountCreated

type AccountCreated struct {
	Details          *AccountDetails `protobuf:"bytes,1,req,name=details" json:"details,omitempty"`
	XXX_unrecognized []byte          `json:"-"`
}

AccountCreated is the reply to a NewAccount request.

func (*AccountCreated) GetDetails

func (m *AccountCreated) GetDetails() *AccountDetails

func (*AccountCreated) ProtoMessage

func (*AccountCreated) ProtoMessage()

func (*AccountCreated) Reset

func (m *AccountCreated) Reset()

func (*AccountCreated) String

func (m *AccountCreated) String() string

type AccountDetails

type AccountDetails struct {
	// queue is the number of messages waiting at the server.
	Queue *uint32 `protobuf:"varint,1,req,name=queue" json:"queue,omitempty"`
	// max_queue is the maximum number of messages that the server will
	// queue for this account.
	MaxQueue         *uint32 `protobuf:"varint,2,req,name=max_queue" json:"max_queue,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

AccountDetails contains the state of an account.

func (*AccountDetails) GetMaxQueue

func (m *AccountDetails) GetMaxQueue() uint32

func (*AccountDetails) GetQueue

func (m *AccountDetails) GetQueue() uint32

func (*AccountDetails) ProtoMessage

func (*AccountDetails) ProtoMessage()

func (*AccountDetails) Reset

func (m *AccountDetails) Reset()

func (*AccountDetails) String

func (m *AccountDetails) String() string

type Delivery

type Delivery struct {
	// The 32-byte, public identity of the target account.
	To []byte `protobuf:"bytes,1,req,name=to" json:"to,omitempty"`
	// A group signature of |message| proving authorisation to deliver
	// messages to the account.
	// optional bytes group_signature = 2;
	// The current generation number in order for the server to send
	// revocation updates.
	// optional fixed32 generation = 3;
	// The padded message to deliver.
	Message []byte `protobuf:"bytes,2,req,name=message" json:"message,omitempty"`
	// one_time_public_key contains an Ed25519 public key that was issued
	// by the recipient in order to authenticate delivery attempts.
	OneTimePublicKey []byte `protobuf:"bytes,3,opt,name=one_time_public_key" json:"one_time_public_key,omitempty"`
	// hmac_of_public_key contains a 63-bit HMAC of public key using the
	// HMAC key known to server and recipient.
	HmacOfPublicKey *uint64 `protobuf:"fixed64,4,opt,name=hmac_of_public_key" json:"hmac_of_public_key,omitempty"`
	// one_time_signature contains a signature, by public_key, of message.
	OneTimeSignature []byte `protobuf:"bytes,5,opt,name=one_time_signature" json:"one_time_signature,omitempty"`
	XXX_unrecognized []byte `json:"-"`
}

Delivery is a request from a client to deliver a message to an account on this server. There's no explicit reply protobuf for this request. Success is indicated via |status|.

func (*Delivery) GetHmacOfPublicKey

func (m *Delivery) GetHmacOfPublicKey() uint64

func (*Delivery) GetMessage

func (m *Delivery) GetMessage() []byte

func (*Delivery) GetOneTimePublicKey

func (m *Delivery) GetOneTimePublicKey() []byte

func (*Delivery) GetOneTimeSignature

func (m *Delivery) GetOneTimeSignature() []byte

func (*Delivery) GetTo

func (m *Delivery) GetTo() []byte

func (*Delivery) ProtoMessage

func (*Delivery) ProtoMessage()

func (*Delivery) Reset

func (m *Delivery) Reset()

func (*Delivery) String

func (m *Delivery) String() string

type Download

type Download struct {
	From             []byte  `protobuf:"bytes,1,req,name=from" json:"from,omitempty"`
	Id               *uint64 `protobuf:"fixed64,2,req,name=id" json:"id,omitempty"`
	Resume           *int64  `protobuf:"varint,3,opt,name=resume" json:"resume,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

func (*Download) GetFrom

func (m *Download) GetFrom() []byte

func (*Download) GetId

func (m *Download) GetId() uint64

func (*Download) GetResume

func (m *Download) GetResume() int64

func (*Download) ProtoMessage

func (*Download) ProtoMessage()

func (*Download) Reset

func (m *Download) Reset()

func (*Download) String

func (m *Download) String() string

type DownloadReply

type DownloadReply struct {
	Size             *int64 `protobuf:"varint,1,req,name=size" json:"size,omitempty"`
	XXX_unrecognized []byte `json:"-"`
}

func (*DownloadReply) GetSize

func (m *DownloadReply) GetSize() int64

func (*DownloadReply) ProtoMessage

func (*DownloadReply) ProtoMessage()

func (*DownloadReply) Reset

func (m *DownloadReply) Reset()

func (*DownloadReply) String

func (m *DownloadReply) String() string

type Fetch

type Fetch struct {
	XXX_unrecognized []byte `json:"-"`
}

Fetch is a request to fetch a message. It may result in either a Fetched, or ServerAnnounce message. (Or none at all if no messages are pending.)

func (*Fetch) ProtoMessage

func (*Fetch) ProtoMessage()

func (*Fetch) Reset

func (m *Fetch) Reset()

func (*Fetch) String

func (m *Fetch) String() string

type Fetched

type Fetched struct {
	// group_signature is the group signature presented by the sender.
	// required bytes group_signature = 1;
	// generation is the generation number used for delivery.
	// optional fixed32 generation = 1;
	// one_time_public_key contains an Ed25519 public key that was issued
	// by the recipient in order to authenticate delivery attempts.
	OneTimePublicKey []byte `protobuf:"bytes,1,opt,name=one_time_public_key" json:"one_time_public_key,omitempty"`
	// hmac_of_public_key contains a 63-bit HMAC of public key using the
	// HMAC key known to server and recipient.
	HmacOfPublicKey *uint64 `protobuf:"fixed64,2,opt,name=hmac_of_public_key" json:"hmac_of_public_key,omitempty"`
	// one_time_signature contains a signature, by public_key, of message.
	OneTimeSignature []byte          `protobuf:"bytes,3,opt,name=one_time_signature" json:"one_time_signature,omitempty"`
	Message          []byte          `protobuf:"bytes,4,req,name=message" json:"message,omitempty"`
	Details          *AccountDetails `protobuf:"bytes,5,req,name=details" json:"details,omitempty"`
	XXX_unrecognized []byte          `json:"-"`
}

Fetched is the reply to a Fetch request if the server has a message for delivery.

func (*Fetched) GetDetails

func (m *Fetched) GetDetails() *AccountDetails

func (*Fetched) GetHmacOfPublicKey

func (m *Fetched) GetHmacOfPublicKey() uint64

func (*Fetched) GetMessage

func (m *Fetched) GetMessage() []byte

func (*Fetched) GetOneTimePublicKey

func (m *Fetched) GetOneTimePublicKey() []byte

func (*Fetched) GetOneTimeSignature

func (m *Fetched) GetOneTimeSignature() []byte

func (*Fetched) ProtoMessage

func (*Fetched) ProtoMessage()

func (*Fetched) Reset

func (m *Fetched) Reset()

func (*Fetched) String

func (m *Fetched) String() string

type HMACPair

type HMACPair struct {
	// Ed25519 signing key
	PrivateKey []byte `protobuf:"bytes,1,req,name=private_key" json:"private_key,omitempty"`
	// verify key for ed25519 signing key
	PulbicKey        []byte  `protobuf:"bytes,2,req,name=pulbic_key" json:"pulbic_key,omitempty"`
	HmacOfPublicKey  *uint64 `protobuf:"fixed64,3,req,name=hmac_of_public_key" json:"hmac_of_public_key,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

HMACPair contains a pair of Hmac values to be shared between clients

func (*HMACPair) GetHmacOfPublicKey

func (m *HMACPair) GetHmacOfPublicKey() uint64

func (*HMACPair) GetPrivateKey

func (m *HMACPair) GetPrivateKey() []byte

func (*HMACPair) GetPulbicKey

func (m *HMACPair) GetPulbicKey() []byte

func (*HMACPair) ProtoMessage

func (*HMACPair) ProtoMessage()

func (*HMACPair) Reset

func (m *HMACPair) Reset()

func (*HMACPair) String

func (m *HMACPair) String() string

type HMACSetup

type HMACSetup struct {
	HmacKey          []byte `protobuf:"bytes,1,req,name=hmac_key" json:"hmac_key,omitempty"`
	XXX_unrecognized []byte `json:"-"`
}

HMACSetup can be sent by a client to establish an HMAC key if it didn't do so at account creation time.

func (*HMACSetup) GetHmacKey

func (m *HMACSetup) GetHmacKey() []byte

func (*HMACSetup) ProtoMessage

func (*HMACSetup) ProtoMessage()

func (*HMACSetup) Reset

func (m *HMACSetup) Reset()

func (*HMACSetup) String

func (m *HMACSetup) String() string

type HMACStrike

type HMACStrike struct {
	// hmacs contains a number of 63-bit HMACs. The MSB is used to signal
	// whether the HMAC should be considered used (0) or revoked (1).
	Hmacs            []uint64 `protobuf:"fixed64,1,rep,packed,name=hmacs" json:"hmacs,omitempty"`
	XXX_unrecognized []byte   `json:"-"`
}

HMACStrike is used by a client to record a number of HMAC values as used.

func (*HMACStrike) GetHmacs

func (m *HMACStrike) GetHmacs() []uint64

func (*HMACStrike) ProtoMessage

func (*HMACStrike) ProtoMessage()

func (*HMACStrike) Reset

func (m *HMACStrike) Reset()

func (*HMACStrike) String

func (m *HMACStrike) String() string

type KeyExchange

type KeyExchange struct {
	// Ed25519 public key.
	PublicKey []byte `protobuf:"bytes,1,req,name=public_key" json:"public_key,omitempty"`
	// Curve25519 public key. (Used to tell the server which account to
	// deliver a message to.)
	// Note: in the most up-to-date revision of the Pond ratchet, this
	// should be equal to |public_key|, modulo isomorphism.
	IdentityPublic []byte `protobuf:"bytes,2,req,name=identity_public" json:"identity_public,omitempty"`
	// The URL of this user's home server.
	Server *string `protobuf:"bytes,3,req,name=server" json:"server,omitempty"`
	// A Curve25519, initial Diffie-Hellman value.
	Dh []byte `protobuf:"bytes,4,req,name=dh" json:"dh,omitempty"`
	// dh1 contains the second, curve25519, public key if the new-form
	// ratchet is being used.
	Dh1 []byte `protobuf:"bytes,5,req,name=dh1" json:"dh1,omitempty"`
	// A serialised bbssig.Group.
	// required bytes group = 5;
	// A bbssig.PrivateKey to authorise message delivery.
	// required bytes group_key = 6;
	// hmac_of_public_key contains a 63-bit HMAC of public key using the
	// HMAC key known to server and recipient.
	HmacPairs        []*HMACPair `protobuf:"bytes,6,rep,name=hmac_pairs" json:"hmac_pairs,omitempty"`
	XXX_unrecognized []byte      `json:"-"`
}

KeyExchange is a message sent between clients to establish a relation. It's always found inside a SignedKeyExchange.

func (*KeyExchange) GetDh

func (m *KeyExchange) GetDh() []byte

func (*KeyExchange) GetDh1

func (m *KeyExchange) GetDh1() []byte

func (*KeyExchange) GetHmacPairs

func (m *KeyExchange) GetHmacPairs() []*HMACPair

func (*KeyExchange) GetIdentityPublic

func (m *KeyExchange) GetIdentityPublic() []byte

func (*KeyExchange) GetPublicKey

func (m *KeyExchange) GetPublicKey() []byte

func (*KeyExchange) GetServer

func (m *KeyExchange) GetServer() string

func (*KeyExchange) ProtoMessage

func (*KeyExchange) ProtoMessage()

func (*KeyExchange) Reset

func (m *KeyExchange) Reset()

func (*KeyExchange) String

func (m *KeyExchange) String() string

type Message

type Message struct {
	// id is generated by the sender in order for the receiver to associate
	// replies.
	Id *uint64 `protobuf:"fixed64,1,req,name=id" json:"id,omitempty"`
	// time is the creation time of the message in epoch nanoseconds.
	Time *int64 `protobuf:"varint,2,req,name=time" json:"time,omitempty"`
	// body, after decoding, is a utf8 message.
	Body         []byte            `protobuf:"bytes,3,req,name=body" json:"body,omitempty"`
	BodyEncoding *Message_Encoding `protobuf:"varint,4,opt,name=body_encoding,enum=protos.Message_Encoding" json:"body_encoding,omitempty"`
	// my_next_dh contains a Curve25519 public value for future messages.
	MyNextDh []byte `protobuf:"bytes,5,opt,name=my_next_dh" json:"my_next_dh,omitempty"`
	// in_reply_to, if set, contains the |id| value of a previous message
	// sent by the recipient.
	InReplyTo *uint64 `protobuf:"varint,6,opt,name=in_reply_to" json:"in_reply_to,omitempty"`
	// also_ack contains message ids for other messages that are also
	// acknowledged by this message.
	AlsoAck       []uint64              `protobuf:"varint,10,rep,name=also_ack" json:"also_ack,omitempty"`
	NewHmacPairs  []*HMACPair           `protobuf:"bytes,11,rep,name=new_hmac_pairs" json:"new_hmac_pairs,omitempty"`
	Files         []*Message_Attachment `protobuf:"bytes,7,rep,name=files" json:"files,omitempty"`
	DetachedFiles []*Message_Detachment `protobuf:"bytes,8,rep,name=detached_files" json:"detached_files,omitempty"`
	// supported_version allows a client to advertise the maximum supported
	// version that it speaks.
	SupportedVersion *int32 `protobuf:"varint,9,opt,name=supported_version" json:"supported_version,omitempty"`
	XXX_unrecognized []byte `json:"-"`
}

Message is typically contained within a NaCl box that's passed between clients using Delivery and Fetch.

func (*Message) GetAlsoAck

func (m *Message) GetAlsoAck() []uint64

func (*Message) GetBody

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

func (*Message) GetBodyEncoding

func (m *Message) GetBodyEncoding() Message_Encoding

func (*Message) GetDetachedFiles

func (m *Message) GetDetachedFiles() []*Message_Detachment

func (*Message) GetFiles

func (m *Message) GetFiles() []*Message_Attachment

func (*Message) GetId

func (m *Message) GetId() uint64

func (*Message) GetInReplyTo

func (m *Message) GetInReplyTo() uint64

func (*Message) GetMyNextDh

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

func (*Message) GetNewHmacPairs

func (m *Message) GetNewHmacPairs() []*HMACPair

func (*Message) GetSupportedVersion

func (m *Message) GetSupportedVersion() int32

func (*Message) GetTime

func (m *Message) GetTime() int64

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) Reset

func (m *Message) Reset()

func (*Message) String

func (m *Message) String() string

type Message_Attachment

type Message_Attachment struct {
	Filename         *string `protobuf:"bytes,1,req,name=filename" json:"filename,omitempty"`
	Contents         []byte  `protobuf:"bytes,2,req,name=contents" json:"contents,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

func (*Message_Attachment) GetContents

func (m *Message_Attachment) GetContents() []byte

func (*Message_Attachment) GetFilename

func (m *Message_Attachment) GetFilename() string

func (*Message_Attachment) ProtoMessage

func (*Message_Attachment) ProtoMessage()

func (*Message_Attachment) Reset

func (m *Message_Attachment) Reset()

func (*Message_Attachment) String

func (m *Message_Attachment) String() string

type Message_Detachment

type Message_Detachment struct {
	Filename         *string `protobuf:"bytes,1,req,name=filename" json:"filename,omitempty"`
	Size             *uint64 `protobuf:"varint,2,req,name=size" json:"size,omitempty"`
	PaddedSize       *uint64 `protobuf:"varint,3,req,name=padded_size" json:"padded_size,omitempty"`
	ChunkSize        *uint32 `protobuf:"varint,4,req,name=chunk_size" json:"chunk_size,omitempty"`
	Key              []byte  `protobuf:"bytes,5,req,name=key" json:"key,omitempty"`
	Url              *string `protobuf:"bytes,6,opt,name=url" json:"url,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

func (*Message_Detachment) GetChunkSize

func (m *Message_Detachment) GetChunkSize() uint32

func (*Message_Detachment) GetFilename

func (m *Message_Detachment) GetFilename() string

func (*Message_Detachment) GetKey

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

func (*Message_Detachment) GetPaddedSize

func (m *Message_Detachment) GetPaddedSize() uint64

func (*Message_Detachment) GetSize

func (m *Message_Detachment) GetSize() uint64

func (*Message_Detachment) GetUrl

func (m *Message_Detachment) GetUrl() string

func (*Message_Detachment) ProtoMessage

func (*Message_Detachment) ProtoMessage()

func (*Message_Detachment) Reset

func (m *Message_Detachment) Reset()

func (*Message_Detachment) String

func (m *Message_Detachment) String() string

type Message_Encoding

type Message_Encoding int32
const (
	Message_RAW  Message_Encoding = 0
	Message_GZIP Message_Encoding = 1
)

func (Message_Encoding) Enum

func (Message_Encoding) String

func (x Message_Encoding) String() string

func (*Message_Encoding) UnmarshalJSON

func (x *Message_Encoding) UnmarshalJSON(data []byte) error

type NewAccount

type NewAccount struct {
	// generation contains the revocation generation for the account. The
	// client should pick it at random in order to hide the number of
	// revocations that the client has performed.
	// required fixed32 generation = 1;
	// group contains the serialised bbssig.Group for authenticating
	// deliveries to this account.
	// required bytes group = 2;
	// hmac_key contains an HMAC key used to authenticate delivery
	// attempts.
	HmacKey          []byte `protobuf:"bytes,1,opt,name=hmac_key" json:"hmac_key,omitempty"`
	XXX_unrecognized []byte `json:"-"`
}

NewAccount is a request that the client may send to the server to request a new account. The public identity of the connecting client will be the `name' of the new account.

func (*NewAccount) GetHmacKey

func (m *NewAccount) GetHmacKey() []byte

func (*NewAccount) ProtoMessage

func (*NewAccount) ProtoMessage()

func (*NewAccount) Reset

func (m *NewAccount) Reset()

func (*NewAccount) String

func (m *NewAccount) String() string

type Reply

type Reply struct {
	Status           *Reply_Status   `protobuf:"varint,1,opt,name=status,enum=protos.Reply_Status,def=0" json:"status,omitempty"`
	AccountCreated   *AccountCreated `protobuf:"bytes,2,opt,name=account_created" json:"account_created,omitempty"`
	Fetched          *Fetched        `protobuf:"bytes,3,opt,name=fetched" json:"fetched,omitempty"`
	Announce         *ServerAnnounce `protobuf:"bytes,4,opt,name=announce" json:"announce,omitempty"`
	Upload           *UploadReply    `protobuf:"bytes,5,opt,name=upload" json:"upload,omitempty"`
	Download         *DownloadReply  `protobuf:"bytes,6,opt,name=download" json:"download,omitempty"`
	XXX_unrecognized []byte          `json:"-"`
}

Reply is the server's reply to the client.

func (*Reply) GetAccountCreated

func (m *Reply) GetAccountCreated() *AccountCreated

func (*Reply) GetAnnounce

func (m *Reply) GetAnnounce() *ServerAnnounce

func (*Reply) GetDownload

func (m *Reply) GetDownload() *DownloadReply

func (*Reply) GetFetched

func (m *Reply) GetFetched() *Fetched

func (*Reply) GetStatus

func (m *Reply) GetStatus() Reply_Status

func (*Reply) GetUpload

func (m *Reply) GetUpload() *UploadReply

func (*Reply) ProtoMessage

func (*Reply) ProtoMessage()

func (*Reply) Reset

func (m *Reply) Reset()

func (*Reply) String

func (m *Reply) String() string

type Reply_Status

type Reply_Status int32
const (
	Reply_OK                         Reply_Status = 0
	Reply_PARSE_ERROR                Reply_Status = 1
	Reply_NO_REQUEST                 Reply_Status = 2
	Reply_INTERNAL_ERROR             Reply_Status = 3
	Reply_IDENTITY_ALREADY_KNOWN     Reply_Status = 10
	Reply_OVERLOAD                   Reply_Status = 11
	Reply_NO_SUCH_ADDRESS            Reply_Status = 12
	Reply_DELIVERY_SIGNATURE_INVALID Reply_Status = 13
	// INCORRECT_GENERATION = 14;
	Reply_MAILBOX_FULL            Reply_Status = 14
	Reply_NO_ACCOUNT              Reply_Status = 15
	Reply_OVER_QUOTA              Reply_Status = 16
	Reply_FILE_LARGER_THAN_SIZE   Reply_Status = 17
	Reply_FILE_COMPLETE           Reply_Status = 18
	Reply_NO_SUCH_FILE            Reply_Status = 19
	Reply_RESUME_PAST_END_OF_FILE Reply_Status = 20
	Reply_CANNOT_PARSE_REVOCATION Reply_Status = 21
	// REGISTRATION_DISABLED may be returned after a NewAccount
	// request to indicate the the server doesn't accept new
	// registrations.
	Reply_REGISTRATION_DISABLED Reply_Status = 22
	// HMAC_KEY_ALREADY_SET is returned in reply to a HMACSetup
	// request if a different HMAC key has already been setup.
	Reply_HMAC_KEY_ALREADY_SET Reply_Status = 23
	// HMAC_NOT_SETUP results from a delivery attempt when the
	// recipient hasn't configured an HMAC key.
	Reply_HMAC_NOT_SETUP Reply_Status = 24
	// HMAC_INCORRECT results from a delivery when the HMAC of the
	// one-time public key doesn't validate.
	Reply_HMAC_INCORRECT Reply_Status = 25
	// HMAC_USED results from a delivery when the HMAC value has
	// already been used.
	Reply_HMAC_USED Reply_Status = 26
	// HMAC_REVOKED results from a delivery when the HMAC value has
	// been marked as revoked.
	Reply_HMAC_REVOKED Reply_Status = 27
)
const Default_Reply_Status Reply_Status = Reply_OK

func (Reply_Status) Enum

func (x Reply_Status) Enum() *Reply_Status

func (Reply_Status) String

func (x Reply_Status) String() string

func (*Reply_Status) UnmarshalJSON

func (x *Reply_Status) UnmarshalJSON(data []byte) error

type Request

type Request struct {
	NewAccount *NewAccount `protobuf:"bytes,1,opt,name=new_account" json:"new_account,omitempty"`
	Deliver    *Delivery   `protobuf:"bytes,2,opt,name=deliver" json:"deliver,omitempty"`
	Fetch      *Fetch      `protobuf:"bytes,3,opt,name=fetch" json:"fetch,omitempty"`
	Upload     *Upload     `protobuf:"bytes,4,opt,name=upload" json:"upload,omitempty"`
	Download   *Download   `protobuf:"bytes,5,opt,name=download" json:"download,omitempty"`
	// optional SignedRevocation revocation = 6;
	HmacSetup        *HMACSetup  `protobuf:"bytes,6,opt,name=hmac_setup" json:"hmac_setup,omitempty"`
	HmacStrike       *HMACStrike `protobuf:"bytes,7,opt,name=hmac_strike" json:"hmac_strike,omitempty"`
	XXX_unrecognized []byte      `json:"-"`
}

Request is the client's request to the server. Only one of the optional messages may be present in any Request.

func (*Request) GetDeliver

func (m *Request) GetDeliver() *Delivery

func (*Request) GetDownload

func (m *Request) GetDownload() *Download

func (*Request) GetFetch

func (m *Request) GetFetch() *Fetch

func (*Request) GetHmacSetup

func (m *Request) GetHmacSetup() *HMACSetup

func (*Request) GetHmacStrike

func (m *Request) GetHmacStrike() *HMACStrike

func (*Request) GetNewAccount

func (m *Request) GetNewAccount() *NewAccount

func (*Request) GetUpload

func (m *Request) GetUpload() *Upload

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) Reset

func (m *Request) Reset()

func (*Request) String

func (m *Request) String() string

type ServerAnnounce

type ServerAnnounce struct {
	Message          *Message `protobuf:"bytes,1,req,name=message" json:"message,omitempty"`
	XXX_unrecognized []byte   `json:"-"`
}

ServerAnnounce is a special type of reply to a Fetch request. The message comes from the server, rather than from another client and it's intended to be used for announcements from the server operator to all or some users.

func (*ServerAnnounce) GetMessage

func (m *ServerAnnounce) GetMessage() *Message

func (*ServerAnnounce) ProtoMessage

func (*ServerAnnounce) ProtoMessage()

func (*ServerAnnounce) Reset

func (m *ServerAnnounce) Reset()

func (*ServerAnnounce) String

func (m *ServerAnnounce) String() string

type SignedKeyExchange

type SignedKeyExchange struct {
	// signed contains a serialised KeyExchange message.
	Signed []byte `protobuf:"bytes,1,req,name=signed" json:"signed,omitempty"`
	// signature contains an Ed25519 signature of |signed| by
	// |signed.public_key|.
	Signature        []byte `protobuf:"bytes,2,req,name=signature" json:"signature,omitempty"`
	XXX_unrecognized []byte `json:"-"`
}

A SignedKeyExchange is a message that's sent between clients and exposed in the UI. It's typically found in a PEM block with type "POND KEY EXCHANGE".

func (*SignedKeyExchange) GetSignature

func (m *SignedKeyExchange) GetSignature() []byte

func (*SignedKeyExchange) GetSigned

func (m *SignedKeyExchange) GetSigned() []byte

func (*SignedKeyExchange) ProtoMessage

func (*SignedKeyExchange) ProtoMessage()

func (*SignedKeyExchange) Reset

func (m *SignedKeyExchange) Reset()

func (*SignedKeyExchange) String

func (m *SignedKeyExchange) String() string

type Upload

type Upload struct {
	Id               *uint64 `protobuf:"fixed64,1,req,name=id" json:"id,omitempty"`
	Size             *int64  `protobuf:"varint,2,req,name=size" json:"size,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

func (*Upload) GetId

func (m *Upload) GetId() uint64

func (*Upload) GetSize

func (m *Upload) GetSize() int64

func (*Upload) ProtoMessage

func (*Upload) ProtoMessage()

func (*Upload) Reset

func (m *Upload) Reset()

func (*Upload) String

func (m *Upload) String() string

type UploadReply

type UploadReply struct {
	Resume           *int64 `protobuf:"varint,1,opt,name=resume" json:"resume,omitempty"`
	XXX_unrecognized []byte `json:"-"`
}

func (*UploadReply) GetResume

func (m *UploadReply) GetResume() int64

func (*UploadReply) ProtoMessage

func (*UploadReply) ProtoMessage()

func (*UploadReply) Reset

func (m *UploadReply) Reset()

func (*UploadReply) String

func (m *UploadReply) String() string

Jump to

Keyboard shortcuts

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