graph

package
v0.11.5 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseNodeName

func ParseNodeName(node GraphNoder) (string, string, error)

Types

type GraphNoder

type GraphNoder interface {
	AddChild(graph.GraphTemplateNoder) error
	AddParent(graph.GraphTemplateNoder) error
	AddItem(interface{})
	Name() string
	Item() interface{}
	Children() []graph.GraphTemplateNoder
	Parents() []graph.GraphTemplateNoder
}

GraphNoder is a node for the graph template

type Grapher

type Grapher interface {
	GetNode(string) graph.GraphTemplateNoder
	AddNode(graph.GraphTemplateNoder) error
	AddRelationship(graph.GraphTemplateNoder, graph.GraphTemplateNoder) error
	Exists(string) bool
	HasCycles() bool
	Iterate() <-chan graph.GraphTemplateNoder
}

Grapher is a graph template for images

type ImagesGraphTemplate

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

ImageGraphTemplate is a graph template for images

func NewImagesGraphTemplate

func NewImagesGraphTemplate(factory *graph.GraphTemplateFactory) *ImagesGraphTemplate

NewImagesGraphTemplate creates a new graph template for images

func (*ImagesGraphTemplate) AddImage

func (m *ImagesGraphTemplate) AddImage(name, version string, i *image.Image) error

AddImage is a mock implementation of the AddImage method

func (*ImagesGraphTemplate) Iterate

func (m *ImagesGraphTemplate) Iterate() <-chan GraphNoder

Iterate iterates over the graph template

func (*ImagesGraphTemplate) Validate

func (m *ImagesGraphTemplate) Validate() error

Validate validates the graph template

type MockImagesGraphTemplate

type MockImagesGraphTemplate struct {
	mock.Mock
}

MockImagesGraphTemplate is a graph template for images

func NewMockImagesGraphTemplate

func NewMockImagesGraphTemplate() *MockImagesGraphTemplate

func (*MockImagesGraphTemplate) AddImage

func (m *MockImagesGraphTemplate) AddImage(name, version string, image *image.Image) error

AddImage is a mock implementation of the AddImage method

func (*MockImagesGraphTemplate) Iterate

func (m *MockImagesGraphTemplate) Iterate() <-chan GraphNoder

Iterate is a mock implementation of the Iterate method

Jump to

Keyboard shortcuts

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