2020-10-02 14:43:43 +00:00
|
|
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
|
|
// source: chat_identity.proto
|
|
|
|
|
|
|
|
package protobuf
|
|
|
|
|
|
|
|
import (
|
|
|
|
fmt "fmt"
|
|
|
|
proto "github.com/golang/protobuf/proto"
|
|
|
|
math "math"
|
|
|
|
)
|
|
|
|
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
|
|
var _ = proto.Marshal
|
|
|
|
var _ = fmt.Errorf
|
|
|
|
var _ = math.Inf
|
|
|
|
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
|
|
// is compatible with the proto package it is being compiled against.
|
|
|
|
// A compilation error at this line likely means your copy of the
|
|
|
|
// proto package needs to be updated.
|
|
|
|
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
|
|
|
|
|
|
|
// SourceType are the predefined types of image source allowed
|
|
|
|
type IdentityImage_SourceType int32
|
|
|
|
|
|
|
|
const (
|
|
|
|
IdentityImage_UNKNOWN_SOURCE_TYPE IdentityImage_SourceType = 0
|
|
|
|
// RAW_PAYLOAD image byte data
|
|
|
|
IdentityImage_RAW_PAYLOAD IdentityImage_SourceType = 1
|
|
|
|
// ENS_AVATAR uses the ENS record's resolver get-text-data.avatar data
|
|
|
|
// The `payload` field will be ignored if ENS_AVATAR is selected
|
|
|
|
// The application will read and parse the ENS avatar data as image payload data, URLs will be ignored
|
|
|
|
// The parent `ChatMessageIdentity` must have a valid `ens_name` set
|
|
|
|
IdentityImage_ENS_AVATAR IdentityImage_SourceType = 2
|
|
|
|
)
|
|
|
|
|
|
|
|
var IdentityImage_SourceType_name = map[int32]string{
|
|
|
|
0: "UNKNOWN_SOURCE_TYPE",
|
|
|
|
1: "RAW_PAYLOAD",
|
|
|
|
2: "ENS_AVATAR",
|
|
|
|
}
|
|
|
|
|
|
|
|
var IdentityImage_SourceType_value = map[string]int32{
|
|
|
|
"UNKNOWN_SOURCE_TYPE": 0,
|
|
|
|
"RAW_PAYLOAD": 1,
|
|
|
|
"ENS_AVATAR": 2,
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x IdentityImage_SourceType) String() string {
|
|
|
|
return proto.EnumName(IdentityImage_SourceType_name, int32(x))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (IdentityImage_SourceType) EnumDescriptor() ([]byte, []int) {
|
|
|
|
return fileDescriptor_7a652489000a5879, []int{1, 0}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ChatIdentity represents the user defined identity associated with their public chat key
|
|
|
|
type ChatIdentity struct {
|
|
|
|
// Lamport timestamp of the message
|
|
|
|
Clock uint64 `protobuf:"varint,1,opt,name=clock,proto3" json:"clock,omitempty"`
|
|
|
|
// ens_name is the valid ENS name associated with the chat key
|
|
|
|
EnsName string `protobuf:"bytes,2,opt,name=ens_name,json=ensName,proto3" json:"ens_name,omitempty"`
|
|
|
|
// images is a string indexed mapping of images associated with an identity
|
2020-11-18 09:16:51 +00:00
|
|
|
Images map[string]*IdentityImage `protobuf:"bytes,3,rep,name=images,proto3" json:"images,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
|
|
|
// display name is the user set identity, valid only for organisations
|
|
|
|
DisplayName string `protobuf:"bytes,4,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
|
|
|
|
// description is the user set description, valid only for organisations
|
|
|
|
Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"`
|
|
|
|
Color string `protobuf:"bytes,6,opt,name=color,proto3" json:"color,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
2020-10-02 14:43:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (m *ChatIdentity) Reset() { *m = ChatIdentity{} }
|
|
|
|
func (m *ChatIdentity) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*ChatIdentity) ProtoMessage() {}
|
|
|
|
func (*ChatIdentity) Descriptor() ([]byte, []int) {
|
|
|
|
return fileDescriptor_7a652489000a5879, []int{0}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *ChatIdentity) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_ChatIdentity.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *ChatIdentity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_ChatIdentity.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (m *ChatIdentity) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_ChatIdentity.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *ChatIdentity) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_ChatIdentity.Size(m)
|
|
|
|
}
|
|
|
|
func (m *ChatIdentity) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_ChatIdentity.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_ChatIdentity proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *ChatIdentity) GetClock() uint64 {
|
|
|
|
if m != nil {
|
|
|
|
return m.Clock
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *ChatIdentity) GetEnsName() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.EnsName
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *ChatIdentity) GetImages() map[string]*IdentityImage {
|
|
|
|
if m != nil {
|
|
|
|
return m.Images
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2020-11-18 09:16:51 +00:00
|
|
|
func (m *ChatIdentity) GetDisplayName() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.DisplayName
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *ChatIdentity) GetDescription() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Description
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *ChatIdentity) GetColor() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Color
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2020-10-02 14:43:43 +00:00
|
|
|
// ProfileImage represents data associated with a user's profile image
|
|
|
|
type IdentityImage struct {
|
|
|
|
// payload is a context based payload for the profile image data,
|
|
|
|
// context is determined by the `source_type`
|
|
|
|
Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
|
|
|
|
// source_type signals the image payload source
|
|
|
|
SourceType IdentityImage_SourceType `protobuf:"varint,2,opt,name=source_type,json=sourceType,proto3,enum=protobuf.IdentityImage_SourceType" json:"source_type,omitempty"`
|
|
|
|
// image_type signals the image type and method of parsing the payload
|
2021-02-09 13:52:21 +00:00
|
|
|
ImageType ImageType `protobuf:"varint,3,opt,name=image_type,json=imageType,proto3,enum=protobuf.ImageType" json:"image_type,omitempty"`
|
|
|
|
// encryption_keys is a list of encrypted keys that can be used to decrypted an encrypted payload
|
2021-02-11 17:07:11 +00:00
|
|
|
EncryptionKeys [][]byte `protobuf:"bytes,4,rep,name=encryption_keys,json=encryptionKeys,proto3" json:"encryption_keys,omitempty"`
|
|
|
|
// encrypted signals the encryption state of the payload, default is false.
|
|
|
|
Encrypted bool `protobuf:"varint,5,opt,name=encrypted,proto3" json:"encrypted,omitempty"`
|
2021-02-09 13:52:21 +00:00
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
2020-10-02 14:43:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (m *IdentityImage) Reset() { *m = IdentityImage{} }
|
|
|
|
func (m *IdentityImage) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*IdentityImage) ProtoMessage() {}
|
|
|
|
func (*IdentityImage) Descriptor() ([]byte, []int) {
|
|
|
|
return fileDescriptor_7a652489000a5879, []int{1}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *IdentityImage) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_IdentityImage.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *IdentityImage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_IdentityImage.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (m *IdentityImage) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_IdentityImage.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *IdentityImage) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_IdentityImage.Size(m)
|
|
|
|
}
|
|
|
|
func (m *IdentityImage) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_IdentityImage.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_IdentityImage proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *IdentityImage) GetPayload() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.Payload
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *IdentityImage) GetSourceType() IdentityImage_SourceType {
|
|
|
|
if m != nil {
|
|
|
|
return m.SourceType
|
|
|
|
}
|
|
|
|
return IdentityImage_UNKNOWN_SOURCE_TYPE
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *IdentityImage) GetImageType() ImageType {
|
|
|
|
if m != nil {
|
|
|
|
return m.ImageType
|
|
|
|
}
|
|
|
|
return ImageType_UNKNOWN_IMAGE_TYPE
|
|
|
|
}
|
|
|
|
|
2021-02-09 13:52:21 +00:00
|
|
|
func (m *IdentityImage) GetEncryptionKeys() [][]byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.EncryptionKeys
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2021-02-11 17:07:11 +00:00
|
|
|
func (m *IdentityImage) GetEncrypted() bool {
|
|
|
|
if m != nil {
|
|
|
|
return m.Encrypted
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
2020-10-02 14:43:43 +00:00
|
|
|
func init() {
|
|
|
|
proto.RegisterEnum("protobuf.IdentityImage_SourceType", IdentityImage_SourceType_name, IdentityImage_SourceType_value)
|
|
|
|
proto.RegisterType((*ChatIdentity)(nil), "protobuf.ChatIdentity")
|
|
|
|
proto.RegisterMapType((map[string]*IdentityImage)(nil), "protobuf.ChatIdentity.ImagesEntry")
|
|
|
|
proto.RegisterType((*IdentityImage)(nil), "protobuf.IdentityImage")
|
|
|
|
}
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
proto.RegisterFile("chat_identity.proto", fileDescriptor_7a652489000a5879)
|
|
|
|
}
|
|
|
|
|
|
|
|
var fileDescriptor_7a652489000a5879 = []byte{
|
2021-02-11 17:07:11 +00:00
|
|
|
// 425 bytes of a gzipped FileDescriptorProto
|
|
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x90, 0xc1, 0x6e, 0xd3, 0x40,
|
|
|
|
0x10, 0x86, 0xb1, 0x9d, 0xa4, 0xc9, 0x6c, 0x9a, 0x46, 0x1b, 0xa4, 0x9a, 0x8a, 0x83, 0xc9, 0x85,
|
|
|
|
0x5c, 0x30, 0x52, 0xb8, 0xa0, 0x72, 0x32, 0x21, 0x48, 0x55, 0x91, 0x53, 0x6d, 0x52, 0xaa, 0x72,
|
|
|
|
0xb1, 0xb6, 0xf6, 0x42, 0xad, 0x38, 0xb6, 0xe5, 0xdd, 0x20, 0xed, 0x2b, 0x71, 0xe3, 0x0d, 0x51,
|
|
|
|
0x67, 0x6d, 0xec, 0x9e, 0x76, 0xe6, 0x9f, 0x99, 0x6f, 0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