Documentation
¶
Index ¶
- Variables
- type SMS
- type SMSStore
- func (sms *SMSStore) GetCurrentSMSFromStore(ch int) ([]SMS, error)
- func (sms *SMSStore) GetUnreadSMS(ch int) ([]SMS, error)
- func (sms *SMSStore) GetUnsentSMS(ch int) ([]SMS, error)
- func (sms *SMSStore) ParseSMS(body string) error
- func (sms *SMSStore) SetRead(ch int, uid string) error
- func (sms *SMSStore) SetSent(ch int, uid string) error
- func (sms *SMSStore) Stop()
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidSMS = errors.New("sms content invalid") // error for invalid single SMSs line of GSM channel ErrInvalidBody = errors.New("invalid http body") // error if http body content not contains required strings ErrNoContent = errors.New("no sms available") // error for storage if no messages saved ErrTimeInvalid = errors.New("time string invalid") // error for parsing sms if time string not parsable ErrSMSSentInProgress = errors.New("send sms in progress") // error for waiting sms send state ErrSMSSentFailed = errors.New("send sms failed") // error if sms send failed ErrSMSSSentNotFound = errors.New("sms key not found") // error id unique sms key not found )
Functions ¶
This section is empty.
Types ¶
type SMS ¶
type SMS struct { Direction string // messade direction. only in or out Date time.Time // event time From string // sender id To string // receiver id Text string // sms content Read bool // sms was sent to user Sent bool // sms was sent to remote UID string // unique sms ID }
SMS - universal for inbox or outbox struct of single SMS message
type SMSStore ¶
type SMSStore struct { Store map[int][]SMS // sms inmemory storage // contains filtered or unexported fields }
func (*SMSStore) GetCurrentSMSFromStore ¶
GetCurrentSMSFromStore - get current inmemory stored sms messages of GSM channel
ch - channel number
func (*SMSStore) GetUnreadSMS ¶
GetUnreadSMS - get unread messages from SMSs storage of GSM channel
ch - channel number
func (*SMSStore) GetUnsentSMS ¶
GetUnsentSMS - get unsent messages from SMSs storage of GSM channel
ch - channel number
Click to show internal directories.
Click to hide internal directories.