splicer

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2021 License: LGPL-3.0 Imports: 16 Imported by: 0

Documentation

Overview

The log splicer command takes an ssb-fixtures generated folder as input, and a destination folder as output. The destination folder will be populated with identity folders, one folder per identity found in the generated fixtures.

Each identity folder contains a log.offset, with the posts created by that identity, and the identity's secret file. The identity folders are named after the filenames of the secrets found in the ssb-fixtures folder, which preserves the pareto distribution of authors (secrets in the lower number ranges have issued more posts).

Finally, a mapping from ssb identities @[...].ed25199 to the identity folders is dumped as json to the root of the destination folder. The mapping, in addition to naming the secret folder, also contains an integer count tracking the latest sequence number posted by that identity.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SpliceLogs

func SpliceLogs(args Args) error

Types

type Args

type Args struct {
	Verbose bool
	DryRun  bool
	// delete any offset.logs if encountered in Outdir, before appending new messages
	Prune bool
	// directory of ssb-fixtures output
	Indir string
	// directory of the spliced out logs
	Outdir string
}

type FeedInfo

type FeedInfo struct {
	ID string
	// contains filtered or unexported fields
}

type FeedJSON

type FeedJSON struct {
	Folder string `json:"folder"`
	Latest int    `json:"latest"`
}

type FlumeToMultiMsgCodec

type FlumeToMultiMsgCodec struct{}

func (FlumeToMultiMsgCodec) Marshal

func (c FlumeToMultiMsgCodec) Marshal(v interface{}) ([]byte, error)

func (FlumeToMultiMsgCodec) NewDecoder

func (c FlumeToMultiMsgCodec) NewDecoder(r io.Reader) margaret.Decoder

func (FlumeToMultiMsgCodec) NewEncoder

func (c FlumeToMultiMsgCodec) NewEncoder(w io.Writer) margaret.Encoder

func (FlumeToMultiMsgCodec) Unmarshal

func (c FlumeToMultiMsgCodec) Unmarshal(data []byte) (interface{}, error)

Jump to

Keyboard shortcuts

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