Documentation ¶
Overview ¶
Package mockobject provides a mock object which can be created from a string
Index ¶
- Variables
- type Object
- func (o Object) Fs() fs.Info
- func (o Object) Hash(hash.Type) (string, error)
- func (o Object) ModTime() (t time.Time)
- func (o Object) Open(options ...fs.OpenOption) (io.ReadCloser, error)
- func (o Object) Remote() string
- func (o Object) Remove() error
- func (o Object) SetModTime(time.Time) error
- func (o Object) Size() int64
- func (o Object) Storable() bool
- func (o Object) String() string
- func (o Object) Update(in io.Reader, src fs.ObjectInfo, options ...fs.OpenOption) error
- func (o Object) WithContent(content []byte, mode SeekMode) fs.Object
- type SeekMode
Constants ¶
This section is empty.
Variables ¶
View Source
var SeekModes = []SeekMode{SeekModeNone, SeekModeRegular, SeekModeRange}
SeekModes contains all valid SeekMode's
Functions ¶
This section is empty.
Types ¶
type Object ¶
type Object string
Object is a mock fs.Object useful for testing
func (Object) Hash ¶
Hash returns the selected checksum of the file If no checksum is available it returns ""
func (Object) ModTime ¶
ModTime returns the modification date of the file It should return a best guess if one isn't available
func (Object) Open ¶
func (o Object) Open(options ...fs.OpenOption) (io.ReadCloser, error)
Open opens the file for read. Call Close() on the returned io.ReadCloser
func (Object) SetModTime ¶
SetModTime sets the metadata on the object to set the modification date
func (Object) Update ¶
func (o Object) Update(in io.Reader, src fs.ObjectInfo, options ...fs.OpenOption) error
Update in to the object with the modTime given of the given size
Click to show internal directories.
Click to hide internal directories.