ui

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2023 License: BSD-3-Clause Imports: 30 Imported by: 0

Documentation

Overview

Package ui provides a local GUI for the algoID application.

Index

Constants

This section is empty.

Variables

View Source
var AppContents fs.FS

AppContents contains a static build of the local graphical client.

Functions

This section is empty.

Types

type LocalAPI

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

LocalAPI makes a local provider instance accessible through an HTTP server.

func LocalAPIServer

func LocalAPIServer(st *store.LocalStore, conf *internal.ClientSettings, log xlog.Logger) (*LocalAPI, error)

LocalAPIServer creates a new instance of the local API server.

func (*LocalAPI) Start

func (el *LocalAPI) Start() error

Start the local API server.

func (*LocalAPI) Stop

func (el *LocalAPI) Stop() error

Stop the local API server.

type LocalEntry

type LocalEntry struct {
	// DID local reference name
	Name string `json:"name"`

	// DID identifier
	DID string `json:"did"`

	// ALGO addresses linked to the identifier
	Addresses []addressEntry `json:"addresses"`

	// Whether the DID remains active
	Active bool `json:"active"`

	// Date when the DID was last sync to the network
	LastSync string `json:"last_sync"`

	// Raw DID document
	Document *did.Document `json:"document"`
}

LocalEntry represents a DID instance stored in the local store using a simplified format suitable for the UI.

type Provider

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

Provider is responsible for handling features required by the local API server.

func (*Provider) List

func (p *Provider) List() []*LocalEntry

List all DID instances in the local store.

func (*Provider) Ready

func (p *Provider) Ready() bool

Ready returns true if the network is available.

func (*Provider) Register

func (p *Provider) Register(name string, passphrase string) error

Register a new DID instance in the local store.

func (*Provider) Sync

func (p *Provider) Sync(name string) error

Sync a DID instance with the network.

func (*Provider) Update

func (p *Provider) Update(req *updateRequest) error

Update and sync a DID instance with the network.

Jump to

Keyboard shortcuts

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