fs: Formalize the ObjectUnWrapper interface
This commit is contained in:
parent
b3d8b7e22e
commit
2eb5cfb7ad
2 changed files with 20 additions and 12 deletions
|
@ -674,4 +674,5 @@ var (
|
||||||
_ fs.ListRer = (*Fs)(nil)
|
_ fs.ListRer = (*Fs)(nil)
|
||||||
_ fs.ObjectInfo = (*ObjectInfo)(nil)
|
_ fs.ObjectInfo = (*ObjectInfo)(nil)
|
||||||
_ fs.Object = (*Object)(nil)
|
_ fs.Object = (*Object)(nil)
|
||||||
|
_ fs.ObjectUnWrapper = (*Object)(nil)
|
||||||
)
|
)
|
||||||
|
|
7
fs/fs.go
7
fs/fs.go
|
@ -237,6 +237,13 @@ type MimeTyper interface {
|
||||||
MimeType() string
|
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
|
// ListRCallback defines a callback function for ListR to use
|
||||||
//
|
//
|
||||||
// It is called for each tranche of entries read from the listing and
|
// It is called for each tranche of entries read from the listing and
|
||||||
|
|
Loading…
Add table
Reference in a new issue