Make Named,Tagged, and Digested implement Reference

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
This commit is contained in:
Derek McGowan 2015-10-09 16:01:31 -07:00
parent 6bd5b8c24e
commit 3943c4165c

View file

@ -98,26 +98,28 @@ func (f *Field) UnmarshalText(p []byte) error {
// Named is an object with a full name
type Named interface {
Reference
Name() string
}
// Tagged is an object which has a tag
type Tagged interface {
Reference
Tag() string
}
// Digested is an object which has a digest
// in which it can be referenced by
type Digested interface {
Reference
Digest() digest.Digest
}
// Canonical reference is an object with a fully unique
// name including a name with hostname and digest
type Canonical interface {
Reference
Named
Digested
Digest() digest.Digest
}
// SplitHostname splits a named reference into a