account

package
v0.0.0-...-6e21e7b Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2018 License: Apache-2.0 Imports: 13 Imported by: 0

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

func ChangeUserNameByUserId

func ChangeUserNameByUserId(id int32, name string) int64

func CheckRecoverCode

func CheckRecoverCode(userId int32, code string) error

func CheckSessionPasswordNeeded

func CheckSessionPasswordNeeded(userId int32) bool

SESSION_PASSWORD_NEEDED

func DeleteAuthorization

func DeleteAuthorization(authKeyId int64)

func GetAccountDaysTTL

func GetAccountDaysTTL(userId int32) int32

func GetAuthKeyIdByHash

func GetAuthKeyIdByHash(userId int32, hash int64) int64

func GetAuthorizationList

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

func GetNotifySettings

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

func GetUserIdByUserName

func GetUserIdByUserName(name string) int32

not found, return 0

func GetWallPaperList

func GetWallPaperList() wallPaperDataList

func InsertReportData

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

func MakePasswordData

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

func MakePrivacyLogic

func MakePrivacyLogic(userId int32) privacyLogic

func RegisterDevice

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

func ResetNotifySettings

func ResetNotifySettings(userId int32)

func SetAccountDaysTTL

func SetAccountDaysTTL(userId int32, ttl int32)

func SetNotifySettings

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

func UnRegisterDevice

func UnRegisterDevice(tokenType int8, token string) bool

func UpdateAbout

func UpdateAbout(id int32, about string) int64

func UpdateFirstAndLastName

func UpdateFirstAndLastName(id int32, firstName, lastName string) int64

Types

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 FromInputPrivacyRule

func FromInputPrivacyRule(rule *mtproto.InputPrivacyRule) (ruleData *PrivacyRuleData)

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

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