fs: Formalize the ObjectUnWrapper interface

This commit is contained in:
Nick Craig-Wood 2018-01-31 14:22:49 +00:00
parent b3d8b7e22e
commit 2eb5cfb7ad
2 changed files with 20 additions and 12 deletions

View File

@ -674,4 +674,5 @@ var (
_ fs.ListRer = (*Fs)(nil)
_ fs.ObjectInfo = (*ObjectInfo)(nil)
_ fs.Object = (*Object)(nil)
_ fs.ObjectUnWrapper = (*Object)(nil)
)

View File

@ -237,6 +237,13 @@ type MimeTyper interface {
MimeType() string
}
// ObjectUnWrapper is an optional interface for Object
type ObjectUnWrapper interface {
// UnWrap returns the Object that this Object is wrapping or
// nil if it isn't wrapping anything
UnWrap() Object
}
// ListRCallback defines a callback function for ListR to use
//
// It is called for each tranche of entries read from the listing and