account

package
v0.0.0-...-e41513e Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2020 License: Apache-2.0 Imports: 15 Imported by: 3

Documentation

Overview

Package account is a generated protocol buffer package.

It is generated from these files:

privacy_rules_data.proto

It has these top-level messages:

PrivacyRuleData
PrivacyRulesData

Index

Constants

This section is empty.

Variables

View Source
var PrivacyKeyType_name = map[int32]string{
	0: "KEY_TYPE_INVALID",
	1: "STATUS_TIMESTAMP",
	2: "CHAT_INVITE",
	3: "PHONE_CALL",
}
View Source
var PrivacyKeyType_value = map[string]int32{
	"KEY_TYPE_INVALID": 0,
	"STATUS_TIMESTAMP": 1,
	"CHAT_INVITE":      2,
	"PHONE_CALL":       3,
}
View Source
var PrivacyRuleType_name = map[int32]string{
	0: "RULE_TYPE_INVALID",
	1: "ALLOW_CONTACTS",
	2: "ALLOW_ALL",
	3: "ALLOW_USERS",
	4: "DISALLOW_CONTACTS",
	5: "DISALLOW_ALL",
	6: "DISALLOW_USERS",
}
View Source
var PrivacyRuleType_value = map[string]int32{
	"RULE_TYPE_INVALID": 0,
	"ALLOW_CONTACTS":    1,
	"ALLOW_ALL":         2,
	"ALLOW_USERS":       3,
	"DISALLOW_CONTACTS": 4,
	"DISALLOW_ALL":      5,
	"DISALLOW_USERS":    6,
}

Functions

This section is empty.

Types

type AccountModel

type AccountModel struct {
	// contains filtered or unexported fields
}

func (*AccountModel) CheckRecoverCode

func (m *AccountModel) CheckRecoverCode(userId int32, code string) error

func (*AccountModel) CheckSessionPasswordNeeded

func (m *AccountModel) CheckSessionPasswordNeeded(userId int32) bool

SESSION_PASSWORD_NEEDED

func (*AccountModel) CheckUsername

func (m *AccountModel) CheckUsername(username string) int32

not found, return 0

func (*AccountModel) DeleteAuthorization

func (m *AccountModel) DeleteAuthorization(authKeyId int64)

func (*AccountModel) GetAccountDaysTTL

func (m *AccountModel) GetAccountDaysTTL(userId int32) int32

func (*AccountModel) GetAuthKeyIdByHash

func (m *AccountModel) GetAuthKeyIdByHash(userId int32, hash int64) int64

func (*AccountModel) GetAuthorizationList

func (m *AccountModel) GetAuthorizationList(selfAuthKeyId int64, userId int32) []*mtproto.Authorization

func (*AccountModel) GetNotifySettings

func (m *AccountModel) GetNotifySettings(userId int32, peer *base.PeerUtil) *mtproto.PeerNotifySettings

func (*AccountModel) GetWallPaperList

func (m *AccountModel) GetWallPaperList() wallPaperDataList

func (*AccountModel) InsertReportData

func (m *AccountModel) InsertReportData(userId, peerType, peerId, reason int32, text string) bool

func (*AccountModel) InstallModel

func (m *AccountModel) InstallModel()

func (*AccountModel) MakePasswordData

func (m *AccountModel) MakePasswordData(userId int32) (*passwordData, error)

func (*AccountModel) MakePrivacyLogic

func (m *AccountModel) MakePrivacyLogic(userId int32) *privacyLogic

func (*AccountModel) RegisterCallback

func (m *AccountModel) RegisterCallback(cb interface{})

func (*AccountModel) RegisterDevice

func (m *AccountModel) RegisterDevice(authKeyId int64, userId int32, tokenType int8, token string) bool

func (*AccountModel) ResetNotifySettings

func (m *AccountModel) ResetNotifySettings(userId int32)

func (*AccountModel) SetAccountDaysTTL

func (m *AccountModel) SetAccountDaysTTL(userId int32, ttl int32)

func (*AccountModel) SetNotifySettings

func (m *AccountModel) SetNotifySettings(userId int32, peer *base.PeerUtil, settings *mtproto.TLInputPeerNotifySettings)

func (*AccountModel) UnRegisterDevice

func (m *AccountModel) UnRegisterDevice(tokenType int8, token string) bool

func (*AccountModel) UpdateAbout

func (m *AccountModel) UpdateAbout(id int32, about string) int64

func (*AccountModel) UpdateFirstAndLastName

func (m *AccountModel) UpdateFirstAndLastName(id int32, firstName, lastName string) int64

func (*AccountModel) UpdateUsernameByUserId

func (m *AccountModel) UpdateUsernameByUserId(id int32, username string) bool

type PrivacyKeyType

type PrivacyKeyType int32

privacyKeyStatusTimestamp#bc2eab30 = PrivacyKey; privacyKeyChatInvite#500e6dfa = PrivacyKey; privacyKeyPhoneCall#3d662b7b = PrivacyKey;

const (
	PrivacyKeyType_KEY_TYPE_INVALID PrivacyKeyType = 0
	PrivacyKeyType_STATUS_TIMESTAMP PrivacyKeyType = 1
	PrivacyKeyType_CHAT_INVITE      PrivacyKeyType = 2
	PrivacyKeyType_PHONE_CALL       PrivacyKeyType = 3
)

func FromInputPrivacyKey

func FromInputPrivacyKey(key *mtproto.InputPrivacyKey) PrivacyKeyType

func (PrivacyKeyType) EnumDescriptor

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

func (PrivacyKeyType) String

func (x PrivacyKeyType) String() string

func (PrivacyKeyType) ToPrivacyKey

func (x PrivacyKeyType) ToPrivacyKey() (key *mtproto.PrivacyKey)

type PrivacyRuleData

type PrivacyRuleData struct {
	Type       PrivacyRuleType `protobuf:"varint,1,opt,name=type,enum=account.PrivacyRuleType" json:"type,omitempty"`
	UserIdList []int32         `protobuf:"varint,2,rep,packed,name=user_id_list,json=userIdList" json:"user_id_list,omitempty"`
}

func (*PrivacyRuleData) Descriptor

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

func (*PrivacyRuleData) GetType

func (m *PrivacyRuleData) GetType() PrivacyRuleType

func (*PrivacyRuleData) GetUserIdList

func (m *PrivacyRuleData) GetUserIdList() []int32

func (*PrivacyRuleData) ProtoMessage

func (*PrivacyRuleData) ProtoMessage()

func (*PrivacyRuleData) Reset

func (m *PrivacyRuleData) Reset()

func (*PrivacyRuleData) String

func (m *PrivacyRuleData) String() string

func (*PrivacyRuleData) ToPrivacyRule

func (m *PrivacyRuleData) ToPrivacyRule() (rule *mtproto.PrivacyRule)

type PrivacyRuleType

type PrivacyRuleType int32

privacyValueAllowContacts#fffe1bac = PrivacyRule; privacyValueAllowAll#65427b82 = PrivacyRule; privacyValueAllowUsers#4d5bbe0c users:Vector<int> = PrivacyRule; privacyValueDisallowContacts#f888fa1a = PrivacyRule; privacyValueDisallowAll#8b73e763 = PrivacyRule; privacyValueDisallowUsers#c7f49b7 users:Vector<int> = PrivacyRule;

const (
	PrivacyRuleType_RULE_TYPE_INVALID PrivacyRuleType = 0
	PrivacyRuleType_ALLOW_CONTACTS    PrivacyRuleType = 1
	PrivacyRuleType_ALLOW_ALL         PrivacyRuleType = 2
	PrivacyRuleType_ALLOW_USERS       PrivacyRuleType = 3
	PrivacyRuleType_DISALLOW_CONTACTS PrivacyRuleType = 4
	PrivacyRuleType_DISALLOW_ALL      PrivacyRuleType = 5
	PrivacyRuleType_DISALLOW_USERS    PrivacyRuleType = 6
)

func (PrivacyRuleType) EnumDescriptor

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

func (PrivacyRuleType) String

func (x PrivacyRuleType) String() string

type PrivacyRulesData

type PrivacyRulesData struct {
	Rules []*PrivacyRuleData `protobuf:"bytes,1,rep,name=rules" json:"rules,omitempty"`
}

func (*PrivacyRulesData) Descriptor

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

func (*PrivacyRulesData) GetRules

func (m *PrivacyRulesData) GetRules() []*PrivacyRuleData

func (*PrivacyRulesData) PickAllUserIdList

func (m *PrivacyRulesData) PickAllUserIdList() (idList []int32)

func (*PrivacyRulesData) ProtoMessage

func (*PrivacyRulesData) ProtoMessage()

func (*PrivacyRulesData) Reset

func (m *PrivacyRulesData) Reset()

func (*PrivacyRulesData) String

func (m *PrivacyRulesData) String() string

func (*PrivacyRulesData) ToPrivacyRuleList

func (m *PrivacyRulesData) ToPrivacyRuleList() (rules []*mtproto.PrivacyRule)

//////////////////////////////////////////////////////////////////////////////////////

Jump to

Keyboard shortcuts

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