Documentation ¶
Overview ¶
A GRN string is expressed in the format:
grn:${tenant_id}:${kind}/${id}
The format of the final id is defined by the owning service and not validated by the GRN parser. Prefer using UIDs where possible.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInvalidGRN = errutil.NewBase(errutil.StatusValidationFailed, "grn.InvalidGRN")
)
Functions ¶
This section is empty.
Types ¶
type GRN ¶
type GRN struct { // TenantID contains the ID of the tenant (in hosted grafana) or // organization (in other environments) the resource belongs to. This field // may be omitted for global Grafana resources which are not associated with // an organization. TenantID int64 // The kind of resource being identified, for e.g. "dashboard" or "user". // The caller is responsible for validating the value. ResourceKind string // ResourceIdentifier is used by the underlying service to identify the // resource. ResourceIdentifier string // contains filtered or unexported fields }
Grafana resource name. See also: https://github.com/grafana/grafana/blob/main/pkg/services/store/entity/entity.proto#L6 NOTE: This structure/format is still under active development and is subject to change
func MustParseStr ¶
MustParseStr is a wrapper around ParseStr that panics if the given input is not a valid GRN. This is intended for use in tests.
Click to show internal directories.
Click to hide internal directories.