dependency

package
v0.0.0-...-8b501b0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API interface {
	// ListDependencies returns the list of direct dependency IDs for a
	// particular project ID or an error if a non-project ID argument is
	// provided.
	ListDependencies(projectID string) ([]string, error)

	// DependencyType returns the type of a particular dependency.
	DependencyType(dependencyID string) (DepType, error)
}

API is implemented by clients of the project metadata micro-service.

type Collector

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

Collector provides helper methods for building the dependency graph of projects.

func NewCollector

func NewCollector(api API) *Collector

NewCollector returns a new dependency collector instance that uses api.

func (*Collector) AllDependencies

func (c *Collector) AllDependencies(projectID string) ([]string, error)

AllDependencies returns the unique list of direct and transitive dependecies for the project with the specified ID.

type DepType

type DepType int

DepType describes a dependency type.

const (
	DepTypeProject DepType = iota
	DepTypeResource
)

The supported dependency types returned by the API.

Directories

Path Synopsis
Package mock_dependency is a generated GoMock package.
Package mock_dependency is a generated GoMock package.

Jump to

Keyboard shortcuts

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