backstage

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(ctx context.Context, baseURL string, token string, httpClient *http.Client) (*Client, error)

NewClient creates a new Backstage client with an optional bearer token

func (*Client) Client

func (c *Client) Client() *go_backstage.Client

func (*Client) GetEntityOwner

func (c *Client) GetEntityOwner(ctx context.Context, filters ...string) (*EntityReference, error)

GetEntityOwner returns the entity reference for the entity owner.

Entity References https://backstage.io/docs/features/software-catalog/references#string-references Filtering https://backstage.io/docs/features/software-catalog/software-catalog-api#filtering

func (*Client) GetOwnersForGitLabProject

func (c *Client) GetOwnersForGitLabProject(ctx context.Context, projectName string) ([]scm.Actor, error)

func (*Client) GetUser

func (c *Client) GetUser(ctx context.Context, userEntityRef *EntityReference) (*go_backstage.UserEntityV1alpha1, error)

GetUser returns a Backstage user entity.

func (*Client) ListGroupMembers

func (c *Client) ListGroupMembers(ctx context.Context, groupEntityRef *EntityReference) ([]go_backstage.Entity, error)

ListGroupMembers returns all Backstage entities that are members of a group.

type EntityReference

type EntityReference struct {
	Name      string
	Kind      string
	Namespace string
}

https://backstage.io/docs/features/software-catalog/references

func (*EntityReference) IsGroup

func (e *EntityReference) IsGroup() bool

func (*EntityReference) IsUser

func (e *EntityReference) IsUser() bool

func (*EntityReference) ToString

func (e *EntityReference) ToString() string

Jump to

Keyboard shortcuts

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