Help us shape the future of Go! Take the 2026 Go Developer Survey

rtree

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2019 License: GPL-3.0 Imports: 6 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bit

type Bit struct {
	URI string
	Bit uint
}

type BitsetReference

type BitsetReference struct {
	DomainMultihash []byte
	//map permissionset_mh_string -> permission -> bit
	Mapping map[string]map[string][]Bit
	Bits    uint64
}

type Edge

type Edge struct {
	LRes   *engine.LookupResult
	Policy *WrappedRTreePolicy
	Bits   uint64
	// contains filtered or unexported fields
}

func (*Edge) Dst

func (e *Edge) Dst() *Node

func (*Edge) Ref

func (e *Edge) Ref() string

type Node

type Node struct {
	Hash      iapi.HashSchemeInstance
	Solutions []*Solution
	Edges     []*Edge
	// contains filtered or unexported fields
}

func (*Node) BestSolutionsFor

func (n *Node) BestSolutionsFor(v uint64) []*Solution

func (*Node) Out

func (n *Node) Out() []*Edge

func (*Node) Ref

func (n *Node) Ref() string

func (*Node) UpdateSolutions

func (n *Node) UpdateSolutions(src *Node, edge *Edge)

type Params

type Params struct {
	Subject iapi.HashSchemeInstance
	Engine  *engine.Engine
	Policy  *iapi.RTreePolicy
	//Typically the domain authority
	Start        iapi.HashSchemeInstance
	EnableOutput bool
}

type RTreeBuilder

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

func NewRTreeBuilder

func NewRTreeBuilder(ctx context.Context, p *Params) (*RTreeBuilder, error)

func (*RTreeBuilder) Build

func (tb *RTreeBuilder) Build(msgs chan string)

func (*RTreeBuilder) Result

func (tb *RTreeBuilder) Result() *Solution

type Solution

type Solution struct {
	Bits  uint64
	Paths [][]*Edge
	TTL   int
	//Multihash -> attestation
	Set      map[string]*Edge
	Terminal *Node
}

func (*Solution) Combine

func (s *Solution) Combine(rhs *Solution) *Solution

func (*Solution) Extend

func (s *Solution) Extend(e *Edge) *Solution

func (*Solution) Policy

func (s *Solution) Policy() *iapi.RTreePolicy

func (*Solution) String

func (s *Solution) String() string

func (*Solution) Weight

func (s *Solution) Weight() int

type WrappedRTreePolicy

type WrappedRTreePolicy iapi.RTreePolicy

func (*WrappedRTreePolicy) Bitset

func (w *WrappedRTreePolicy) Bitset(ref *BitsetReference) (uint64, error)

func (*WrappedRTreePolicy) GenerateBitsetReference

func (w *WrappedRTreePolicy) GenerateBitsetReference() (*BitsetReference, error)

func (*WrappedRTreePolicy) TTL

func (w *WrappedRTreePolicy) TTL() int

Jump to

Keyboard shortcuts

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