Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrExists = errors.New("resource already exists") ErrNotFound = errors.New("resource not found") )
Functions ¶
This section is empty.
Types ¶
type Identifiable ¶ added in v0.6.3
type Identifiable interface {
GetID() ID
}
Identifiable is a Pug resource with an identity.
type MonotonicID ¶ added in v0.6.3
MonotonicID is an identifier based on an ever-increasing serial number, and a kind to differentiate it from other kinds of identifiers.
func NewMonotonicID ¶ added in v0.6.3
func NewMonotonicID(kind Kind) MonotonicID
func (MonotonicID) String ¶ added in v0.6.3
func (id MonotonicID) String() string
String provides a human readable representation of the identifier.
type Resource ¶
type Resource interface {
// GetID retrieves the unique identifier for the resource.
GetID() MonotonicID
// String is a human-readable identifier for the resource. Not necessarily
// unique across pug.
String() string
}
Resource is a unique pug entity
Click to show internal directories.
Click to hide internal directories.