ancestrymanager

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2021 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Overview

Package ancestrymanager provides an interface to query the ancestry information for a project.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AncestryManager

type AncestryManager interface {
	// GetAncestry takes a project name to return an ancestry path
	GetAncestry(project string) (string, error)
	// GetAncestry takes a project name and resource data to return an ancestry path
	GetAncestryWithResource(project string, tfData resources.TerraformResourceData, cai resources.Asset) (string, error)
}

AncestryManager is the interface that wraps the GetAncestry method.

func New

func New(retriever ClientRetriever, entries map[string]string, userAgent string, offline bool, errorLogger *zap.Logger) (AncestryManager, error)

New returns AncestryManager that can be used to fetch ancestry information for a project. entries takes project as key and ancestry as value

type ClientRetriever added in v0.5.1

type ClientRetriever interface {
	// NewResourceManagerClient returns an initialized *cloudresourcemanager.Service
	NewResourceManagerClient(userAgent string) *cloudresourcemanager.Service
}

ClientRetriever is the interface that returns an instance of various clients.

Jump to

Keyboard shortcuts

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