model

package
v0.0.0-...-e1c9297 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2018 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Change

type Change struct {
	Operation ChangeOp `json:"op"`
	BlockID   string   `json:"block"`
}

type ChangeLog

type ChangeLog struct {
	NodeID  string
	Changes []Change
}

ChangeLog contains all changes performed by a specific node

type ChangeOp

type ChangeOp string
const (
	ChangeOpAdd    ChangeOp = "add"
	ChangeOpDelete ChangeOp = "delete"
)

type Commit

type Commit struct {
	NodeID       string    `json:"node"`
	PrevCommitID string    `json:"prev,omitempty"`
	Timestamp    time.Time `json:"timestamp"`
	Changes      []Change  `json:"changes"`
}
type Head struct {
	NodeID   string `json:"node"`
	CommitID string `json:"commit"`
}

Jump to

Keyboard shortcuts

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