smshistory

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2018 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitModels

func InitModels()

InitModels initialize models in mongo, if required.

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager is used to store grants

func NewManager

func NewManager(sess *mgo.Session) *Manager

NewManager creates and initializes a new Manager

func (*Manager) AddSMSHistory

func (m *Manager) AddSMSHistory(sh *SmsHistory) error

AddSMSHistory adds SmsHistory to the database

func (*Manager) CountSMSHistorySince

func (m *Manager) CountSMSHistorySince(phonenumber string, since time.Time) (int, error)

CountSMSHistorySince counts the amount of sms sent to a phone number since a specific time

type SmsHistory

type SmsHistory struct {
	Phonenumber string
	CreatedAt   time.Time
}

SmsHistory represents an sms sent at a timestamp to a phonenumber

func New

func New(phonenumber string) *SmsHistory

New creates a new SmsHistory

Jump to

Keyboard shortcuts

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