pb

package
v0.0.0-...-d5010d9 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2019 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ContactType_name = map[int32]string{
	0: "PHONE",
	1: "EMAIL",
}
View Source
var ContactType_value = map[string]int32{
	"PHONE": 0,
	"EMAIL": 1,
}

Functions

func RegisterRossbyServer

func RegisterRossbyServer(s *grpc.Server, srv RossbyServer)

Types

type AuthorizeReply

type AuthorizeReply struct {
	Success              bool        `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	Token                string      `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`
	Inbox                string      `protobuf:"bytes,3,opt,name=inbox,proto3" json:"inbox,omitempty"`
	Errors               *MultiError `protobuf:"bytes,4,opt,name=errors,proto3" json:"errors,omitempty"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

func (*AuthorizeReply) Descriptor

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

func (*AuthorizeReply) GetErrors

func (m *AuthorizeReply) GetErrors() *MultiError

func (*AuthorizeReply) GetInbox

func (m *AuthorizeReply) GetInbox() string

func (*AuthorizeReply) GetSuccess

func (m *AuthorizeReply) GetSuccess() bool

func (*AuthorizeReply) GetToken

func (m *AuthorizeReply) GetToken() string

func (*AuthorizeReply) ProtoMessage

func (*AuthorizeReply) ProtoMessage()

func (*AuthorizeReply) Reset

func (m *AuthorizeReply) Reset()

func (*AuthorizeReply) String

func (m *AuthorizeReply) String() string

func (*AuthorizeReply) XXX_DiscardUnknown

func (m *AuthorizeReply) XXX_DiscardUnknown()

func (*AuthorizeReply) XXX_Marshal

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

func (*AuthorizeReply) XXX_Merge

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

func (*AuthorizeReply) XXX_Size

func (m *AuthorizeReply) XXX_Size() int

func (*AuthorizeReply) XXX_Unmarshal

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

type AuthorizeRequest

type AuthorizeRequest struct {
	Device               string   `protobuf:"bytes,1,opt,name=device,proto3" json:"device,omitempty"`
	Authorization        string   `protobuf:"bytes,2,opt,name=authorization,proto3" json:"authorization,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Authorization: a unary RPC that is a response to a side channel. On registration, Rossby sends an authorization code to the phone or email address associated with the account. The user sends this code back in the authorization RPC and gets a unique token that they can use to authenticate messages to the server with.

func (*AuthorizeRequest) Descriptor

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

func (*AuthorizeRequest) GetAuthorization

func (m *AuthorizeRequest) GetAuthorization() string

func (*AuthorizeRequest) GetDevice

func (m *AuthorizeRequest) GetDevice() string

func (*AuthorizeRequest) ProtoMessage

func (*AuthorizeRequest) ProtoMessage()

func (*AuthorizeRequest) Reset

func (m *AuthorizeRequest) Reset()

func (*AuthorizeRequest) String

func (m *AuthorizeRequest) String() string

func (*AuthorizeRequest) XXX_DiscardUnknown

func (m *AuthorizeRequest) XXX_DiscardUnknown()

func (*AuthorizeRequest) XXX_Marshal

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

func (*AuthorizeRequest) XXX_Merge

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

func (*AuthorizeRequest) XXX_Size

func (m *AuthorizeRequest) XXX_Size() int

func (*AuthorizeRequest) XXX_Unmarshal

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

type Contact

type Contact struct {
	Type                 ContactType `protobuf:"varint,1,opt,name=type,proto3,enum=pb.ContactType" json:"type,omitempty"`
	Contact              string      `protobuf:"bytes,2,opt,name=contact,proto3" json:"contact,omitempty"`
	Verified             bool        `protobuf:"varint,3,opt,name=verified,proto3" json:"verified,omitempty"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

Contains the raw contact information along with parsing hints

func (*Contact) Descriptor

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

func (*Contact) GetContact

func (m *Contact) GetContact() string

func (*Contact) GetType

func (m *Contact) GetType() ContactType

func (*Contact) GetVerified

func (m *Contact) GetVerified() bool

func (*Contact) ProtoMessage

func (*Contact) ProtoMessage()

func (*Contact) Reset

func (m *Contact) Reset()

func (*Contact) String

func (m *Contact) String() string

func (*Contact) Validate

func (c *Contact) Validate() (err error)

Validate ensures that the contact identifier is a valid E.164 phone number or an email address and returns an error if it is not. Note that this is a fairly lightweight approach to validation and is prone to false positives. Error handling on send or receive messages is essential.

See also: https://www.twilio.com/docs/glossary/what-e164 See also: https://tools.ietf.org/rfc/rfc5322.txt

func (*Contact) XXX_DiscardUnknown

func (m *Contact) XXX_DiscardUnknown()

func (*Contact) XXX_Marshal

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

func (*Contact) XXX_Merge

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

func (*Contact) XXX_Size

func (m *Contact) XXX_Size() int

func (*Contact) XXX_Unmarshal

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

type ContactReply

type ContactReply struct {
	Success              bool        `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	Pubkey               string      `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey,omitempty"`
	Errors               *MultiError `protobuf:"bytes,3,opt,name=errors,proto3" json:"errors,omitempty"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

TODO: also respond with contact profile

func (*ContactReply) Descriptor

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

func (*ContactReply) GetErrors

func (m *ContactReply) GetErrors() *MultiError

func (*ContactReply) GetPubkey

func (m *ContactReply) GetPubkey() string

func (*ContactReply) GetSuccess

func (m *ContactReply) GetSuccess() bool

func (*ContactReply) ProtoMessage

func (*ContactReply) ProtoMessage()

func (*ContactReply) Reset

func (m *ContactReply) Reset()

func (*ContactReply) String

func (m *ContactReply) String() string

func (*ContactReply) XXX_DiscardUnknown

func (m *ContactReply) XXX_DiscardUnknown()

func (*ContactReply) XXX_Marshal

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

func (*ContactReply) XXX_Merge

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

func (*ContactReply) XXX_Size

func (m *ContactReply) XXX_Size() int

func (*ContactReply) XXX_Unmarshal

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

type ContactRequest

type ContactRequest struct {
	Contacts             []*Contact `protobuf:"bytes,2,rep,name=contacts,proto3" json:"contacts,omitempty"`
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

Add Contacts: this RPC is designed to fetch the public key of another user when the client supplies an authorized phone number or email. This can be a bit tricky, and the server has to manage whether or not users are allowed to be discovered automatically or not.

func (*ContactRequest) Descriptor

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

func (*ContactRequest) GetContacts

func (m *ContactRequest) GetContacts() []*Contact

func (*ContactRequest) ProtoMessage

func (*ContactRequest) ProtoMessage()

func (*ContactRequest) Reset

func (m *ContactRequest) Reset()

func (*ContactRequest) String

func (m *ContactRequest) String() string

func (*ContactRequest) XXX_DiscardUnknown

func (m *ContactRequest) XXX_DiscardUnknown()

func (*ContactRequest) XXX_Marshal

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

func (*ContactRequest) XXX_Merge

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

func (*ContactRequest) XXX_Size

func (m *ContactRequest) XXX_Size() int

func (*ContactRequest) XXX_Unmarshal

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

type ContactType

type ContactType int32

Specifies how to parse contacts

const (
	ContactType_PHONE ContactType = 0
	ContactType_EMAIL ContactType = 1
)

func (ContactType) EnumDescriptor

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

func (ContactType) String

func (x ContactType) String() string

type DeliverResponse

type DeliverResponse struct {
	Success              bool        `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	Deliveries           uint32      `protobuf:"varint,2,opt,name=deliveries,proto3" json:"deliveries,omitempty"`
	Errors               *MultiError `protobuf:"bytes,3,opt,name=errors,proto3" json:"errors,omitempty"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

Deliver Messages: this RPC is a one-off request to deliver a set of messages. This RPC is used in an asynchronous fashion when a Chat streaming RPC pipe does not exist.

func (*DeliverResponse) Descriptor

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

func (*DeliverResponse) GetDeliveries

func (m *DeliverResponse) GetDeliveries() uint32

func (*DeliverResponse) GetErrors

func (m *DeliverResponse) GetErrors() *MultiError

func (*DeliverResponse) GetSuccess

func (m *DeliverResponse) GetSuccess() bool

func (*DeliverResponse) ProtoMessage

func (*DeliverResponse) ProtoMessage()

func (*DeliverResponse) Reset

func (m *DeliverResponse) Reset()

func (*DeliverResponse) String

func (m *DeliverResponse) String() string

func (*DeliverResponse) XXX_DiscardUnknown

func (m *DeliverResponse) XXX_DiscardUnknown()

func (*DeliverResponse) XXX_Marshal

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

func (*DeliverResponse) XXX_Merge

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

func (*DeliverResponse) XXX_Size

func (m *DeliverResponse) XXX_Size() int

func (*DeliverResponse) XXX_Unmarshal

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

type Device

type Device struct {
	Id                   string               `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Authorized           bool                 `protobuf:"varint,2,opt,name=authorized,proto3" json:"authorized,omitempty"`
	Cursor               uint64               `protobuf:"varint,3,opt,name=cursor,proto3" json:"cursor,omitempty"`
	Token                string               `protobuf:"bytes,4,opt,name=token,proto3" json:"token,omitempty"`
	Created              *timestamp.Timestamp `protobuf:"bytes,13,opt,name=created,proto3" json:"created,omitempty"`
	LastAuth             *timestamp.Timestamp `protobuf:"bytes,14,opt,name=last_auth,json=lastAuth,proto3" json:"last_auth,omitempty"`
	LastSync             *timestamp.Timestamp `protobuf:"bytes,15,opt,name=last_sync,json=lastSync,proto3" json:"last_sync,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

Users can send and receive messages from multiple devices (e.g. their phone or their laptop). Devices are authorized to send and receive messages by the application and per-device tokens are the primary form of authentication. Devices can also be "deauthorized" so that they can no longer send or receive messages on behalf of a user, but without canceling that user's entire account.

func (*Device) Descriptor

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

func (*Device) GetAuthorized

func (m *Device) GetAuthorized() bool

func (*Device) GetCreated

func (m *Device) GetCreated() *timestamp.Timestamp

func (*Device) GetCursor

func (m *Device) GetCursor() uint64

func (*Device) GetId

func (m *Device) GetId() string

func (*Device) GetLastAuth

func (m *Device) GetLastAuth() *timestamp.Timestamp

func (*Device) GetLastSync

func (m *Device) GetLastSync() *timestamp.Timestamp

func (*Device) GetToken

func (m *Device) GetToken() string

func (*Device) ProtoMessage

func (*Device) ProtoMessage()

func (*Device) Reset

func (m *Device) Reset()

func (*Device) String

func (m *Device) String() string

func (*Device) XXX_DiscardUnknown

func (m *Device) XXX_DiscardUnknown()

func (*Device) XXX_Marshal

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

func (*Device) XXX_Merge

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

func (*Device) XXX_Size

func (m *Device) XXX_Size() int

func (*Device) XXX_Unmarshal

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

type Error

type Error struct {
	Code                 uint32   `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	Message              string   `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Errors are coded in Rossby to easily identify what has gone wrong TODO: create error code enumerations for quick testing of error types

func Errore

func Errore(code uint32, err error) *Error

Errore quickly creates a new error from another error.

func Errorf

func Errorf(code uint32, format string, a ...interface{}) *Error

Errorf quickly creates a new error message for use with multi-errors.

func (*Error) Descriptor

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

func (*Error) Error

func (e *Error) Error() string

Error ensures that pb.Error implements error

func (*Error) GetCode

func (m *Error) GetCode() uint32

func (*Error) GetMessage

func (m *Error) GetMessage() string

func (*Error) ProtoMessage

func (*Error) ProtoMessage()

func (*Error) Reset

func (m *Error) Reset()

func (*Error) String

func (m *Error) String() string

func (*Error) XXX_DiscardUnknown

func (m *Error) XXX_DiscardUnknown()

func (*Error) XXX_Marshal

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

func (*Error) XXX_Merge

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

func (*Error) XXX_Size

func (m *Error) XXX_Size() int

func (*Error) XXX_Unmarshal

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

type Errors

type Errors []*Error

Errors exposes a mechanism for quickly creating MultiError objects.

func (Errors) Serialize

func (e Errors) Serialize() *MultiError

Serialize a list of errors into a multi-error.

type FetchRequest

type FetchRequest struct {
	Device               string   `protobuf:"bytes,2,opt,name=device,proto3" json:"device,omitempty"`
	Inbox                string   `protobuf:"bytes,3,opt,name=inbox,proto3" json:"inbox,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Fetch Messages: this RPC is a one-off request to fetch all the messages corresponding to the device. This RPC is used in a periodic fashion, whereas the Chat streaming RPC is used to deliver messages to users who are currently online.

func (*FetchRequest) Descriptor

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

func (*FetchRequest) GetDevice

func (m *FetchRequest) GetDevice() string

func (*FetchRequest) GetInbox

func (m *FetchRequest) GetInbox() string

func (*FetchRequest) ProtoMessage

func (*FetchRequest) ProtoMessage()

func (*FetchRequest) Reset

func (m *FetchRequest) Reset()

func (*FetchRequest) String

func (m *FetchRequest) String() string

func (*FetchRequest) XXX_DiscardUnknown

func (m *FetchRequest) XXX_DiscardUnknown()

func (*FetchRequest) XXX_Marshal

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

func (*FetchRequest) XXX_Merge

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

func (*FetchRequest) XXX_Size

func (m *FetchRequest) XXX_Size() int

func (*FetchRequest) XXX_Unmarshal

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

type Message

type Message struct {
	From                 string               `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"`
	To                   string               `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty"`
	Timestamp            *timestamp.Timestamp `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	Body                 []byte               `protobuf:"bytes,4,opt,name=body,proto3" json:"body,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

Message objects represent a single, encrypted message sent from one inbox to another.

func (*Message) Descriptor

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

func (*Message) GetBody

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

func (*Message) GetFrom

func (m *Message) GetFrom() string

func (*Message) GetTimestamp

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

func (*Message) GetTo

func (m *Message) GetTo() string

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 Messages

type Messages struct {
	Status               *Status    `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	Messages             []*Message `protobuf:"bytes,2,rep,name=messages,proto3" json:"messages,omitempty"`
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

Messages are the primary serialization format for sending multiple message objects between Rossby replicas and to and from clients. They are simply a wrapper for one or more messages and status meta information.

func (*Messages) Descriptor

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

func (*Messages) GetMessages

func (m *Messages) GetMessages() []*Message

func (*Messages) GetStatus

func (m *Messages) GetStatus() *Status

func (*Messages) ProtoMessage

func (*Messages) ProtoMessage()

func (*Messages) Reset

func (m *Messages) Reset()

func (*Messages) String

func (m *Messages) String() string

func (*Messages) XXX_DiscardUnknown

func (m *Messages) XXX_DiscardUnknown()

func (*Messages) XXX_Marshal

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

func (*Messages) XXX_Merge

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

func (*Messages) XXX_Size

func (m *Messages) XXX_Size() int

func (*Messages) XXX_Unmarshal

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

type MultiError

type MultiError struct {
	Errors               []*Error `protobuf:"bytes,1,rep,name=errors,proto3" json:"errors,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Multi-errors store more than one error but can be treated like a regular error Normally we'd implement this as a type []*Error but this format allows it to be easily serialized in RPC requests and responses.

func (*MultiError) Descriptor

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

func (*MultiError) Error

func (e *MultiError) Error() string

Error ensures that pb.MultiError implements error

func (*MultiError) GetErrors

func (m *MultiError) GetErrors() []*Error

func (*MultiError) ProtoMessage

func (*MultiError) ProtoMessage()

func (*MultiError) Reset

func (m *MultiError) Reset()

func (*MultiError) String

func (m *MultiError) String() string

func (*MultiError) XXX_DiscardUnknown

func (m *MultiError) XXX_DiscardUnknown()

func (*MultiError) XXX_Marshal

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

func (*MultiError) XXX_Merge

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

func (*MultiError) XXX_Size

func (m *MultiError) XXX_Size() int

func (*MultiError) XXX_Unmarshal

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

type Profile

type Profile struct {
	Id                   string               `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Contacts             []*Contact           `protobuf:"bytes,2,rep,name=contacts,proto3" json:"contacts,omitempty"`
	Devices              []*Device            `protobuf:"bytes,3,rep,name=devices,proto3" json:"devices,omitempty"`
	Joined               *timestamp.Timestamp `protobuf:"bytes,14,opt,name=joined,proto3" json:"joined,omitempty"`
	LastSeen             *timestamp.Timestamp `protobuf:"bytes,15,opt,name=last_seen,json=lastSeen,proto3" json:"last_seen,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

Profile objects store information about the state of a single inbox (e.g. user) and is the primary data object that is read and written to in most API calls. Although the profile is not generally sent over the network, it is serialized using protocol buffers to store in the database.

func (*Profile) Descriptor

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

func (*Profile) GetContacts

func (m *Profile) GetContacts() []*Contact

func (*Profile) GetDevices

func (m *Profile) GetDevices() []*Device

func (*Profile) GetId

func (m *Profile) GetId() string

func (*Profile) GetJoined

func (m *Profile) GetJoined() *timestamp.Timestamp

func (*Profile) GetLastSeen

func (m *Profile) GetLastSeen() *timestamp.Timestamp

func (*Profile) ProtoMessage

func (*Profile) ProtoMessage()

func (*Profile) Reset

func (m *Profile) Reset()

func (*Profile) String

func (m *Profile) String() string

func (*Profile) XXX_DiscardUnknown

func (m *Profile) XXX_DiscardUnknown()

func (*Profile) XXX_Marshal

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

func (*Profile) XXX_Merge

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

func (*Profile) XXX_Size

func (m *Profile) XXX_Size() int

func (*Profile) XXX_Unmarshal

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

type RegisterReply

type RegisterReply struct {
	Success              bool        `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	Authorizations       uint32      `protobuf:"varint,2,opt,name=authorizations,proto3" json:"authorizations,omitempty"`
	Errors               *MultiError `protobuf:"bytes,3,opt,name=errors,proto3" json:"errors,omitempty"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

func (*RegisterReply) Descriptor

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

func (*RegisterReply) GetAuthorizations

func (m *RegisterReply) GetAuthorizations() uint32

func (*RegisterReply) GetErrors

func (m *RegisterReply) GetErrors() *MultiError

func (*RegisterReply) GetSuccess

func (m *RegisterReply) GetSuccess() bool

func (*RegisterReply) ProtoMessage

func (*RegisterReply) ProtoMessage()

func (*RegisterReply) Reset

func (m *RegisterReply) Reset()

func (*RegisterReply) String

func (m *RegisterReply) String() string

func (*RegisterReply) XXX_DiscardUnknown

func (m *RegisterReply) XXX_DiscardUnknown()

func (*RegisterReply) XXX_Marshal

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

func (*RegisterReply) XXX_Merge

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

func (*RegisterReply) XXX_Size

func (m *RegisterReply) XXX_Size() int

func (*RegisterReply) XXX_Unmarshal

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

type RegisterRequest

type RegisterRequest struct {
	Device               string     `protobuf:"bytes,1,opt,name=device,proto3" json:"device,omitempty"`
	Contacts             []*Contact `protobuf:"bytes,2,rep,name=contacts,proto3" json:"contacts,omitempty"`
	Pubkey               []byte     `protobuf:"bytes,3,opt,name=pubkey,proto3" json:"pubkey,omitempty"`
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

Registration: a unary RPC to add a device, add a contact email or phone number, link a device to an account, or change the public key of an account. Followed by authorization.

func (*RegisterRequest) Descriptor

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

func (*RegisterRequest) GetContacts

func (m *RegisterRequest) GetContacts() []*Contact

func (*RegisterRequest) GetDevice

func (m *RegisterRequest) GetDevice() string

func (*RegisterRequest) GetPubkey

func (m *RegisterRequest) GetPubkey() []byte

func (*RegisterRequest) ProtoMessage

func (*RegisterRequest) ProtoMessage()

func (*RegisterRequest) Reset

func (m *RegisterRequest) Reset()

func (*RegisterRequest) String

func (m *RegisterRequest) String() string

func (*RegisterRequest) XXX_DiscardUnknown

func (m *RegisterRequest) XXX_DiscardUnknown()

func (*RegisterRequest) XXX_Marshal

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

func (*RegisterRequest) XXX_Merge

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

func (*RegisterRequest) XXX_Size

func (m *RegisterRequest) XXX_Size() int

func (*RegisterRequest) XXX_Unmarshal

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

type RossbyClient

type RossbyClient interface {
	Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterReply, error)
	Authorize(ctx context.Context, in *AuthorizeRequest, opts ...grpc.CallOption) (*AuthorizeReply, error)
	Contact(ctx context.Context, in *ContactRequest, opts ...grpc.CallOption) (*ContactReply, error)
	Fetch(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*Messages, error)
	Deliver(ctx context.Context, in *Messages, opts ...grpc.CallOption) (*DeliverResponse, error)
	// TODO: is this a single bidirectional stream or two unidirectional streams?
	Chat(ctx context.Context, opts ...grpc.CallOption) (Rossby_ChatClient, error)
}

RossbyClient is the client API for Rossby service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewRossbyClient

func NewRossbyClient(cc *grpc.ClientConn) RossbyClient

type RossbyServer

type RossbyServer interface {
	Register(context.Context, *RegisterRequest) (*RegisterReply, error)
	Authorize(context.Context, *AuthorizeRequest) (*AuthorizeReply, error)
	Contact(context.Context, *ContactRequest) (*ContactReply, error)
	Fetch(context.Context, *FetchRequest) (*Messages, error)
	Deliver(context.Context, *Messages) (*DeliverResponse, error)
	// TODO: is this a single bidirectional stream or two unidirectional streams?
	Chat(Rossby_ChatServer) error
}

RossbyServer is the server API for Rossby service.

type Rossby_ChatClient

type Rossby_ChatClient interface {
	Send(*Messages) error
	Recv() (*Messages, error)
	grpc.ClientStream
}

type Rossby_ChatServer

type Rossby_ChatServer interface {
	Send(*Messages) error
	Recv() (*Messages, error)
	grpc.ServerStream
}

type Status

type Status struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Status messages send generic meta information about the state of the inbox. TODO: determine how best to structure status messages

func (*Status) Descriptor

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

func (*Status) ProtoMessage

func (*Status) ProtoMessage()

func (*Status) Reset

func (m *Status) Reset()

func (*Status) String

func (m *Status) String() string

func (*Status) XXX_DiscardUnknown

func (m *Status) XXX_DiscardUnknown()

func (*Status) XXX_Marshal

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

func (*Status) XXX_Merge

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

func (*Status) XXX_Size

func (m *Status) XXX_Size() int

func (*Status) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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