guts_cli

package
v1.3.10 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const PageHeaderSize = 16

PageHeaderSize represents the size of the bolt.Page header.

Variables

View Source
var (
	// ErrCorrupt is returned when a checking a data file finds errors.
	ErrCorrupt = errors.New("invalid value")
)

Functions

func GetRootPage

func GetRootPage(path string) (root Pgid, activeMeta Pgid, err error)

GetRootPage returns the root-page (according to the most recent transaction).

func WritePage

func WritePage(path string, pageBuf []byte) error

Types

type BranchPageElement

type BranchPageElement struct {
	// contains filtered or unexported fields
}

DO NOT EDIT. Copied from the "bolt" package.

func (*BranchPageElement) Key

func (n *BranchPageElement) Key() []byte

DO NOT EDIT. Copied from the "bolt" package.

func (*BranchPageElement) PgId

func (n *BranchPageElement) PgId() Pgid

type Bucket

type Bucket struct {
	// contains filtered or unexported fields
}

DO NOT EDIT. Copied from the "bolt" package.

func LoadBucket

func LoadBucket(buf []byte) *Bucket

func (*Bucket) InlinePage

func (b *Bucket) InlinePage(v []byte) *Page

func (*Bucket) RootPage

func (b *Bucket) RootPage() Pgid

func (*Bucket) String

func (b *Bucket) String() string

type LeafPageElement

type LeafPageElement struct {
	// contains filtered or unexported fields
}

DO NOT EDIT. Copied from the "bolt" package.

func (*LeafPageElement) Bucket

func (n *LeafPageElement) Bucket() *Bucket

func (*LeafPageElement) IsBucketEntry

func (n *LeafPageElement) IsBucketEntry() bool

func (*LeafPageElement) Key

func (n *LeafPageElement) Key() []byte

DO NOT EDIT. Copied from the "bolt" package.

func (*LeafPageElement) Value

func (n *LeafPageElement) Value() []byte

DO NOT EDIT. Copied from the "bolt" package.

type Meta

type Meta struct {
	// contains filtered or unexported fields
}

DO NOT EDIT. Copied from the "bolt" package.

func LoadPageMeta

func LoadPageMeta(buf []byte) *Meta

func (*Meta) Print

func (m *Meta) Print(w io.Writer)

func (*Meta) RootBucket

func (m *Meta) RootBucket() *Bucket

func (*Meta) Txid

func (m *Meta) Txid() uint64

type Page

type Page struct {
	// contains filtered or unexported fields
}

DO NOT EDIT. Copied from the "bolt" package.

func LoadPage

func LoadPage(buf []byte) *Page

func ReadPage

func ReadPage(path string, pageID uint64) (*Page, []byte, error)

ReadPage reads Page info & full Page data from a path. This is not transactionally safe.

func (*Page) BranchPageElement

func (p *Page) BranchPageElement(index uint16) *BranchPageElement

DO NOT EDIT. Copied from the "bolt" package.

func (*Page) Count

func (p *Page) Count() uint16

func (*Page) FreelistPageCount

func (p *Page) FreelistPageCount() int

func (*Page) FreelistPagePages

func (p *Page) FreelistPagePages() []Pgid

func (*Page) Id

func (p *Page) Id() Pgid

func (*Page) LeafPageElement

func (p *Page) LeafPageElement(index uint16) *LeafPageElement

DO NOT EDIT. Copied from the "bolt" package.

func (*Page) Overflow

func (p *Page) Overflow() uint32

func (*Page) SetCount

func (p *Page) SetCount(target uint16)

func (*Page) SetId

func (p *Page) SetId(target Pgid)

func (*Page) SetOverflow

func (p *Page) SetOverflow(target uint32)

func (*Page) String

func (p *Page) String() string

func (*Page) Type

func (p *Page) Type() string

TODO(ptabor): Make the page-types an enum.

type Pgid

type Pgid uint64

DO NOT EDIT. Copied from the "bolt" package.

func ReadPageAndHWMSize

func ReadPageAndHWMSize(path string) (uint64, Pgid, error)

ReadPageAndHWMSize reads Page size and HWM (id of the last+1 Page). This is not transactionally safe.

Jump to

Keyboard shortcuts

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