shared

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// EndpointResourceType is the Azure DevOps pipeline permission resource type for service connections.
	EndpointResourceType = "endpoint"
)

Variables

View Source
var ErrEndpointNotFound = errors.New("service endpoint not found")

ErrEndpointNotFound indicates that the requested service endpoint could not be located in the target project.

Functions

func FindServiceEndpoint

func FindServiceEndpoint(ctx util.CmdContext, client serviceendpoint.Client, project, identifier string) (*serviceendpoint.ServiceEndpoint, error)

FindServiceEndpoint resolves a service endpoint by ID or name within a project. It returns the endpoint, a flag indicating whether the resolution used the name lookup path, or ErrEndpointNotFound when nothing matched.

func GrantAllPipelinesAccessToEndpoint

func GrantAllPipelinesAccessToEndpoint(
	cmdCtx util.CmdContext,
	organization string,
	projectID uuid.UUID,
	endpointID uuid.UUID,
	cleanup CleanupFunc,
) error

GrantAllPipelinesAccessToEndpoint allows every pipeline in the specified project to use the service endpoint.

func ResolveProjectReference

func ResolveProjectReference(ctx util.CmdContext, scope *util.Scope) (*serviceendpoint.ProjectReference, error)

ResolveProjectReference fetches the project metadata required to attach service endpoints to a project. It returns a ProjectReference that includes the stable storage key (ID) and display name.

Types

type CleanupFunc

type CleanupFunc func() error

CleanupFunc allows callers to provide optional rollback logic when granting permissions fails.

Jump to

Keyboard shortcuts

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