messages

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Db state.DBManager
}

type MessageEvent

type MessageEvent struct {
	Id        string    `json:"id"`
	MessageId string    `json:"messageId"`
	DID       string    `json:"did"`
	Type      string    `json:"type"`
	EventTime time.Time `json:"added"`
}

type MessageInfo

type MessageInfo struct {
	Id         string         `json:"id"`
	Type       string         `json:"type"`
	Recipients []string       `json:"recipients"`
	Data       []byte         `json:"data"`
	Events     []MessageEvent `json:"events"`
	Transport  string         `json:"transport"`
	GroupId    string         `json:"group_id"`
	Added      time.Time      `json:"added"`
}

type MessageManager

type MessageManager interface {
	GetMessages() ([]*MessageInfo, error)
	SaveMessage(*MessageInfo) error
	SaveMessageEvent(*MessageEvent) error
	DeleteMessage(string, string) error
}

func New

func New(cfg *Config) (MessageManager, error)

type MessageQuery

type MessageQuery struct {
	Id         string   `json:"id"`
	Type       string   `json:"type"`
	Recipients []string `json:"recipients"`
}

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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