Documentation ¶
Overview ¶
Package graph implementation and provider
Index ¶
- Variables
- type ErrNotFound
- type SimpleGraph
- func (g *SimpleGraph) AddEdge(source *domain.Vertex, target *domain.Vertex, p *domain.Policy) (*domain.Edge, error)
- func (g *SimpleGraph) AddVertex(p *domain.Policy) (*domain.Vertex, error)
- func (g *SimpleGraph) GetVertex(key string) (*domain.Vertex, error)
- func (g *SimpleGraph) TraverseAndValidateData(subject, resource string, permission domain.Permission) bool
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrMissingSignature source transaction signature not present in policy ErrMissingSignature = errors.New("source transaction signature missing from policy") )
Functions ¶
This section is empty.
Types ¶
type SimpleGraph ¶
type SimpleGraph struct {
// contains filtered or unexported fields
}
SimpleGraph dag implementation
func (*SimpleGraph) AddEdge ¶
func (g *SimpleGraph) AddEdge(source *domain.Vertex, target *domain.Vertex, p *domain.Policy) (*domain.Edge, error)
AddEdge to vertex
func (*SimpleGraph) GetVertex ¶
func (g *SimpleGraph) GetVertex(key string) (*domain.Vertex, error)
GetVertex from graph
func (*SimpleGraph) TraverseAndValidateData ¶
func (g *SimpleGraph) TraverseAndValidateData(subject, resource string, permission domain.Permission) bool
TraverseAndValidateData iterate over edges and validate data
Click to show internal directories.
Click to hide internal directories.