directory

package
v0.0.0-...-1704659 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2023 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DirectMessage

type DirectMessage struct {
	Epochs  owldag.IDSet[cadata.ID] `json:"epochs"`
	Members []contactset.UID        `json:"members"`
}

type Operator

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

func New

func New() Operator

func (*Operator) Delete

func (o *Operator) Delete(ctx context.Context, s cadata.Store, x State, name string) (*State, error)

func (*Operator) Exists

func (o *Operator) Exists(ctx context.Context, s cadata.Store, x State, name string) (bool, error)

func (*Operator) Get

func (o *Operator) Get(ctx context.Context, s cadata.Store, x State, name string) (*Value, error)

func (*Operator) List

func (o *Operator) List(ctx context.Context, s cadata.Store, x State, span state.Span[string]) (ret []string, _ error)

func (*Operator) Merge

func (o *Operator) Merge(ctx context.Context, s cadata.Store, xs []State) (*State, error)

func (*Operator) New

func (o *Operator) New(ctx context.Context, s cadata.Store) (*State, error)

func (*Operator) Put

func (o *Operator) Put(ctx context.Context, s cadata.Store, x State, name string, v Value) (*State, error)

type Scheme

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

func NewScheme

func NewScheme(peers []owldag.PeerID) *Scheme

func (*Scheme) CanRead

func (p *Scheme) CanRead(ctx context.Context, s cadata.Getter, x State, peer owldag.PeerID) (bool, error)

func (*Scheme) ListPeers

func (p *Scheme) ListPeers(ctx context.Context, s cadata.Getter, x State) ([]owldag.PeerID, error)

func (*Scheme) Merge

func (p *Scheme) Merge(ctx context.Context, s cadata.Store, xs []State) (*State, error)

func (*Scheme) Sync

func (p *Scheme) Sync(ctx context.Context, src cadata.Getter, dst cadata.Store, x State) error

func (*Scheme) Validate

func (p *Scheme) Validate(ctx context.Context, s cadata.Getter, consult owldag.ConsultFunc, x State) error

func (*Scheme) ValidateStep

func (p *Scheme) ValidateStep(ctx context.Context, s cadata.Getter, consult owldag.ConsultFunc, prev, next State) error

type State

type State = gotkv.Root

type Value

type Value struct {
	DirectMessage *DirectMessage `json:"direct_message"`
}

Jump to

Keyboard shortcuts

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