opensips

package
v1.0.29 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB *gorm.DB

Functions

func Init

func Init(host, user, pwd string) error

func InitMock

func InitMock(db *sql.DB) error

Types

type Call

type Call struct {
	// call id
	CallId string `gorm:"column:callid"`
	// sip code
	SipCode string `gorm:"column:sip_code"`
	// sip 信息
	SipReason string `gorm:"column:sip_reason"`
	// 呼叫时间
	Time time.Time `gorm:"column:time"`
	// 被叫号
	ToU string `gorm:"column:toU"`
}

表: acc 表: missed_calls

func (*Call) FilterPrefix

func (c *Call) FilterPrefix() (string, error)

获取手机号前7位

func (*Call) MarshalLogObject

func (c *Call) MarshalLogObject(enc zapcore.ObjectEncoder) error

zap 日志格式化

type CallRepository

type CallRepository struct {
	DB *gorm.DB
}

func NewCallRepository

func NewCallRepository() *CallRepository

func (*CallRepository) Calls

func (c *CallRepository) Calls(from, to string) <-chan Call

Jump to

Keyboard shortcuts

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