Documentation
¶
Index ¶
- Constants
- Variables
- func FindServiceEndpoint(ctx util.CmdContext, client serviceendpoint.Client, project, identifier string) (*serviceendpoint.ServiceEndpoint, error)
- func GrantAllPipelinesAccessToEndpoint(cmdCtx util.CmdContext, organization string, projectID uuid.UUID, ...) error
- func ResolveProjectReference(ctx util.CmdContext, scope *util.Scope) (*serviceendpoint.ProjectReference, error)
- type CleanupFunc
Constants ¶
const (
// EndpointResourceType is the Azure DevOps pipeline permission resource type for service connections.
EndpointResourceType = "endpoint"
)
Variables ¶
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.