state

package
v1.0.0-rc3 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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 MessageState

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

type MessagesState

type MessagesState interface {
	SaveMessage(*MessageState) error
	SaveMessageEvent(*MessageEvent) error
	ListMessages(*MessageState) ([]*MessageState, error)
	FindMessage(id string) (*MessageState, error)
	DeleteMessage(id string) error
	DeleteMessages(groupId string) error
}

func InitMessageState

func InitMessageState(db state.DBManager) (MessagesState, error)

Directories

Path Synopsis
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