bookkeeper

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultWebServiceURL       = "http://localhost:8080"
	DefaultHTTPTimeOutDuration = 5 * time.Minute
)

Variables

View Source
var ReleaseVersion = "None"

Functions

This section is empty.

Types

type Client

type Client interface {
	// Ledger related commands
	Ledger() Ledger
}

func New

func New(config *Config) (Client, error)

type Config

type Config struct {
	WebServiceURL string
	HTTPTimeout   time.Duration
	APIVersion    bkdata.APIVersion
}

Config is used to configure the bookKeeper admin client

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig for a bookKeeper admin client

type Ledger

type Ledger interface {
	// Delete the specified ledger
	Delete(int64) error

	// List all the ledgers and get the metadata
	List(bool) (map[int64]string, error)

	// Get the metadata of a ledger
	Get(int64) (map[int64]bkdata.LedgerMetadata, error)

	// Read a range of entries from a ledger
	Read(int64, int64, int64) (map[string]string, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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