Documentation ¶
Overview ¶
Package internal splits out ImmutableObject into a separate package from storagemem to make it impossible to modify ImmutableObject via direct field access.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ImmutableObject ¶
type ImmutableObject struct { storageutil.ObjectInfo // contains filtered or unexported fields }
ImmutableObject is an object that contains a path, external path, and data that is never modified.
We make this a struct so there is no weirdness with returning a nil interface.
func NewImmutableObject ¶
func NewImmutableObject( path string, externalPath string, localPath string, data []byte, ) *ImmutableObject
NewImmutableObject returns a new ImmutableObject.
path is expected to always be non-empty. If externalPath is empty, normalpath.Unnormalize(path) is used.
func (*ImmutableObject) Data ¶
func (i *ImmutableObject) Data() []byte
Data returns the data.
DO NOT MODIFY.
Click to show internal directories.
Click to hide internal directories.