registry

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2018 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package registry contains shared utils between server and client regarding the registry opening and modification.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrEntryExists is returned when adding a registry entry that already exists.
	ErrEntryExists = errors.New("registry entry exists already")
)

Functions

This section is empty.

Types

type Entry

type Entry struct {
	Path      string
	Owner     string
	Addr      string
	Port      int64
	IsDefault bool
}

Entry is a single entry to the Registry.

type Registry

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

Registry is a global config that stores the location and details of all brig repos on the same machine. It is supposed to help figuring out the right port and so on.

func Open

func Open() (*Registry, error)

Open opens the global registry.

func (*Registry) Add

func (reg *Registry) Add(entry *Entry) (string, error)

Add adds a single entry to the registry.

func (*Registry) Entry

func (reg *Registry) Entry(uuid string) (*Entry, error)

Entry returns the entry with `uuid`.

func (*Registry) List

func (reg *Registry) List() ([]*Entry, error)

List returns all entries in the registry.

func (*Registry) Update

func (reg *Registry) Update(uuid string, entry *Entry) error

Update updates the entry with `uuid`.

Jump to

Keyboard shortcuts

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