notifications

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2023 License: BSD-2-Clause Imports: 7 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

type Data struct {
	EphemeralID int64
	RoundID     uint64
	IdentityFP  []byte
	MessageHash []byte
}

func BuildNotificationCSV

func BuildNotificationCSV(ndList []*Data, maxSize int) ([]byte, []*Data)

BuildNotificationCSV converts the Data list into a CSV of the specified max size and return it along with the included Data entries. Any Data entries over that size are excluded.

The CSV contains each Data entry on its own row with column one the [Data.MessageHash] and column two having the [Data.IdentityFP], but base 64 encoded

func DecodeNotificationsCSV

func DecodeNotificationsCSV(data string) ([]*Data, error)

DecodeNotificationsCSV decodes the Data list CSV into a slice of Data.

func (*Data) String

func (d *Data) String() string

Jump to

Keyboard shortcuts

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