user_client

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: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLocalUserApi

func NewLocalUserApi(dbName string) (*localUserFacade, error)

func NewRpcUserClient

func NewRpcUserClient(discovery *service_discovery.ServiceDiscoveryClientConfig) *rpcUserClient

func Register

func Register(name string, inst Instance)

Types

type Instance

type Instance func() UserFacade

type UserFacade

type UserFacade interface {
	Initialize(config string) error
	GetUser(id int32) (*mtproto.User, error)
	GetUserList(idList []int32) ([]*mtproto.User, error)
	GetUserByPhoneNumber(phone string) (*mtproto.User, error)

	CheckPhoneNumberExist(phoneNumber string) bool
	CheckBannedByPhoneNumber(phoneNumber string) bool
}

func NewUserFacade

func NewUserFacade(name, config string) (inst UserFacade, err error)

Jump to

Keyboard shortcuts

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