goslob

package module
v0.0.0-...-143acfb Latest Latest
Warning

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

Go to latest
Published: May 25, 2022 License: MIT Imports: 8 Imported by: 1

README

go-slob

Gitlab pipeline status PkgGoDev

A golang implementation of the slob file format. For a practical use of this libary, have a look at slobreader.

Documentation

Index

Constants

View Source
const POS_SIZE = 8
View Source
const REF_SIZE = 8

Variables

This section is empty.

Functions

This section is empty.

Types

type Item

type Item struct {
	ContentType string
	Content     []byte
}

type Ref

type Ref struct {
	Key       string
	BinIndex  uint32
	ItemIndex uint16
	// contains filtered or unexported fields
}

func (*Ref) Get

func (r *Ref) Get() (*Item, error)

type Slob

type Slob struct {
	Uuid uuid.UUID

	Tags          map[string]string
	Content_types []string
	// contains filtered or unexported fields
}

func SlobFromReader

func SlobFromReader(f io.ReaderAt) (*Slob, error)

func (*Slob) Find

func (s *Slob) Find(key string) (*Item, error)

func (*Slob) Get

func (s *Slob) Get(binIndex, itemIndex int) (*Item, error)

func (*Slob) Keys

func (s *Slob) Keys() (<-chan *Ref, <-chan error)

func (*Slob) Size

func (s *Slob) Size() uint32

Jump to

Keyboard shortcuts

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