oniontree

package
v0.0.0-...-a771af7 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCairnNotFound = errors.New("not an oniontree repository")
	ErrIdExists      = errors.New("id exists")
	ErrIdNotExists   = errors.New("id not exists")
)

Functions

This section is empty.

Types

type OnionTree

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

func New

func New(dir string) *OnionTree

func Open

func Open(dir string) (*OnionTree, error)

func (OnionTree) Add

func (o OnionTree) Add(id string, s service.Service) error

func (OnionTree) Edit

func (o OnionTree) Edit(id string, s service.Service) error

func (OnionTree) Get

func (o OnionTree) Get(id string) (service.Service, error)

func (OnionTree) GetRaw

func (o OnionTree) GetRaw(id string) ([]byte, error)

func (OnionTree) GetTag

func (o OnionTree) GetTag(id string) (tag.Tag, error)

func (OnionTree) Hash

func (o OnionTree) Hash() ([32]byte, error)

Hash calculates sha256 sum of OnionTree content. Services are read in alphabetical order and hash of their content is appended to a buffer. Resulting hash is sha256 sum of all hashes.

func (OnionTree) Init

func (o OnionTree) Init() error

func (OnionTree) List

func (o OnionTree) List() ([]string, error)

func (OnionTree) ListTags

func (o OnionTree) ListTags() ([]string, error)

func (OnionTree) Tag

func (o OnionTree) Tag(id string, tags []string) error

Jump to

Keyboard shortcuts

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