chat1

package
v1.0.18 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2016 License: BSD-3-Clause, BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BodyPlaintextVersionMap = map[string]BodyPlaintextVersion{
	"V1": 1,
}
View Source
var BodyPlaintextVersionRevMap = map[BodyPlaintextVersion]string{
	1: "V1",
}
View Source
var ChatActivityTypeMap = map[string]ChatActivityType{
	"RESERVED":         0,
	"INCOMING_MESSAGE": 1,
}
View Source
var ChatActivityTypeRevMap = map[ChatActivityType]string{
	0: "RESERVED",
	1: "INCOMING_MESSAGE",
}
View Source
var ConversationStatusGregorMap = map[ConversationStatus]string{
	ConversationStatus_UNFILED:  "unfiled",
	ConversationStatus_FAVORITE: "favorite",
	ConversationStatus_IGNORED:  "ignored",
	ConversationStatus_BLOCKED:  "blocked",
}
View Source
var ConversationStatusMap = map[string]ConversationStatus{
	"UNFILED":  0,
	"FAVORITE": 1,
	"IGNORED":  2,
	"BLOCKED":  3,
}
View Source
var ConversationStatusRevMap = map[ConversationStatus]string{
	0: "UNFILED",
	1: "FAVORITE",
	2: "IGNORED",
	3: "BLOCKED",
}
View Source
var HeaderPlaintextVersionMap = map[string]HeaderPlaintextVersion{
	"V1": 1,
}
View Source
var HeaderPlaintextVersionRevMap = map[HeaderPlaintextVersion]string{
	1: "V1",
}
View Source
var MessageTypeMap = map[string]MessageType{
	"NONE":       0,
	"TEXT":       1,
	"ATTACHMENT": 2,
	"EDIT":       3,
	"DELETE":     4,
	"METADATA":   5,
	"TLFNAME":    6,
	"HEADLINE":   7,
}
View Source
var MessageTypeRevMap = map[MessageType]string{
	0: "NONE",
	1: "TEXT",
	2: "ATTACHMENT",
	3: "EDIT",
	4: "DELETE",
	5: "METADATA",
	6: "TLFNAME",
	7: "HEADLINE",
}
View Source
var MessageUnboxedStateMap = map[string]MessageUnboxedState{
	"VALID": 1,
	"ERROR": 2,
}
View Source
var MessageUnboxedStateRevMap = map[MessageUnboxedState]string{
	1: "VALID",
	2: "ERROR",
}
View Source
var TLFVisibilityMap = map[string]TLFVisibility{
	"ANY":     0,
	"PUBLIC":  1,
	"PRIVATE": 2,
}
View Source
var TLFVisibilityRevMap = map[TLFVisibility]string{
	0: "ANY",
	1: "PUBLIC",
	2: "PRIVATE",
}
View Source
var TopicTypeMap = map[string]TopicType{
	"NONE": 0,
	"CHAT": 1,
	"DEV":  2,
}
View Source
var TopicTypeRevMap = map[TopicType]string{
	0: "NONE",
	1: "CHAT",
	2: "DEV",
}

Functions

func ChatUiProtocol

func ChatUiProtocol(i ChatUiInterface) rpc.Protocol

func CommonProtocol

func CommonProtocol(i CommonInterface) rpc.Protocol

func GregorProtocol

func GregorProtocol(i GregorInterface) rpc.Protocol

func LocalProtocol

func LocalProtocol(i LocalInterface) rpc.Protocol

func NotifyChatProtocol

func NotifyChatProtocol(i NotifyChatInterface) rpc.Protocol

func RemoteProtocol

func RemoteProtocol(i RemoteInterface) rpc.Protocol

Types

type Asset

type Asset struct {
	Filename  string `codec:"filename" json:"filename"`
	Region    string `codec:"region" json:"region"`
	Endpoint  string `codec:"endpoint" json:"endpoint"`
	Bucket    string `codec:"bucket" json:"bucket"`
	Path      string `codec:"path" json:"path"`
	Size      int    `codec:"size" json:"size"`
	MimeType  string `codec:"mimeType" json:"mimeType"`
	EncHash   Hash   `codec:"encHash" json:"encHash"`
	Key       []byte `codec:"key" json:"key"`
	VerifyKey []byte `codec:"verifyKey" json:"verifyKey"`
}

type BodyPlaintext

type BodyPlaintext struct {
	Version__ BodyPlaintextVersion `codec:"version" json:"version"`
	V1__      *BodyPlaintextV1     `codec:"v1,omitempty" json:"v1,omitempty"`
}

func NewBodyPlaintextWithV1

func NewBodyPlaintextWithV1(v BodyPlaintextV1) BodyPlaintext

func (BodyPlaintext) V1

func (*BodyPlaintext) Version

func (o *BodyPlaintext) Version() (ret BodyPlaintextVersion, err error)

type BodyPlaintextV1

type BodyPlaintextV1 struct {
	MessageBody MessageBody `codec:"messageBody" json:"messageBody"`
}

type BodyPlaintextVersion

type BodyPlaintextVersion int
const (
	BodyPlaintextVersion_V1 BodyPlaintextVersion = 1
)

type ChatActivity

type ChatActivity struct {
	ActivityType    ChatActivityType `codec:"ActivityType" json:"ActivityType"`
	IncomingMessage *MessageUnboxed  `codec:"IncomingMessage,omitempty" json:"IncomingMessage,omitempty"`
}

type ChatActivityType

type ChatActivityType int
const (
	ChatActivityType_RESERVED         ChatActivityType = 0
	ChatActivityType_INCOMING_MESSAGE ChatActivityType = 1
)

type ChatAttachmentDownloadDoneArg

type ChatAttachmentDownloadDoneArg struct {
	SessionID int `codec:"sessionID" json:"sessionID"`
}

type ChatAttachmentDownloadProgressArg

type ChatAttachmentDownloadProgressArg struct {
	SessionID     int `codec:"sessionID" json:"sessionID"`
	BytesComplete int `codec:"bytesComplete" json:"bytesComplete"`
	BytesTotal    int `codec:"bytesTotal" json:"bytesTotal"`
}

type ChatAttachmentDownloadStartArg

type ChatAttachmentDownloadStartArg struct {
	SessionID int `codec:"sessionID" json:"sessionID"`
}

type ChatAttachmentPreviewUploadDoneArg

type ChatAttachmentPreviewUploadDoneArg struct {
	SessionID int `codec:"sessionID" json:"sessionID"`
}

type ChatAttachmentPreviewUploadStartArg

type ChatAttachmentPreviewUploadStartArg struct {
	SessionID int `codec:"sessionID" json:"sessionID"`
}

type ChatAttachmentUploadDoneArg

type ChatAttachmentUploadDoneArg struct {
	SessionID int `codec:"sessionID" json:"sessionID"`
}

type ChatAttachmentUploadProgressArg

type ChatAttachmentUploadProgressArg struct {
	SessionID     int `codec:"sessionID" json:"sessionID"`
	BytesComplete int `codec:"bytesComplete" json:"bytesComplete"`
	BytesTotal    int `codec:"bytesTotal" json:"bytesTotal"`
}

type ChatAttachmentUploadStartArg

type ChatAttachmentUploadStartArg struct {
	SessionID int `codec:"sessionID" json:"sessionID"`
}

type ChatUiClient

type ChatUiClient struct {
	Cli rpc.GenericClient
}

func (ChatUiClient) ChatAttachmentDownloadDone

func (c ChatUiClient) ChatAttachmentDownloadDone(ctx context.Context, sessionID int) (err error)

func (ChatUiClient) ChatAttachmentDownloadProgress

func (c ChatUiClient) ChatAttachmentDownloadProgress(ctx context.Context, __arg ChatAttachmentDownloadProgressArg) (err error)

func (ChatUiClient) ChatAttachmentDownloadStart

func (c ChatUiClient) ChatAttachmentDownloadStart(ctx context.Context, sessionID int) (err error)

func (ChatUiClient) ChatAttachmentPreviewUploadDone

func (c ChatUiClient) ChatAttachmentPreviewUploadDone(ctx context.Context, sessionID int) (err error)

func (ChatUiClient) ChatAttachmentPreviewUploadStart

func (c ChatUiClient) ChatAttachmentPreviewUploadStart(ctx context.Context, sessionID int) (err error)

func (ChatUiClient) ChatAttachmentUploadDone

func (c ChatUiClient) ChatAttachmentUploadDone(ctx context.Context, sessionID int) (err error)

func (ChatUiClient) ChatAttachmentUploadProgress

func (c ChatUiClient) ChatAttachmentUploadProgress(ctx context.Context, __arg ChatAttachmentUploadProgressArg) (err error)

func (ChatUiClient) ChatAttachmentUploadStart

func (c ChatUiClient) ChatAttachmentUploadStart(ctx context.Context, sessionID int) (err error)

type ChatUiInterface

type ChatUiInterface interface {
	ChatAttachmentUploadStart(context.Context, int) error
	ChatAttachmentUploadProgress(context.Context, ChatAttachmentUploadProgressArg) error
	ChatAttachmentUploadDone(context.Context, int) error
	ChatAttachmentPreviewUploadStart(context.Context, int) error
	ChatAttachmentPreviewUploadDone(context.Context, int) error
	ChatAttachmentDownloadStart(context.Context, int) error
	ChatAttachmentDownloadProgress(context.Context, ChatAttachmentDownloadProgressArg) error
	ChatAttachmentDownloadDone(context.Context, int) error
}

type CommonClient

type CommonClient struct {
	Cli rpc.GenericClient
}

type CommonInterface

type CommonInterface interface {
}

type Conversation

type Conversation struct {
	Metadata     ConversationMetadata    `codec:"metadata" json:"metadata"`
	ReaderInfo   *ConversationReaderInfo `codec:"readerInfo,omitempty" json:"readerInfo,omitempty"`
	Supersedes   *ConversationMetadata   `codec:"supersedes,omitempty" json:"supersedes,omitempty"`
	SupersededBy *ConversationMetadata   `codec:"supersededBy,omitempty" json:"supersededBy,omitempty"`
	MaxMsgs      []MessageBoxed          `codec:"maxMsgs" json:"maxMsgs"`
}

type ConversationID

type ConversationID []byte

func MakeConvID

func MakeConvID(val string) (ConversationID, error)

func (ConversationID) Bytes

func (cid ConversationID) Bytes() []byte

func (ConversationID) Eq

func (ConversationID) IsNil

func (cid ConversationID) IsNil() bool

func (ConversationID) Less

func (cid ConversationID) Less(c ConversationID) bool

func (ConversationID) String

func (cid ConversationID) String() string

type ConversationIDTriple

type ConversationIDTriple struct {
	Tlfid     TLFID     `codec:"tlfid" json:"tlfid"`
	TopicType TopicType `codec:"topicType" json:"topicType"`
	TopicID   TopicID   `codec:"topicID" json:"topicID"`
}

func (ConversationIDTriple) Eq

type ConversationInfoLocal

type ConversationInfoLocal struct {
	Id          ConversationID       `codec:"id" json:"id"`
	Triple      ConversationIDTriple `codec:"triple" json:"triple"`
	TlfName     string               `codec:"tlfName" json:"tlfName"`
	TopicName   string               `codec:"topicName" json:"topicName"`
	Visibility  TLFVisibility        `codec:"visibility" json:"visibility"`
	WriterNames []string             `codec:"writerNames" json:"writerNames"`
	ReaderNames []string             `codec:"readerNames" json:"readerNames"`
}

type ConversationLocal

type ConversationLocal struct {
	Error       *string                `codec:"error,omitempty" json:"error,omitempty"`
	Info        ConversationInfoLocal  `codec:"info" json:"info"`
	ReaderInfo  ConversationReaderInfo `codec:"readerInfo" json:"readerInfo"`
	MaxMessages []MessageUnboxed       `codec:"maxMessages" json:"maxMessages"`
}

type ConversationMetadata

type ConversationMetadata struct {
	IdTriple       ConversationIDTriple `codec:"idTriple" json:"idTriple"`
	ConversationID ConversationID       `codec:"conversationID" json:"conversationID"`
	IsFinalized    bool                 `codec:"isFinalized" json:"isFinalized"`
	ActiveList     []gregor1.UID        `codec:"activeList" json:"activeList"`
}

type ConversationReaderInfo

type ConversationReaderInfo struct {
	Mtime     gregor1.Time `codec:"mtime" json:"mtime"`
	ReadMsgid MessageID    `codec:"readMsgid" json:"readMsgid"`
	MaxMsgid  MessageID    `codec:"maxMsgid" json:"maxMsgid"`
}

type ConversationStatus

type ConversationStatus int
const (
	ConversationStatus_UNFILED  ConversationStatus = 0
	ConversationStatus_FAVORITE ConversationStatus = 1
	ConversationStatus_IGNORED  ConversationStatus = 2
	ConversationStatus_BLOCKED  ConversationStatus = 3
)

type DownloadAttachmentLocalArg

type DownloadAttachmentLocalArg struct {
	SessionID      int             `codec:"sessionID" json:"sessionID"`
	ConversationID ConversationID  `codec:"conversationID" json:"conversationID"`
	MessageID      MessageID       `codec:"messageID" json:"messageID"`
	Sink           keybase1.Stream `codec:"sink" json:"sink"`
	Preview        bool            `codec:"preview" json:"preview"`
}

type DownloadAttachmentLocalRes

type DownloadAttachmentLocalRes struct {
	RateLimits []RateLimit `codec:"rateLimits" json:"rateLimits"`
}

type EncryptedData

type EncryptedData struct {
	V int    `codec:"v" json:"v"`
	E []byte `codec:"e" json:"e"`
	N []byte `codec:"n" json:"n"`
}

type GenericPayload

type GenericPayload struct {
	Action string `codec:"Action" json:"Action"`
}

type GetConversationForCLILocalArg

type GetConversationForCLILocalArg struct {
	Query GetConversationForCLILocalQuery `codec:"query" json:"query"`
}

type GetConversationForCLILocalQuery

type GetConversationForCLILocalQuery struct {
	MarkAsRead     bool                `codec:"markAsRead" json:"markAsRead"`
	MessageTypes   []MessageType       `codec:"MessageTypes" json:"MessageTypes"`
	Since          *string             `codec:"Since,omitempty" json:"Since,omitempty"`
	Limit          UnreadFirstNumLimit `codec:"limit" json:"limit"`
	ConversationId ConversationID      `codec:"conversationId" json:"conversationId"`
}

type GetConversationForCLILocalRes

type GetConversationForCLILocalRes struct {
	Conversation ConversationLocal `codec:"conversation" json:"conversation"`
	Messages     []MessageUnboxed  `codec:"messages" json:"messages"`
	RateLimits   []RateLimit       `codec:"rateLimits" json:"rateLimits"`
}

type GetConversationMetadataRemoteRes

type GetConversationMetadataRemoteRes struct {
	Conv      Conversation `codec:"conv" json:"conv"`
	RateLimit *RateLimit   `codec:"rateLimit,omitempty" json:"rateLimit,omitempty"`
}

type GetInboxAndUnboxLocalArg

type GetInboxAndUnboxLocalArg struct {
	Query      *GetInboxLocalQuery `codec:"query,omitempty" json:"query,omitempty"`
	Pagination *Pagination         `codec:"pagination,omitempty" json:"pagination,omitempty"`
}

type GetInboxAndUnboxLocalRes

type GetInboxAndUnboxLocalRes struct {
	Conversations []ConversationLocal `codec:"conversations" json:"conversations"`
	Pagination    *Pagination         `codec:"pagination,omitempty" json:"pagination,omitempty"`
	RateLimits    []RateLimit         `codec:"rateLimits" json:"rateLimits"`
}

type GetInboxByTLFIDRemoteRes

type GetInboxByTLFIDRemoteRes struct {
	Convs     []Conversation `codec:"convs" json:"convs"`
	RateLimit *RateLimit     `codec:"rateLimit,omitempty" json:"rateLimit,omitempty"`
}

type GetInboxLocalArg

type GetInboxLocalArg struct {
	Query      *GetInboxLocalQuery `codec:"query,omitempty" json:"query,omitempty"`
	Pagination *Pagination         `codec:"pagination,omitempty" json:"pagination,omitempty"`
}

type GetInboxLocalQuery

type GetInboxLocalQuery struct {
	TlfName               *string              `codec:"tlfName,omitempty" json:"tlfName,omitempty"`
	TopicName             *string              `codec:"topicName,omitempty" json:"topicName,omitempty"`
	ConvID                *ConversationID      `codec:"convID,omitempty" json:"convID,omitempty"`
	TopicType             *TopicType           `codec:"topicType,omitempty" json:"topicType,omitempty"`
	TlfVisibility         *TLFVisibility       `codec:"tlfVisibility,omitempty" json:"tlfVisibility,omitempty"`
	Before                *gregor1.Time        `codec:"before,omitempty" json:"before,omitempty"`
	After                 *gregor1.Time        `codec:"after,omitempty" json:"after,omitempty"`
	OneChatTypePerTLF     *bool                `codec:"oneChatTypePerTLF,omitempty" json:"oneChatTypePerTLF,omitempty"`
	StatusOverrideDefault []ConversationStatus `codec:"statusOverrideDefault" json:"statusOverrideDefault"`
	UnreadOnly            bool                 `codec:"unreadOnly" json:"unreadOnly"`
	ReadOnly              bool                 `codec:"readOnly" json:"readOnly"`
	ComputeActiveList     bool                 `codec:"computeActiveList" json:"computeActiveList"`
}

type GetInboxLocalRes

type GetInboxLocalRes struct {
	ConversationsUnverified []Conversation `codec:"conversationsUnverified" json:"conversationsUnverified"`
	Pagination              *Pagination    `codec:"pagination,omitempty" json:"pagination,omitempty"`
	RateLimits              []RateLimit    `codec:"rateLimits" json:"rateLimits"`
}

type GetInboxQuery

type GetInboxQuery struct {
	ConvID            *ConversationID      `codec:"convID,omitempty" json:"convID,omitempty"`
	TopicType         *TopicType           `codec:"topicType,omitempty" json:"topicType,omitempty"`
	TlfID             *TLFID               `codec:"tlfID,omitempty" json:"tlfID,omitempty"`
	TlfVisibility     *TLFVisibility       `codec:"tlfVisibility,omitempty" json:"tlfVisibility,omitempty"`
	Before            *gregor1.Time        `codec:"before,omitempty" json:"before,omitempty"`
	After             *gregor1.Time        `codec:"after,omitempty" json:"after,omitempty"`
	OneChatTypePerTLF *bool                `codec:"oneChatTypePerTLF,omitempty" json:"oneChatTypePerTLF,omitempty"`
	Status            []ConversationStatus `codec:"status" json:"status"`
	UnreadOnly        bool                 `codec:"unreadOnly" json:"unreadOnly"`
	ReadOnly          bool                 `codec:"readOnly" json:"readOnly"`
	ComputeActiveList bool                 `codec:"computeActiveList" json:"computeActiveList"`
}

type GetInboxRemoteArg

type GetInboxRemoteArg struct {
	Query      *GetInboxQuery `codec:"query,omitempty" json:"query,omitempty"`
	Pagination *Pagination    `codec:"pagination,omitempty" json:"pagination,omitempty"`
}

type GetInboxRemoteRes

type GetInboxRemoteRes struct {
	Inbox     InboxView  `codec:"inbox" json:"inbox"`
	RateLimit *RateLimit `codec:"rateLimit,omitempty" json:"rateLimit,omitempty"`
}

type GetInboxSummaryForCLILocalArg

type GetInboxSummaryForCLILocalArg struct {
	Query GetInboxSummaryForCLILocalQuery `codec:"query" json:"query"`
}

type GetInboxSummaryForCLILocalQuery

type GetInboxSummaryForCLILocalQuery struct {
	TopicType           TopicType           `codec:"topicType" json:"topicType"`
	After               string              `codec:"after" json:"after"`
	Before              string              `codec:"before" json:"before"`
	Visibility          TLFVisibility       `codec:"visibility" json:"visibility"`
	UnreadFirst         bool                `codec:"unreadFirst" json:"unreadFirst"`
	UnreadFirstLimit    UnreadFirstNumLimit `codec:"unreadFirstLimit" json:"unreadFirstLimit"`
	ActivitySortedLimit int                 `codec:"activitySortedLimit" json:"activitySortedLimit"`
}

type GetInboxSummaryForCLILocalRes

type GetInboxSummaryForCLILocalRes struct {
	Conversations []ConversationLocal `codec:"conversations" json:"conversations"`
	RateLimits    []RateLimit         `codec:"rateLimits" json:"rateLimits"`
}

type GetMessagesLocalArg

type GetMessagesLocalArg struct {
	ConversationID ConversationID `codec:"conversationID" json:"conversationID"`
	MessageIDs     []MessageID    `codec:"messageIDs" json:"messageIDs"`
}

type GetMessagesLocalRes

type GetMessagesLocalRes struct {
	Messages   []MessageUnboxed `codec:"messages" json:"messages"`
	RateLimits []RateLimit      `codec:"rateLimits" json:"rateLimits"`
}

type GetMessagesRemoteArg

type GetMessagesRemoteArg struct {
	ConversationID ConversationID `codec:"conversationID" json:"conversationID"`
	MessageIDs     []MessageID    `codec:"messageIDs" json:"messageIDs"`
}

type GetMessagesRemoteRes

type GetMessagesRemoteRes struct {
	Msgs      []MessageBoxed `codec:"msgs" json:"msgs"`
	RateLimit *RateLimit     `codec:"rateLimit,omitempty" json:"rateLimit,omitempty"`
}

type GetS3ParamsArg

type GetS3ParamsArg struct {
	ConversationID ConversationID `codec:"conversationID" json:"conversationID"`
}

type GetThreadLocalArg

type GetThreadLocalArg struct {
	ConversationID ConversationID  `codec:"conversationID" json:"conversationID"`
	Query          *GetThreadQuery `codec:"query,omitempty" json:"query,omitempty"`
	Pagination     *Pagination     `codec:"pagination,omitempty" json:"pagination,omitempty"`
}

type GetThreadLocalRes

type GetThreadLocalRes struct {
	Thread     ThreadView  `codec:"thread" json:"thread"`
	RateLimits []RateLimit `codec:"rateLimits" json:"rateLimits"`
}

type GetThreadQuery

type GetThreadQuery struct {
	MarkAsRead   bool          `codec:"markAsRead" json:"markAsRead"`
	MessageTypes []MessageType `codec:"messageTypes" json:"messageTypes"`
	Before       *gregor1.Time `codec:"before,omitempty" json:"before,omitempty"`
	After        *gregor1.Time `codec:"after,omitempty" json:"after,omitempty"`
}

type GetThreadRemoteArg

type GetThreadRemoteArg struct {
	ConversationID ConversationID  `codec:"conversationID" json:"conversationID"`
	Query          *GetThreadQuery `codec:"query,omitempty" json:"query,omitempty"`
	Pagination     *Pagination     `codec:"pagination,omitempty" json:"pagination,omitempty"`
}

type GetThreadRemoteRes

type GetThreadRemoteRes struct {
	Thread    ThreadViewBoxed `codec:"thread" json:"thread"`
	RateLimit *RateLimit      `codec:"rateLimit,omitempty" json:"rateLimit,omitempty"`
}

type GregorClient

type GregorClient struct {
	Cli rpc.GenericClient
}

type GregorInterface

type GregorInterface interface {
}

type Hash

type Hash []byte

func (Hash) Eq

func (hash Hash) Eq(other Hash) bool

func (Hash) String

func (hash Hash) String() string

type HeaderPlaintext

type HeaderPlaintext struct {
	Version__ HeaderPlaintextVersion `codec:"version" json:"version"`
	V1__      *HeaderPlaintextV1     `codec:"v1,omitempty" json:"v1,omitempty"`
}

func NewHeaderPlaintextWithV1

func NewHeaderPlaintextWithV1(v HeaderPlaintextV1) HeaderPlaintext

func (HeaderPlaintext) V1

func (*HeaderPlaintext) Version

func (o *HeaderPlaintext) Version() (ret HeaderPlaintextVersion, err error)

type HeaderPlaintextV1

type HeaderPlaintextV1 struct {
	Conv            ConversationIDTriple     `codec:"conv" json:"conv"`
	TlfName         string                   `codec:"tlfName" json:"tlfName"`
	TlfPublic       bool                     `codec:"tlfPublic" json:"tlfPublic"`
	MessageType     MessageType              `codec:"messageType" json:"messageType"`
	Prev            []MessagePreviousPointer `codec:"prev" json:"prev"`
	Sender          gregor1.UID              `codec:"sender" json:"sender"`
	SenderDevice    gregor1.DeviceID         `codec:"senderDevice" json:"senderDevice"`
	BodyHash        Hash                     `codec:"bodyHash" json:"bodyHash"`
	HeaderSignature *SignatureInfo           `codec:"headerSignature,omitempty" json:"headerSignature,omitempty"`
}

type HeaderPlaintextVersion

type HeaderPlaintextVersion int
const (
	HeaderPlaintextVersion_V1 HeaderPlaintextVersion = 1
)

type InboxView

type InboxView struct {
	Conversations []Conversation `codec:"conversations" json:"conversations"`
	Pagination    *Pagination    `codec:"pagination,omitempty" json:"pagination,omitempty"`
}

type LocalClient

type LocalClient struct {
	Cli rpc.GenericClient
}

func (LocalClient) DownloadAttachmentLocal

func (c LocalClient) DownloadAttachmentLocal(ctx context.Context, __arg DownloadAttachmentLocalArg) (res DownloadAttachmentLocalRes, err error)

func (LocalClient) GetConversationForCLILocal

func (c LocalClient) GetConversationForCLILocal(ctx context.Context, query GetConversationForCLILocalQuery) (res GetConversationForCLILocalRes, err error)

func (LocalClient) GetInboxAndUnboxLocal

func (c LocalClient) GetInboxAndUnboxLocal(ctx context.Context, __arg GetInboxAndUnboxLocalArg) (res GetInboxAndUnboxLocalRes, err error)

func (LocalClient) GetInboxLocal

func (c LocalClient) GetInboxLocal(ctx context.Context, __arg GetInboxLocalArg) (res GetInboxLocalRes, err error)

func (LocalClient) GetInboxSummaryForCLILocal

func (c LocalClient) GetInboxSummaryForCLILocal(ctx context.Context, query GetInboxSummaryForCLILocalQuery) (res GetInboxSummaryForCLILocalRes, err error)

func (LocalClient) GetMessagesLocal

func (c LocalClient) GetMessagesLocal(ctx context.Context, __arg GetMessagesLocalArg) (res GetMessagesLocalRes, err error)

func (LocalClient) GetThreadLocal

func (c LocalClient) GetThreadLocal(ctx context.Context, __arg GetThreadLocalArg) (res GetThreadLocalRes, err error)

func (LocalClient) NewConversationLocal

func (c LocalClient) NewConversationLocal(ctx context.Context, __arg NewConversationLocalArg) (res NewConversationLocalRes, err error)

func (LocalClient) PostAttachmentLocal

func (c LocalClient) PostAttachmentLocal(ctx context.Context, __arg PostAttachmentLocalArg) (res PostLocalRes, err error)

func (LocalClient) PostLocal

func (c LocalClient) PostLocal(ctx context.Context, __arg PostLocalArg) (res PostLocalRes, err error)

func (LocalClient) SetConversationStatusLocal

func (c LocalClient) SetConversationStatusLocal(ctx context.Context, __arg SetConversationStatusLocalArg) (res SetConversationStatusLocalRes, err error)

type LocalSource

type LocalSource struct {
	Source   keybase1.Stream `codec:"source" json:"source"`
	Filename string          `codec:"filename" json:"filename"`
	Size     int             `codec:"size" json:"size"`
}

type MarkAsReadArg

type MarkAsReadArg struct {
	ConversationID ConversationID `codec:"conversationID" json:"conversationID"`
	MsgID          MessageID      `codec:"msgID" json:"msgID"`
}

type MarkAsReadRes

type MarkAsReadRes struct {
	RateLimit *RateLimit `codec:"rateLimit,omitempty" json:"rateLimit,omitempty"`
}

type MessageAttachment

type MessageAttachment struct {
	Object   Asset  `codec:"object" json:"object"`
	Preview  *Asset `codec:"preview,omitempty" json:"preview,omitempty"`
	Metadata []byte `codec:"metadata" json:"metadata"`
}

type MessageBody

type MessageBody struct {
	MessageType__ MessageType                  `codec:"messageType" json:"messageType"`
	Text__        *MessageText                 `codec:"text,omitempty" json:"text,omitempty"`
	Attachment__  *MessageAttachment           `codec:"attachment,omitempty" json:"attachment,omitempty"`
	Edit__        *MessageEdit                 `codec:"edit,omitempty" json:"edit,omitempty"`
	Delete__      *MessageDelete               `codec:"delete,omitempty" json:"delete,omitempty"`
	Metadata__    *MessageConversationMetadata `codec:"metadata,omitempty" json:"metadata,omitempty"`
	Headline__    *MessageHeadline             `codec:"headline,omitempty" json:"headline,omitempty"`
}

func NewMessageBodyWithAttachment

func NewMessageBodyWithAttachment(v MessageAttachment) MessageBody

func NewMessageBodyWithDelete

func NewMessageBodyWithDelete(v MessageDelete) MessageBody

func NewMessageBodyWithEdit

func NewMessageBodyWithEdit(v MessageEdit) MessageBody

func NewMessageBodyWithHeadline

func NewMessageBodyWithHeadline(v MessageHeadline) MessageBody

func NewMessageBodyWithMetadata

func NewMessageBodyWithMetadata(v MessageConversationMetadata) MessageBody

func NewMessageBodyWithText

func NewMessageBodyWithText(v MessageText) MessageBody

func (MessageBody) Attachment

func (o MessageBody) Attachment() MessageAttachment

func (MessageBody) Delete

func (o MessageBody) Delete() MessageDelete

func (MessageBody) Edit

func (o MessageBody) Edit() MessageEdit

func (MessageBody) Headline

func (o MessageBody) Headline() MessageHeadline

func (*MessageBody) MessageType

func (o *MessageBody) MessageType() (ret MessageType, err error)

func (MessageBody) Metadata

func (MessageBody) Text

func (o MessageBody) Text() MessageText

type MessageBoxed

type MessageBoxed struct {
	ServerHeader     *MessageServerHeader `codec:"serverHeader,omitempty" json:"serverHeader,omitempty"`
	ClientHeader     MessageClientHeader  `codec:"clientHeader" json:"clientHeader"`
	HeaderCiphertext EncryptedData        `codec:"headerCiphertext" json:"headerCiphertext"`
	BodyCiphertext   EncryptedData        `codec:"bodyCiphertext" json:"bodyCiphertext"`
	KeyGeneration    int                  `codec:"keyGeneration" json:"keyGeneration"`
}

func (MessageBoxed) GetMessageID

func (m MessageBoxed) GetMessageID() MessageID

func (MessageBoxed) GetMessageType

func (m MessageBoxed) GetMessageType() MessageType

type MessageClientHeader

type MessageClientHeader struct {
	Conv         ConversationIDTriple     `codec:"conv" json:"conv"`
	TlfName      string                   `codec:"tlfName" json:"tlfName"`
	TlfPublic    bool                     `codec:"tlfPublic" json:"tlfPublic"`
	MessageType  MessageType              `codec:"messageType" json:"messageType"`
	Supersedes   MessageID                `codec:"supersedes" json:"supersedes"`
	Prev         []MessagePreviousPointer `codec:"prev" json:"prev"`
	Sender       gregor1.UID              `codec:"sender" json:"sender"`
	SenderDevice gregor1.DeviceID         `codec:"senderDevice" json:"senderDevice"`
}

type MessageConversationMetadata

type MessageConversationMetadata struct {
	ConversationTitle string `codec:"conversationTitle" json:"conversationTitle"`
}

type MessageDelete

type MessageDelete struct {
	MessageID MessageID `codec:"messageID" json:"messageID"`
}

type MessageEdit

type MessageEdit struct {
	MessageID MessageID `codec:"messageID" json:"messageID"`
	Body      string    `codec:"body" json:"body"`
}

type MessageHeadline

type MessageHeadline struct {
	Headline string `codec:"headline" json:"headline"`
}

type MessageID

type MessageID uint

func (MessageID) String

func (mid MessageID) String() string

type MessagePlaintext

type MessagePlaintext struct {
	ClientHeader MessageClientHeader `codec:"clientHeader" json:"clientHeader"`
	MessageBody  MessageBody         `codec:"messageBody" json:"messageBody"`
}

type MessagePreviousPointer

type MessagePreviousPointer struct {
	Id   MessageID `codec:"id" json:"id"`
	Hash Hash      `codec:"hash" json:"hash"`
}

type MessageServerHeader

type MessageServerHeader struct {
	MessageID    MessageID    `codec:"messageID" json:"messageID"`
	SupersededBy MessageID    `codec:"supersededBy" json:"supersededBy"`
	Ctime        gregor1.Time `codec:"ctime" json:"ctime"`
}

type MessageText

type MessageText struct {
	Body string `codec:"body" json:"body"`
}

type MessageType

type MessageType int
const (
	MessageType_NONE       MessageType = 0
	MessageType_TEXT       MessageType = 1
	MessageType_ATTACHMENT MessageType = 2
	MessageType_EDIT       MessageType = 3
	MessageType_DELETE     MessageType = 4
	MessageType_METADATA   MessageType = 5
	MessageType_TLFNAME    MessageType = 6
	MessageType_HEADLINE   MessageType = 7
)

func (MessageType) String

func (t MessageType) String() string

type MessageUnboxed

type MessageUnboxed struct {
	State__ MessageUnboxedState  `codec:"state" json:"state"`
	Valid__ *MessageUnboxedValid `codec:"valid,omitempty" json:"valid,omitempty"`
	Error__ *MessageUnboxedError `codec:"error,omitempty" json:"error,omitempty"`
}

func NewMessageUnboxedWithError

func NewMessageUnboxedWithError(v MessageUnboxedError) MessageUnboxed

func NewMessageUnboxedWithValid

func NewMessageUnboxedWithValid(v MessageUnboxedValid) MessageUnboxed

func (MessageUnboxed) Error

func (MessageUnboxed) GetMessageID

func (m MessageUnboxed) GetMessageID() MessageID

func (MessageUnboxed) GetMessageType

func (m MessageUnboxed) GetMessageType() MessageType

func (MessageUnboxed) IsValid

func (m MessageUnboxed) IsValid() bool

func (*MessageUnboxed) State

func (o *MessageUnboxed) State() (ret MessageUnboxedState, err error)

func (MessageUnboxed) Valid

type MessageUnboxedError

type MessageUnboxedError struct {
	ErrMsg      string      `codec:"errMsg" json:"errMsg"`
	MessageID   MessageID   `codec:"messageID" json:"messageID"`
	MessageType MessageType `codec:"messageType" json:"messageType"`
}

type MessageUnboxedState

type MessageUnboxedState int
const (
	MessageUnboxedState_VALID MessageUnboxedState = 1
	MessageUnboxedState_ERROR MessageUnboxedState = 2
)

type MessageUnboxedValid

type MessageUnboxedValid struct {
	ClientHeader     MessageClientHeader `codec:"clientHeader" json:"clientHeader"`
	ServerHeader     MessageServerHeader `codec:"serverHeader" json:"serverHeader"`
	MessageBody      MessageBody         `codec:"messageBody" json:"messageBody"`
	SenderUsername   string              `codec:"senderUsername" json:"senderUsername"`
	SenderDeviceName string              `codec:"senderDeviceName" json:"senderDeviceName"`
	HeaderHash       Hash                `codec:"headerHash" json:"headerHash"`
}

type NewChatActivityArg

type NewChatActivityArg struct {
	Uid      keybase1.UID `codec:"uid" json:"uid"`
	Activity ChatActivity `codec:"activity" json:"activity"`
}

type NewConversationLocalArg

type NewConversationLocalArg struct {
	TlfName       string        `codec:"tlfName" json:"tlfName"`
	TopicType     TopicType     `codec:"topicType" json:"topicType"`
	TlfVisibility TLFVisibility `codec:"tlfVisibility" json:"tlfVisibility"`
	TopicName     *string       `codec:"topicName,omitempty" json:"topicName,omitempty"`
}

type NewConversationLocalRes

type NewConversationLocalRes struct {
	Conv       ConversationLocal `codec:"conv" json:"conv"`
	RateLimits []RateLimit       `codec:"rateLimits" json:"rateLimits"`
}

type NewConversationRemote2Arg

type NewConversationRemote2Arg struct {
	IdTriple   ConversationIDTriple `codec:"idTriple" json:"idTriple"`
	TLFMessage MessageBoxed         `codec:"TLFMessage" json:"TLFMessage"`
}

type NewConversationRemoteArg

type NewConversationRemoteArg struct {
	IdTriple ConversationIDTriple `codec:"idTriple" json:"idTriple"`
}

type NewConversationRemoteRes

type NewConversationRemoteRes struct {
	ConvID    ConversationID `codec:"convID" json:"convID"`
	RateLimit *RateLimit     `codec:"rateLimit,omitempty" json:"rateLimit,omitempty"`
}

type NewMessagePayload

type NewMessagePayload struct {
	Action  string         `codec:"Action" json:"Action"`
	ConvID  ConversationID `codec:"convID" json:"convID"`
	Message MessageBoxed   `codec:"message" json:"message"`
}

type NotifyChatClient

type NotifyChatClient struct {
	Cli rpc.GenericClient
}

func (NotifyChatClient) NewChatActivity

func (c NotifyChatClient) NewChatActivity(ctx context.Context, __arg NewChatActivityArg) (err error)

type NotifyChatInterface

type NotifyChatInterface interface {
	NewChatActivity(context.Context, NewChatActivityArg) error
}

type Pagination

type Pagination struct {
	Next     []byte `codec:"next" json:"next"`
	Previous []byte `codec:"previous" json:"previous"`
	Num      int    `codec:"num" json:"num"`
	Last     bool   `codec:"last" json:"last"`
}

type PostAttachmentLocalArg

type PostAttachmentLocalArg struct {
	SessionID      int                 `codec:"sessionID" json:"sessionID"`
	ConversationID ConversationID      `codec:"conversationID" json:"conversationID"`
	ClientHeader   MessageClientHeader `codec:"clientHeader" json:"clientHeader"`
	Attachment     LocalSource         `codec:"attachment" json:"attachment"`
	Preview        *LocalSource        `codec:"preview,omitempty" json:"preview,omitempty"`
}

type PostLocalArg

type PostLocalArg struct {
	ConversationID ConversationID   `codec:"conversationID" json:"conversationID"`
	Msg            MessagePlaintext `codec:"msg" json:"msg"`
}

type PostLocalRes

type PostLocalRes struct {
	RateLimits []RateLimit `codec:"rateLimits" json:"rateLimits"`
}

type PostRemoteArg

type PostRemoteArg struct {
	ConversationID ConversationID `codec:"conversationID" json:"conversationID"`
	MessageBoxed   MessageBoxed   `codec:"messageBoxed" json:"messageBoxed"`
}

type PostRemoteRes

type PostRemoteRes struct {
	MsgHeader MessageServerHeader `codec:"msgHeader" json:"msgHeader"`
	RateLimit *RateLimit          `codec:"rateLimit,omitempty" json:"rateLimit,omitempty"`
}

type RateLimit

type RateLimit struct {
	Name           string `codec:"name" json:"name"`
	CallsRemaining int    `codec:"callsRemaining" json:"callsRemaining"`
	WindowReset    int    `codec:"windowReset" json:"windowReset"`
	MaxCalls       int    `codec:"maxCalls" json:"maxCalls"`
}

type RemoteClient

type RemoteClient struct {
	Cli rpc.GenericClient
}

func (RemoteClient) GetInboxRemote

func (c RemoteClient) GetInboxRemote(ctx context.Context, __arg GetInboxRemoteArg) (res GetInboxRemoteRes, err error)

func (RemoteClient) GetMessagesRemote

func (c RemoteClient) GetMessagesRemote(ctx context.Context, __arg GetMessagesRemoteArg) (res GetMessagesRemoteRes, err error)

func (RemoteClient) GetS3Params

func (c RemoteClient) GetS3Params(ctx context.Context, conversationID ConversationID) (res S3Params, err error)

func (RemoteClient) GetThreadRemote

func (c RemoteClient) GetThreadRemote(ctx context.Context, __arg GetThreadRemoteArg) (res GetThreadRemoteRes, err error)

func (RemoteClient) MarkAsRead

func (c RemoteClient) MarkAsRead(ctx context.Context, __arg MarkAsReadArg) (res MarkAsReadRes, err error)

func (RemoteClient) NewConversationRemote

func (c RemoteClient) NewConversationRemote(ctx context.Context, idTriple ConversationIDTriple) (res NewConversationRemoteRes, err error)

func (RemoteClient) NewConversationRemote2

func (c RemoteClient) NewConversationRemote2(ctx context.Context, __arg NewConversationRemote2Arg) (res NewConversationRemoteRes, err error)

func (RemoteClient) PostRemote

func (c RemoteClient) PostRemote(ctx context.Context, __arg PostRemoteArg) (res PostRemoteRes, err error)

func (RemoteClient) S3Sign

func (c RemoteClient) S3Sign(ctx context.Context, __arg S3SignArg) (res []byte, err error)

func (RemoteClient) SetConversationStatus

func (c RemoteClient) SetConversationStatus(ctx context.Context, __arg SetConversationStatusArg) (res SetConversationStatusRes, err error)

func (RemoteClient) TlfFinalize

func (c RemoteClient) TlfFinalize(ctx context.Context, tlfID TLFID) (err error)

type S3Params

type S3Params struct {
	Bucket               string `codec:"bucket" json:"bucket"`
	ObjectKey            string `codec:"objectKey" json:"objectKey"`
	AccessKey            string `codec:"accessKey" json:"accessKey"`
	Acl                  string `codec:"acl" json:"acl"`
	RegionName           string `codec:"regionName" json:"regionName"`
	RegionEndpoint       string `codec:"regionEndpoint" json:"regionEndpoint"`
	RegionBucketEndpoint string `codec:"regionBucketEndpoint" json:"regionBucketEndpoint"`
}

type S3SignArg

type S3SignArg struct {
	Version int    `codec:"version" json:"version"`
	Payload []byte `codec:"payload" json:"payload"`
}

type SetConversationStatusArg

type SetConversationStatusArg struct {
	ConversationID ConversationID     `codec:"conversationID" json:"conversationID"`
	Status         ConversationStatus `codec:"status" json:"status"`
}

type SetConversationStatusLocalArg

type SetConversationStatusLocalArg struct {
	ConversationID ConversationID     `codec:"conversationID" json:"conversationID"`
	Status         ConversationStatus `codec:"status" json:"status"`
}

type SetConversationStatusLocalRes

type SetConversationStatusLocalRes struct {
	RateLimits []RateLimit `codec:"rateLimits" json:"rateLimits"`
}

type SetConversationStatusRes

type SetConversationStatusRes struct {
	RateLimit *RateLimit `codec:"rateLimit,omitempty" json:"rateLimit,omitempty"`
}

type SignatureInfo

type SignatureInfo struct {
	V int    `codec:"v" json:"v"`
	S []byte `codec:"s" json:"s"`
	K []byte `codec:"k" json:"k"`
}

type TLFID

type TLFID []byte

func MakeTLFID

func MakeTLFID(val string) (TLFID, error)

func (TLFID) Eq

func (id TLFID) Eq(other TLFID) bool

Eq compares two TLFIDs

func (TLFID) EqString

func (id TLFID) EqString(other fmt.Stringer) bool

EqString is like EqualsTo, except that it accepts a fmt.Stringer. This can be useful for comparing keybase1.TLFID and chat1.TLFID.

func (TLFID) String

func (id TLFID) String() string

type TLFVisibility

type TLFVisibility int
const (
	TLFVisibility_ANY     TLFVisibility = 0
	TLFVisibility_PUBLIC  TLFVisibility = 1
	TLFVisibility_PRIVATE TLFVisibility = 2
)

type ThreadID

type ThreadID []byte

type ThreadView

type ThreadView struct {
	Messages   []MessageUnboxed `codec:"messages" json:"messages"`
	Pagination *Pagination      `codec:"pagination,omitempty" json:"pagination,omitempty"`
}

type ThreadViewBoxed

type ThreadViewBoxed struct {
	Messages   []MessageBoxed `codec:"messages" json:"messages"`
	Pagination *Pagination    `codec:"pagination,omitempty" json:"pagination,omitempty"`
}

type TlfFinalizeArg

type TlfFinalizeArg struct {
	TlfID TLFID `codec:"tlfID" json:"tlfID"`
}

type TopicID

type TopicID []byte

func MakeTopicID

func MakeTopicID(val string) (TopicID, error)

func (TopicID) String

func (t TopicID) String() string

type TopicType

type TopicType int
const (
	TopicType_NONE TopicType = 0
	TopicType_CHAT TopicType = 1
	TopicType_DEV  TopicType = 2
)

func MakeTopicType

func MakeTopicType(val int64) TopicType

func (TopicType) String

func (t TopicType) String() string

type UnreadFirstNumLimit

type UnreadFirstNumLimit struct {
	NumRead int `codec:"NumRead" json:"NumRead"`
	AtLeast int `codec:"AtLeast" json:"AtLeast"`
	AtMost  int `codec:"AtMost" json:"AtMost"`
}

Jump to

Keyboard shortcuts

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