new_db

package
v0.0.0-...-49f0b68 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func InitDb

func InitDb(conn string) error

Types

type CanInviteRes

type CanInviteRes struct {
	Localpart   string      `json:"localpart"`
	LimitMode   string      `json:"limit_mode"`
	ChatFee     string      `json:"chat_fee"`
	MortgageFee string      `json:"mortgage_fee"`
	Servername  string      `json:"servername"`
	Blacklist   StringArray `json:"blacklist"`
	Whitelist   StringArray `json:"whitelist"`
	PayedFee    string      `json:"payed_fee"`
}

func QueryAvailableListByLocals

func QueryAvailableListByLocals(userLocal string, locals []string) (res []CanInviteRes, err error)

QueryAvailableListByLocals

func QueryNeedPayByLocals

func QueryNeedPayByLocals(userLocal string, locals []string) (res []CanInviteRes, err error)

QueryNeedPayByLocals

type Int64Array

type Int64Array []int64

func (*Int64Array) FromDB

func (s *Int64Array) FromDB(bts []byte) error

func (Int64Array) MarshalJSON

func (arr Int64Array) MarshalJSON() ([]byte, error)

func (*Int64Array) ToDB

func (s *Int64Array) ToDB() ([]byte, error)

func (*Int64Array) UnmarshalJSON

func (arr *Int64Array) UnmarshalJSON(b []byte) error

type StringArray

type StringArray []string

func (*StringArray) FromDB

func (s *StringArray) FromDB(bts []byte) error

func (StringArray) MarshalJSON

func (arr StringArray) MarshalJSON() ([]byte, error)

func (*StringArray) ToDB

func (s *StringArray) ToDB() ([]byte, error)

func (*StringArray) UnmarshalJSON

func (arr *StringArray) UnmarshalJSON(b []byte) error

type UserRes

type UserRes struct {
	DisplayName string `json:"display_name"`
	AvatarURL   string `json:"avatar_url"`

	Localpart   string `json:"localpart"`
	Servername  string `json:"servername"`
	LimitMode   string `json:"limit_mode"` //  any fee list
	ChatFee     string `json:"chat_fee"`
	MortgageFee string `json:"mortgage_fee"`

	TelNumbers Int64Array  `json:"tel_numbers"`
	Blacklist  StringArray `json:"blacklist"`
	Whitelist  StringArray `json:"whitelist"`

	CanWeTalk  bool   `json:"can_we_talk"`
	CanPayTalk bool   `json:"can_pay_talk"`
	PayedFee   string `json:"payed_fee"`
}

func GetUserByPhone

func GetUserByPhone(userLocal string, phone int64) (res UserRes, err error)

GetUserByPhone

Jump to

Keyboard shortcuts

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