history

package
v0.0.0-...-603ef42 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	EventHistory []SmsEvent
	AllContacts  []contacts.Entry
)
View Source
var (
	PT *time.Location
)
View Source
var (
	SmsHistoryFilename = "sms-history.gob.age"
)
View Source
var (
	SmsImportHeaders = []string{
		"date", "message_id", "name", "email", "target_type", "target_id",
		"sender_id", "direction", "to_phone", "from_phone",
		"encrypted_text", "encrypted_aes_text", "mms", "timezone",
	}
)

Functions

func DownloadSmsReport

func DownloadSmsReport(url, path string, encrypt bool) error

func GetSmsReportDownloadUrl

func GetSmsReportDownloadUrl(id string) (string, error)

func LoadAllContacts

func LoadAllContacts() error

func LoadEventHistory

func LoadEventHistory() error

func RequestForm

func RequestForm(name string, phone string, events []SmsEvent) []byte

func RequestHandler

func RequestHandler(c *gin.Context)

func RequestSmsReport

func RequestSmsReport(fromDate int64) (string, error)

func SearchHandler

func SearchHandler(c *gin.Context)

func SelectPhonesByEmail

func SelectPhonesByEmail(email string, events []SmsEvent) []string

func ServerErrorForm

func ServerErrorForm(name, phone string) []byte

func StatsHandler

func StatsHandler(c *gin.Context)

func UploadSmsHistory

func UploadSmsHistory(events []SmsEvent) error

Types

type SmsEvent

type SmsEvent struct {
	Date       int64 // UnixMicro
	MessageId  string
	Name       string
	Email      string
	TargetType string
	TargetId   int64
	SenderId   int64
	Direction  string
	ToPhones   []string
	FromPhone  string
	Text       string
	MmsUrl     string
}

func DownloadSmsHistory

func DownloadSmsHistory() ([]SmsEvent, error)

func ImportEncryptedSmsEvents

func ImportEncryptedSmsEvents(path string) ([]SmsEvent, error)

func ImportSmsEvents

func ImportSmsEvents(path string) ([]SmsEvent, error)

func SelectThreadByEmailPhone

func SelectThreadByEmailPhone(email, phone string, events []SmsEvent) []SmsEvent

Jump to

Keyboard shortcuts

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