message

package
v0.0.0-...-ccb2cb4 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteMessage

func DeleteMessage(message Message) error

func GetMessageKeys

func GetMessageKeys() (keys []string)

Types

type Message

type Message struct {
	ID             string    `json:"messageId"`
	From           string    `json:"from"`
	To             []string  `json:"to"`
	Data           []byte    `json:"data"`
	ProvidersTried []string  `json:"providersTried"`
	LastSentAt     time.Time `json:"lastSentAt"`
}

func CreateFromRaw

func CreateFromRaw(from string, to []string, data []byte) (Message, bool)

func FetchMessage

func FetchMessage(ID string) (Message, bool)

func LoadFromJSON

func LoadFromJSON(data []byte) (Message, error)

func (*Message) Save

func (m *Message) Save() error

func (*Message) ToBytes

func (m *Message) ToBytes() []byte

Jump to

Keyboard shortcuts

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