oracle

package module
v3.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Peer

type Peer struct {
	Props     map[string]string `json:"Props"`
	PublicKey delphi.PublicKey  `json:"pubkey"`
}

func (*Peer) MarshalPEM

func (p *Peer) MarshalPEM() ([]byte, error)

func (*Peer) NickName

func (p *Peer) NickName() string

func (*Peer) Save

func (p *Peer) Save(w io.Writer) error

func (*Peer) UnmarshalPEM

func (p *Peer) UnmarshalPEM(data []byte) error

type PeerStore

type PeerStore map[delphi.PublicKey]Props

func (PeerStore) MarshalJSON

func (ps PeerStore) MarshalJSON() ([]byte, error)

func (*PeerStore) UnmarshalJSON

func (psPtr *PeerStore) UnmarshalJSON(b []byte) error

type Principal

type Principal struct {
	Props   Props          `json:"Props"`
	KeyPair delphi.KeyPair `json:"keypair"`
	Peers   PeerStore      `json:"peers"`
}

func LoadJSON

func LoadJSON(r io.Reader) (*Principal, error)

func NewPrincipal

func NewPrincipal(randy io.Reader) *Principal

func (*Principal) AddPeer

func (pr *Principal) AddPeer(peer Peer)

func (*Principal) AsPeer

func (pr *Principal) AsPeer() Peer

func (*Principal) HasPeer

func (pr *Principal) HasPeer(pub delphi.PublicKey) bool

func (*Principal) ID

func (pr *Principal) ID() string

ID produces a string that uniquely identifies a Principal

func (*Principal) MarshalPEM

func (pr *Principal) MarshalPEM() ([]byte, error)

func (*Principal) MustBeValid

func (pr *Principal) MustBeValid()

func (*Principal) NickName

func (pr *Principal) NickName() string

func (*Principal) SaveJSON

func (pr *Principal) SaveJSON(w io.Writer) error

func (*Principal) UnmarshalPEM

func (pr *Principal) UnmarshalPEM(data []byte) error

type Props

type Props = map[string]string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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