Documentation
¶
Overview ¶
Package urn is Blitz's resource names (spec_055_urns): one URN for each thing an organization's service keeps, made only of IDs, such as urn:blitz:runs:<run-id> or urn:blitz:artifacts:<workspace-id>:<job-id>:<run-id>/report.csv.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrName = errors.New("not a Blitz resource name")
ErrName is Parse's error for a string that isn't a resource name.
Functions ¶
This section is empty.
Types ¶
type Name ¶
type Name struct {
Kind Kind
IDs []string
// Path is a file's, "/"-separated and not encoded ("" for none).
Path string
}
Name is a resource name: a kind, its IDs (none for a collection, RN-03), and for artifacts a file's path under them.
func Collection ¶
Collection is the name of every thing of kind k (RN-03).
func Parse ¶
Parse reads a resource name; urn and blitz may be in any case (RN-02), IDs too, and the result has them in lower case.
func (Name) IsCollection ¶
IsCollection says whether n names every thing of its kind.
func (Name) MarshalText ¶
MarshalText writes n as its URN.
func (Name) Parent ¶
Parent is the name n is under: a file's thing, or for a thing with several IDs, the same kind with its last one dropped; ok is false for a collection or a thing with one ID.
func (*Name) UnmarshalText ¶
UnmarshalText reads a URN into n.