messengertypes

package
Version: v2.300.0 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2021 License: Apache-2.0, MIT Imports: 19 Imported by: 0

Documentation

Overview

Package messengertypes is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var AppMessage_Type_name = map[int32]string{
	0:   "Undefined",
	1:   "TypeUserMessage",
	2:   "TypeUserReaction",
	3:   "TypeGroupInvitation",
	4:   "TypeSetGroupInfo",
	5:   "TypeSetUserInfo",
	6:   "TypeAcknowledge",
	7:   "TypeReplyOptions",
	100: "TypeMonitorMetadata",
}
View Source
var AppMessage_Type_value = map[string]int32{
	"Undefined":           0,
	"TypeUserMessage":     1,
	"TypeUserReaction":    2,
	"TypeGroupInvitation": 3,
	"TypeSetGroupInfo":    4,
	"TypeSetUserInfo":     5,
	"TypeAcknowledge":     6,
	"TypeReplyOptions":    7,
	"TypeMonitorMetadata": 100,
}
View Source
var BertyLink_Kind_name = map[int32]string{
	0: "UnknownKind",
	1: "ContactInviteV1Kind",
	2: "GroupV1Kind",
	3: "EncryptedV1Kind",
}
View Source
var BertyLink_Kind_value = map[string]int32{
	"UnknownKind":         0,
	"ContactInviteV1Kind": 1,
	"GroupV1Kind":         2,
	"EncryptedV1Kind":     3,
}
View Source
var Contact_State_name = map[int32]string{
	0: "Undefined",
	1: "IncomingRequest",
	2: "OutgoingRequestEnqueued",
	3: "OutgoingRequestSent",
	4: "Accepted",
}
View Source
var Contact_State_value = map[string]int32{
	"Undefined":               0,
	"IncomingRequest":         1,
	"OutgoingRequestEnqueued": 2,
	"OutgoingRequestSent":     3,
	"Accepted":                4,
}
View Source
var Conversation_Type_name = map[int32]string{
	0: "Undefined",
	1: "AccountType",
	2: "ContactType",
	3: "MultiMemberType",
}
View Source
var Conversation_Type_value = map[string]int32{
	"Undefined":       0,
	"AccountType":     1,
	"ContactType":     2,
	"MultiMemberType": 3,
}
View Source
var MediaMetadataType_name = map[int32]string{
	0: "MetadataUnknown",
	1: "MetadataKeyValue",
	2: "MetadataAudioPreview",
}
View Source
var MediaMetadataType_value = map[string]int32{
	"MetadataUnknown":      0,
	"MetadataKeyValue":     1,
	"MetadataAudioPreview": 2,
}
View Source
var Media_State_name = map[int32]string{
	0:   "StateUnknown",
	1:   "StateNeverDownloaded",
	2:   "StatePartiallyDownloaded",
	3:   "StateDownloaded",
	4:   "StateInCache",
	5:   "StateInvalidCrypto",
	100: "StatePrepared",
	101: "StateAttached",
}
View Source
var Media_State_value = map[string]int32{
	"StateUnknown":             0,
	"StateNeverDownloaded":     1,
	"StatePartiallyDownloaded": 2,
	"StateDownloaded":          3,
	"StateInCache":             4,
	"StateInvalidCrypto":       5,
	"StatePrepared":            100,
	"StateAttached":            101,
}
View Source
var StreamEvent_Notified_Type_name = map[int32]string{
	0: "Unknown",
	1: "TypeBasic",
	2: "TypeMessageReceived",
	3: "TypeContactRequestSent",
	4: "TypeContactRequestReceived",
}
View Source
var StreamEvent_Notified_Type_value = map[string]int32{
	"Unknown":                    0,
	"TypeBasic":                  1,
	"TypeMessageReceived":        2,
	"TypeContactRequestSent":     3,
	"TypeContactRequestReceived": 4,
}
View Source
var StreamEvent_Type_name = map[int32]string{
	0:  "Undefined",
	1:  "TypeListEnded",
	2:  "TypeConversationUpdated",
	3:  "TypeConversationDeleted",
	4:  "TypeInteractionUpdated",
	5:  "TypeInteractionDeleted",
	6:  "TypeContactUpdated",
	7:  "TypeAccountUpdated",
	8:  "TypeMemberUpdated",
	9:  "TypeDeviceUpdated",
	10: "TypeNotified",
	11: "TypeMediaUpdated",
	12: "TypeConversationPartialLoad",
}
View Source
var StreamEvent_Type_value = map[string]int32{
	"Undefined":                   0,
	"TypeListEnded":               1,
	"TypeConversationUpdated":     2,
	"TypeConversationDeleted":     3,
	"TypeInteractionUpdated":      4,
	"TypeInteractionDeleted":      5,
	"TypeContactUpdated":          6,
	"TypeAccountUpdated":          7,
	"TypeMemberUpdated":           8,
	"TypeDeviceUpdated":           9,
	"TypeNotified":                10,
	"TypeMediaUpdated":            11,
	"TypeConversationPartialLoad": 12,
}

Functions

func RegisterMessengerServiceHandler

func RegisterMessengerServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterMessengerServiceHandler registers the http handlers for service MessengerService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterMessengerServiceHandlerClient

func RegisterMessengerServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MessengerServiceClient) error

RegisterMessengerServiceHandlerClient registers the http handlers for service MessengerService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MessengerServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MessengerServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "MessengerServiceClient" to call the correct interceptors.

func RegisterMessengerServiceHandlerFromEndpoint

func RegisterMessengerServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterMessengerServiceHandlerFromEndpoint is same as RegisterMessengerServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterMessengerServiceHandlerServer

func RegisterMessengerServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MessengerServiceServer) error

RegisterMessengerServiceHandlerServer registers the http handlers for service MessengerService to "mux". UnaryRPC :call MessengerServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterMessengerServiceHandlerFromEndpoint instead.

func RegisterMessengerServiceServer

func RegisterMessengerServiceServer(s *grpc.Server, srv MessengerServiceServer)

Types

type Account

type Account struct {
	PublicKey                       string          `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty" gorm:"primaryKey"`
	DisplayName                     string          `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
	AvatarCID                       string          `protobuf:"bytes,7,opt,name=avatar_cid,json=avatarCid,proto3" json:"avatar_cid,omitempty" gorm:"column:avatar_cid"`
	Link                            string          `protobuf:"bytes,3,opt,name=link,proto3" json:"link,omitempty"`
	ServiceTokens                   []*ServiceToken `` /* 128-byte string literal not displayed */
	ReplicateNewGroupsAutomatically bool            `` /* 179-byte string literal not displayed */
}

func (*Account) Descriptor

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

func (*Account) GetAvatarCID

func (m *Account) GetAvatarCID() string

func (*Account) GetDisplayName

func (m *Account) GetDisplayName() string
func (m *Account) GetLink() string

func (*Account) GetPublicKey

func (m *Account) GetPublicKey() string

func (*Account) GetReplicateNewGroupsAutomatically

func (m *Account) GetReplicateNewGroupsAutomatically() bool

func (*Account) GetServiceTokens

func (m *Account) GetServiceTokens() []*ServiceToken

func (*Account) ProtoMessage

func (*Account) ProtoMessage()

func (*Account) Reset

func (m *Account) Reset()

func (*Account) String

func (m *Account) String() string

func (*Account) XXX_DiscardUnknown

func (m *Account) XXX_DiscardUnknown()

func (*Account) XXX_Marshal

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

func (*Account) XXX_Merge

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

func (*Account) XXX_Size

func (m *Account) XXX_Size() int

func (*Account) XXX_Unmarshal

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

type AccountGet

type AccountGet struct{}

func (*AccountGet) Descriptor

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

func (*AccountGet) ProtoMessage

func (*AccountGet) ProtoMessage()

func (*AccountGet) Reset

func (m *AccountGet) Reset()

func (*AccountGet) String

func (m *AccountGet) String() string

func (*AccountGet) XXX_DiscardUnknown

func (m *AccountGet) XXX_DiscardUnknown()

func (*AccountGet) XXX_Marshal

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

func (*AccountGet) XXX_Merge

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

func (*AccountGet) XXX_Size

func (m *AccountGet) XXX_Size() int

func (*AccountGet) XXX_Unmarshal

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

type AccountGet_Reply

type AccountGet_Reply struct {
	Account *Account `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
}

func (*AccountGet_Reply) Descriptor

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

func (*AccountGet_Reply) GetAccount

func (m *AccountGet_Reply) GetAccount() *Account

func (*AccountGet_Reply) ProtoMessage

func (*AccountGet_Reply) ProtoMessage()

func (*AccountGet_Reply) Reset

func (m *AccountGet_Reply) Reset()

func (*AccountGet_Reply) String

func (m *AccountGet_Reply) String() string

func (*AccountGet_Reply) XXX_DiscardUnknown

func (m *AccountGet_Reply) XXX_DiscardUnknown()

func (*AccountGet_Reply) XXX_Marshal

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

func (*AccountGet_Reply) XXX_Merge

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

func (*AccountGet_Reply) XXX_Size

func (m *AccountGet_Reply) XXX_Size() int

func (*AccountGet_Reply) XXX_Unmarshal

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

type AccountGet_Request

type AccountGet_Request struct{}

func (*AccountGet_Request) Descriptor

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

func (*AccountGet_Request) ProtoMessage

func (*AccountGet_Request) ProtoMessage()

func (*AccountGet_Request) Reset

func (m *AccountGet_Request) Reset()

func (*AccountGet_Request) String

func (m *AccountGet_Request) String() string

func (*AccountGet_Request) XXX_DiscardUnknown

func (m *AccountGet_Request) XXX_DiscardUnknown()

func (*AccountGet_Request) XXX_Marshal

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

func (*AccountGet_Request) XXX_Merge

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

func (*AccountGet_Request) XXX_Size

func (m *AccountGet_Request) XXX_Size() int

func (*AccountGet_Request) XXX_Unmarshal

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

type AccountUpdate

type AccountUpdate struct{}

func (*AccountUpdate) Descriptor

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

func (*AccountUpdate) ProtoMessage

func (*AccountUpdate) ProtoMessage()

func (*AccountUpdate) Reset

func (m *AccountUpdate) Reset()

func (*AccountUpdate) String

func (m *AccountUpdate) String() string

func (*AccountUpdate) XXX_DiscardUnknown

func (m *AccountUpdate) XXX_DiscardUnknown()

func (*AccountUpdate) XXX_Marshal

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

func (*AccountUpdate) XXX_Merge

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

func (*AccountUpdate) XXX_Size

func (m *AccountUpdate) XXX_Size() int

func (*AccountUpdate) XXX_Unmarshal

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

type AccountUpdate_Reply

type AccountUpdate_Reply struct{}

func (*AccountUpdate_Reply) Descriptor

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

func (*AccountUpdate_Reply) ProtoMessage

func (*AccountUpdate_Reply) ProtoMessage()

func (*AccountUpdate_Reply) Reset

func (m *AccountUpdate_Reply) Reset()

func (*AccountUpdate_Reply) String

func (m *AccountUpdate_Reply) String() string

func (*AccountUpdate_Reply) XXX_DiscardUnknown

func (m *AccountUpdate_Reply) XXX_DiscardUnknown()

func (*AccountUpdate_Reply) XXX_Marshal

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

func (*AccountUpdate_Reply) XXX_Merge

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

func (*AccountUpdate_Reply) XXX_Size

func (m *AccountUpdate_Reply) XXX_Size() int

func (*AccountUpdate_Reply) XXX_Unmarshal

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

type AccountUpdate_Request

type AccountUpdate_Request struct {
	DisplayName string `protobuf:"bytes,1,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
	AvatarCID   string `protobuf:"bytes,2,opt,name=avatar_cid,json=avatarCid,proto3" json:"avatar_cid,omitempty" gorm:"column:avatar_cid"`
}

func (*AccountUpdate_Request) Descriptor

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

func (*AccountUpdate_Request) GetAvatarCID

func (m *AccountUpdate_Request) GetAvatarCID() string

func (*AccountUpdate_Request) GetDisplayName

func (m *AccountUpdate_Request) GetDisplayName() string

func (*AccountUpdate_Request) ProtoMessage

func (*AccountUpdate_Request) ProtoMessage()

func (*AccountUpdate_Request) Reset

func (m *AccountUpdate_Request) Reset()

func (*AccountUpdate_Request) String

func (m *AccountUpdate_Request) String() string

func (*AccountUpdate_Request) XXX_DiscardUnknown

func (m *AccountUpdate_Request) XXX_DiscardUnknown()

func (*AccountUpdate_Request) XXX_Marshal

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

func (*AccountUpdate_Request) XXX_Merge

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

func (*AccountUpdate_Request) XXX_Size

func (m *AccountUpdate_Request) XXX_Size() int

func (*AccountUpdate_Request) XXX_Unmarshal

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

type AppMessage

type AppMessage struct {
	Type      AppMessage_Type `protobuf:"varint,1,opt,name=type,proto3,enum=berty.messenger.v1.AppMessage_Type" json:"type,omitempty"`
	Payload   []byte          `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
	SentDate  int64           `protobuf:"varint,3,opt,name=sent_date,json=sentDate,proto3" json:"sentDate"`
	Medias    []*Media        `protobuf:"bytes,4,rep,name=medias,proto3" json:"medias,omitempty"`
	TargetCID string          `protobuf:"bytes,5,opt,name=target_cid,json=targetCid,proto3" json:"target_cid,omitempty"`
}

AppMessage is the app layer format

func UnmarshalAppMessage

func UnmarshalAppMessage(payload []byte) (proto.Message, AppMessage, error)

func (*AppMessage) Descriptor

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

func (*AppMessage) GetMedias

func (m *AppMessage) GetMedias() []*Media

func (*AppMessage) GetPayload

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

func (*AppMessage) GetSentDate

func (m *AppMessage) GetSentDate() int64

func (*AppMessage) GetTargetCID

func (m *AppMessage) GetTargetCID() string

func (*AppMessage) GetType

func (m *AppMessage) GetType() AppMessage_Type

func (*AppMessage) ProtoMessage

func (*AppMessage) ProtoMessage()

func (*AppMessage) Reset

func (m *AppMessage) Reset()

func (*AppMessage) String

func (m *AppMessage) String() string

func (*AppMessage) TextRepresentation

func (am *AppMessage) TextRepresentation() (string, error)

func (AppMessage) UnmarshalPayload

func (am AppMessage) UnmarshalPayload() (proto.Message, error)

UnmarshalPayload tries to parse an AppMessage payload in the corresponding type. Since this function returns a proto.Message interface, you still need to cast the returned value, but this function allows you to make it safely.

func (*AppMessage) XXX_DiscardUnknown

func (m *AppMessage) XXX_DiscardUnknown()

func (*AppMessage) XXX_Marshal

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

func (*AppMessage) XXX_Merge

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

func (*AppMessage) XXX_Size

func (m *AppMessage) XXX_Size() int

func (*AppMessage) XXX_Unmarshal

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

type AppMessage_Acknowledge

type AppMessage_Acknowledge struct{}

func (*AppMessage_Acknowledge) Descriptor

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

func (*AppMessage_Acknowledge) ProtoMessage

func (*AppMessage_Acknowledge) ProtoMessage()

func (*AppMessage_Acknowledge) Reset

func (m *AppMessage_Acknowledge) Reset()

func (*AppMessage_Acknowledge) String

func (m *AppMessage_Acknowledge) String() string

func (*AppMessage_Acknowledge) XXX_DiscardUnknown

func (m *AppMessage_Acknowledge) XXX_DiscardUnknown()

func (*AppMessage_Acknowledge) XXX_Marshal

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

func (*AppMessage_Acknowledge) XXX_Merge

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

func (*AppMessage_Acknowledge) XXX_Size

func (m *AppMessage_Acknowledge) XXX_Size() int

func (*AppMessage_Acknowledge) XXX_Unmarshal

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

type AppMessage_GroupInvitation

type AppMessage_GroupInvitation struct {
	Link string `protobuf:"bytes,2,opt,name=link,proto3" json:"link,omitempty"`
}

func (*AppMessage_GroupInvitation) Descriptor

func (*AppMessage_GroupInvitation) Descriptor() ([]byte, []int)
func (m *AppMessage_GroupInvitation) GetLink() string

func (*AppMessage_GroupInvitation) ProtoMessage

func (*AppMessage_GroupInvitation) ProtoMessage()

func (*AppMessage_GroupInvitation) Reset

func (m *AppMessage_GroupInvitation) Reset()

func (*AppMessage_GroupInvitation) String

func (m *AppMessage_GroupInvitation) String() string

func (*AppMessage_GroupInvitation) XXX_DiscardUnknown

func (m *AppMessage_GroupInvitation) XXX_DiscardUnknown()

func (*AppMessage_GroupInvitation) XXX_Marshal

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

func (*AppMessage_GroupInvitation) XXX_Merge

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

func (*AppMessage_GroupInvitation) XXX_Size

func (m *AppMessage_GroupInvitation) XXX_Size() int

func (*AppMessage_GroupInvitation) XXX_Unmarshal

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

type AppMessage_MonitorMetadata

type AppMessage_MonitorMetadata struct {
	Event *protocoltypes.MonitorGroup_EventMonitor `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"`
}

func (*AppMessage_MonitorMetadata) Descriptor

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

func (*AppMessage_MonitorMetadata) GetEvent

func (*AppMessage_MonitorMetadata) ProtoMessage

func (*AppMessage_MonitorMetadata) ProtoMessage()

func (*AppMessage_MonitorMetadata) Reset

func (m *AppMessage_MonitorMetadata) Reset()

func (*AppMessage_MonitorMetadata) String

func (m *AppMessage_MonitorMetadata) String() string

func (*AppMessage_MonitorMetadata) XXX_DiscardUnknown

func (m *AppMessage_MonitorMetadata) XXX_DiscardUnknown()

func (*AppMessage_MonitorMetadata) XXX_Marshal

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

func (*AppMessage_MonitorMetadata) XXX_Merge

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

func (*AppMessage_MonitorMetadata) XXX_Size

func (m *AppMessage_MonitorMetadata) XXX_Size() int

func (*AppMessage_MonitorMetadata) XXX_Unmarshal

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

type AppMessage_ReplyOptions

type AppMessage_ReplyOptions struct {
	Options []*ReplyOption `protobuf:"bytes,1,rep,name=options,proto3" json:"options,omitempty"`
}

func (*AppMessage_ReplyOptions) Descriptor

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

func (*AppMessage_ReplyOptions) GetOptions

func (m *AppMessage_ReplyOptions) GetOptions() []*ReplyOption

func (*AppMessage_ReplyOptions) ProtoMessage

func (*AppMessage_ReplyOptions) ProtoMessage()

func (*AppMessage_ReplyOptions) Reset

func (m *AppMessage_ReplyOptions) Reset()

func (*AppMessage_ReplyOptions) String

func (m *AppMessage_ReplyOptions) String() string

func (*AppMessage_ReplyOptions) XXX_DiscardUnknown

func (m *AppMessage_ReplyOptions) XXX_DiscardUnknown()

func (*AppMessage_ReplyOptions) XXX_Marshal

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

func (*AppMessage_ReplyOptions) XXX_Merge

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

func (*AppMessage_ReplyOptions)