operation

package
v1.10.11 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2020 License: Apache-2.0 Imports: 3 Imported by: 2

Documentation

Overview

operation a serializable operation that can be appended to IPFS log

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Operation

type Operation interface {
	// GetKey Gets a key if applicable (ie. key value stores)
	GetKey() *string

	// GetOperation Returns an operation name (ie. append, put, remove)
	GetOperation() string

	// GetValue Returns the operation payload
	GetValue() []byte

	// GetEntry Gets the underlying IPFS log Entry
	GetEntry() ipfslog.Entry

	// Marshal Serializes the operation
	Marshal() ([]byte, error)
}

Operation Describe an CRDT operation

func NewOperation

func NewOperation(key *string, op string, value []byte) Operation

NewOperation Creates a new operation

func ParseOperation

func ParseOperation(e ipfslog.Entry) (Operation, error)

ParseOperation Gets the operation from an entry

Jump to

Keyboard shortcuts

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