sbtree

package
v0.0.0-...-ba1c585 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2017 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package sbtree provides data structures used by HTML templates to build the web pages for the Syncbase debug viewer. To minimize mixing of code and presentation, all the data for use in the templates is in a form that is convenient for accessing and iterating over, i.e struct fields, no-arg methods, slices, or maps. In some cases this required mirroring data structures in the public Syncbase API to avoid having the templates deal with context objects, or to avoid the templates needing extra variables to handle indirection.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CollectionTree

type CollectionTree struct {
	Service    syncbase.Service
	Database   syncbase.Database
	Collection syncbase.Collection
	RowCount   int
	TotKeySize uint64
	KeysPage   keysPage
}

CollectionTree has all the data for the collection page of the Syncbase debug viewer.

func AssembleCollectionTree

func AssembleCollectionTree(
	ctx *context.T, server, dbBlessing, dbName, collBlessing, collName, firstKey string, keysPerPage int,
) *CollectionTree

AssembleCollectionTree returns information describing the given Syncbase collection, including a "page" of keys starting at the given first key.

type SyncbaseTree

type SyncbaseTree struct {
	Service syncbase.Service
	Dbs     []dbTree
}

SyncbaseTree has all the data for the main page of the Syncbase debug viewer.

func AssembleSyncbaseTree

func AssembleSyncbaseTree(
	ctx *context.T, server string, service syncbase.Service, dbIds []wire.Id,
) *SyncbaseTree

AssembleSyncbaseTree returns information describing the Syncbase server running on the given server. Errors are included in the tree, so they can be displayed in the HTML.

Jump to

Keyboard shortcuts

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