backstage

package
v0.0.0-...-c8138b3 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: Apache-2.0 Imports: 9 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 {
	// BaseURL is the base URL for the Backstage API.
	BaseURL string
	// This is a Bearer tokem for when the Backstage requires auth.
	AuthToken string
	// This is updated with the Etag when a request returns an Etag.
	LastEtag string
	// contains filtered or unexported fields
}

Client is a Backstage client for querying entities.

func NewClient

func NewClient(BaseURL, auth string) *Client

NewClient creates and returns a client ready for use.

type Link struct {
	// URL is standard URI format.
	URL string `json:"url"`

	// Title is a user friendly display name for the link.
	Title string `json:"title,omitempty"`

	// Icon is a key representing a visual icon to be displayed in the UI.
	Icon string `json:"icon,omitempty"`

	// Type is an optional value to categorize links into specific groups.
	Type string `json:"type,omitempty"`
}

Link can provide additional contextual information that may be located outside of Backstage itself.

https://backstage.io/docs/features/software-catalog/descriptor-format#links-optional

type Metadata

type Metadata struct {
	// Name of the entity.
	Name string `json:"name"`

	// Namespace is optional ID of a namespace that the entity belongs to.
	Namespace string `json:"namespace,omitempty"`

	// Description is a human readable description of the entity, to be shown in Backstage.
	Description string `json:"description,omitempty"`

	// Title is the display name of the entity, to be presented in user interfaces instead of the name property above, when available.
	Title string `json:"title,omitempty"`

	// 	Labels are optional key/value pairs of that are attached to the entity, and their use is identical to Kubernetes object labels.
	Labels map[string]string `json:"labels,omitempty"`

	// Annotations are arbitrary non-identifying metadata attached to the entity, identical in use to Kubernetes object annotations.
	Annotations map[string]string `json:"annotations,omitempty"`

	// Tags are a list of single-valued strings, for example to classify catalog entities in various ways.
	Tags []string `json:"tags,omitempty"`

	// Links are a list of external hyperlinks related to the entity.
	Links []Link `json:"links,omitempty"`

	// UID is the unique ID assigned to this resource.
	UID string `json:"uid"`
}

Metadata is the metadata for Backstage entities.

https://backstage.io/docs/features/software-catalog/descriptor-format#common-to-all-kinds-the-metadata

type Relation

type Relation struct {
	// The type of relation FROM a source entity TO the target entity.
	Type string `json:"type"`

	// TargetRef is a string version of the Target.
	TargetRef string `json:"targetRef,omitempty"`

	// Target is a complete compound reference to the other end of the relation.
	Target struct {
		// Name is the name of the entity being referenced.
		Name string `json:"name"`
		// Namespace is the namespace of the entity being referenced.
		Namespace string `json:"namespace"`
		// Kind is the kind of entity being referenced.
		Kind string `json:"kind"`
	} `json:"target"`
}

Relation is a relation from an entity to another entity.

https://backstage.io/docs/features/software-catalog/descriptor-format#common-to-all-kinds-relations

type Team

type Team struct {
	// Name is the name of the Group.
	Name string
	// Namespace is the namespace of the Group.
	Namespace string
	// Description is the Group description.
	Description string
	// UID is the Unique ID of the Group.
	UID string

	// Members is a list of the members of the team.
	Members []TeamMember
}

Team represents the information Backstage has about a Group entity of type Team.

type TeamMember

type TeamMember struct {
	// Name is the username.
	Name string `json:"name"`
	// Namespace is the namespace that provides scope for the Name.
	Namespace string `json:"namespace"`
}

TeamMember is a user who is a member of the team.

type TypeMeta

type TypeMeta struct {
	// Kind is the high level entity type being described.
	Kind string `json:"kind,omitempty"`
	// APIVersion is the version of specification format for that particular entity that the specification is made against.
	APIVersion string `json:"apiVersion,omitempty"`
}

TypeMeta is the entity envelope.

https://backstage.io/docs/features/software-catalog/descriptor-format#common-to-all-kinds-the-envelope

Jump to

Keyboard shortcuts

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