iri

package
v0.0.0-...-9f7a181 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseCoreSequence

func ParseCoreSequence(k string) (uint16, error)

func ParseCoreSequence32

func ParseCoreSequence32(k string) (uint32, error)

func SequenceToSmallKey

func SequenceToSmallKey(v uint16) []byte

func SmallKeyToSequence

func SmallKeyToSequence(k []byte) (uint16, error)

func ValidateNodeId

func ValidateNodeId(id string) (ksuid.KSUID, error)

func ValidateSequence

func ValidateSequence(seq uint16) bool

func ValidateUuid

func ValidateUuid(sUuid string) (uuid.UUID, error)

Types

type BaseCounter

type BaseCounter interface {
	GetPath() string
	GetKey(dbCnt subspace.Subspace, cntGroup string) fdb.Key
	GetKeyRange(dbCnt subspace.Subspace) fdb.ExactRange
}

type Edge

type Edge struct {
	IRI

	Subject   string
	Predicate uint16
	Target    string
	// contains filtered or unexported fields
}

func (*Edge) GetClearRange

func (e *Edge) GetClearRange(db subspace.Subspace) fdb.ExactRange

func (*Edge) GetKey

func (e *Edge) GetKey(db subspace.Subspace) fdb.Key

func (*Edge) GetListRange

func (e *Edge) GetListRange(db subspace.Subspace, rtr fdb.ReadTransaction, opt *ListOptions) fdb.RangeResult

func (*Edge) GetPath

func (e *Edge) GetPath() string

func (*Edge) Parse

func (e *Edge) Parse(path string) error

func (*Edge) ValidateIRI

func (e *Edge) ValidateIRI(p *perms.Edge) error

func (*Edge) ValidatePermission

func (e *Edge) ValidatePermission(p *perms.Edge) error

type EdgeCounter

type EdgeCounter struct {
	BaseCounter

	Subject   string
	Predicate uint16
	Target    string

	Counter uint16
	// contains filtered or unexported fields
}

Edges

func (*EdgeCounter) GetKey

func (c *EdgeCounter) GetKey(dbCnt subspace.Subspace, cntGroup string) fdb.Key

func (*EdgeCounter) GetKeyRange

func (c *EdgeCounter) GetKeyRange(dbCnt subspace.Subspace) fdb.ExactRange

func (*EdgeCounter) GetPath

func (c *EdgeCounter) GetPath() string

func (*EdgeCounter) Parse

func (c *EdgeCounter) Parse(path string) error

func (*EdgeCounter) ValidateIRI

func (c *EdgeCounter) ValidateIRI(p *perms.Count) error

func (*EdgeCounter) ValidatePermission

func (c *EdgeCounter) ValidatePermission(p perms.Count) error

type EdgeMeta

type EdgeMeta struct {
	IRI

	Subject   string
	Predicate uint16
	Target    string

	Property uint16
	// contains filtered or unexported fields
}

Edges

func (*EdgeMeta) GetClearRange

func (m *EdgeMeta) GetClearRange(db subspace.Subspace) fdb.ExactRange

func (*EdgeMeta) GetKey

func (m *EdgeMeta) GetKey(db subspace.Subspace) fdb.Key

func (*EdgeMeta) GetListRange

func (m *EdgeMeta) GetListRange(db subspace.Subspace, rtr fdb.ReadTransaction, opt *ListOptions) fdb.RangeResult

func (*EdgeMeta) GetPath

func (m *EdgeMeta) GetPath() string

func (*EdgeMeta) Parse

func (m *EdgeMeta) Parse(path string) error

func (*EdgeMeta) ValidateIRI

func (m *EdgeMeta) ValidateIRI(p *perms.Meta) error

func (*EdgeMeta) ValidatePermission

func (m *EdgeMeta) ValidatePermission(p perms.Meta) error

type IRI

type IRI interface {
	GetPath() string
	GetKey(db subspace.Subspace) fdb.Key
	GetClearRange(db subspace.Subspace) fdb.ExactRange
	GetListRange(db subspace.Subspace, rtr fdb.ReadTransaction, opt *ListOptions) fdb.RangeResult
}

func Parse

func Parse(s string) (IRI, error)

type ListOptions

type ListOptions struct {
	PageSize int
	Reverse  bool
}

type Node

type Node struct {
	IRI
	Type uint16
	Id   string
	// contains filtered or unexported fields
}

func (*Node) GetClearRange

func (n *Node) GetClearRange(db subspace.Subspace) fdb.ExactRange

func (*Node) GetKey

func (n *Node) GetKey(db subspace.Subspace) fdb.Key

func (*Node) GetListRange

func (n *Node) GetListRange(db subspace.Subspace, rtr fdb.ReadTransaction, opt *ListOptions) fdb.RangeResult

func (*Node) GetPath

func (n *Node) GetPath() string

func (*Node) Parse

func (n *Node) Parse(path string) error

func (*Node) ValidateIRI

func (n *Node) ValidateIRI(p *perms.Node) error

func (*Node) ValidatePermission

func (n *Node) ValidatePermission(p perms.Node) error

type NodeCounter

type NodeCounter struct {
	BaseCounter
	Counter uint16

	Node string
	// contains filtered or unexported fields
}

Nodes

func (*NodeCounter) GetKey

func (c *NodeCounter) GetKey(dbCnt subspace.Subspace, cntGroup string) fdb.Key

func (*NodeCounter) GetKeyRange

func (c *NodeCounter) GetKeyRange(dbCnt subspace.Subspace) fdb.ExactRange

func (*NodeCounter) GetPath

func (c *NodeCounter) GetPath() string

func (*NodeCounter) Parse

func (c *NodeCounter) Parse(path string) error

func (*NodeCounter) ValidateIRI

func (c *NodeCounter) ValidateIRI(p *perms.Count) error

func (*NodeCounter) ValidatePermission

func (c *NodeCounter) ValidatePermission(p perms.Count) error

type NodeIndex

type NodeIndex struct {
	IRI

	Node    string
	IndexId uint16
	Value   string
	Unique  bool
	// contains filtered or unexported fields
}

func (*NodeIndex) GetClearRange

func (i *NodeIndex) GetClearRange(db subspace.Subspace) fdb.ExactRange

func (*NodeIndex) GetCounterClearRange

func (i *NodeIndex) GetCounterClearRange(db subspace.Subspace) fdb.ExactRange

func (*NodeIndex) GetCounterKey

func (i *NodeIndex) GetCounterKey(db subspace.Subspace) fdb.Key

func (*NodeIndex) GetCounterListRange

func (i *NodeIndex) GetCounterListRange(db subspace.Subspace, rtr fdb.ReadTransaction, opt *ListOptions) fdb.RangeResult

func (*NodeIndex) GetKey

func (i *NodeIndex) GetKey(db subspace.Subspace) fdb.Key

func (*NodeIndex) GetListRange

func (i *NodeIndex) GetListRange(db subspace.Subspace, rtr fdb.ReadTransaction, opt *ListOptions) fdb.RangeResult

func (*NodeIndex) GetPath

func (i *NodeIndex) GetPath() string

func (*NodeIndex) Parse

func (i *NodeIndex) Parse(path string) error

func (*NodeIndex) ValidateIRI

func (i *NodeIndex) ValidateIRI(p *perms.Index) error

func (*NodeIndex) ValidatePermission

func (i *NodeIndex) ValidatePermission(p perms.Index) error

type NodeMeta

type NodeMeta struct {
	Node     string
	Property uint16
	// contains filtered or unexported fields
}

Nodes

func (*NodeMeta) GetClearRange

func (m *NodeMeta) GetClearRange(db subspace.Subspace) fdb.ExactRange

func (*NodeMeta) GetKey

func (m *NodeMeta) GetKey(db subspace.Subspace) fdb.Key

func (*NodeMeta) GetListRange

func (m *NodeMeta) GetListRange(db subspace.Subspace, rtr fdb.ReadTransaction, opt *ListOptions) fdb.RangeResult

func (*NodeMeta) GetPath

func (m *NodeMeta) GetPath() string

func (*NodeMeta) Parse

func (m *NodeMeta) Parse(path string) error

func (*NodeMeta) ValidateIRI

func (m *NodeMeta) ValidateIRI(p *perms.Meta) error

func (*NodeMeta) ValidatePermission

func (m *NodeMeta) ValidatePermission(p perms.Meta) error

type ParsingError

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

func NewParsingError

func NewParsingError(msg string, field string) *ParsingError

func (*ParsingError) Error

func (e *ParsingError) Error() string

func (*ParsingError) Field

func (e *ParsingError) Field() string

func (*ParsingError) Message

func (e *ParsingError) Message() string

type Sequence

type Sequence struct {
	IRI
	Type  string
	SeqID uint32
	UUID  string
}

func (*Sequence) DbSeqID

func (s *Sequence) DbSeqID() string

func (*Sequence) GetClearRange

func (s *Sequence) GetClearRange(db subspace.Subspace) fdb.ExactRange

func (*Sequence) GetIncrementKey

func (s *Sequence) GetIncrementKey(db subspace.Subspace) fdb.Key

func (*Sequence) GetKey

func (s *Sequence) GetKey(db subspace.Subspace) fdb.Key

func (*Sequence) GetListRange

func (s *Sequence) GetListRange(db subspace.Subspace, rtr fdb.ReadTransaction, opt *ListOptions) fdb.RangeResult

func (*Sequence) GetPath

func (s *Sequence) GetPath() string

func (*Sequence) GetReverseKey

func (s *Sequence) GetReverseKey(db subspace.Subspace) fdb.Key

func (*Sequence) Parse

func (s *Sequence) Parse(path string) error

func (*Sequence) ValidateIRI

func (s *Sequence) ValidateIRI(p *perms.Sequence) error

func (*Sequence) ValidatePermission

func (s *Sequence) ValidatePermission(p perms.Sequence) error

Jump to

Keyboard shortcuts

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