Documentation
¶
Index ¶
- Constants
- func ApplyPrivateDirectoryMode(location string) error
- func ApplyPrivateFileMode(location string) error
- func EnsurePrivateSubdirectory(base string, relative string) (string, error)
- func PreparePrivateDirectory(raw string) (string, error)
- func PrivateFilePath(base string, partition string, fileName string, createParent bool) (string, error)
- func PrivateSubdirectoryPath(base string, relative string) (string, error)
- func RawBytes(data map[string]any, maximum int64) ([]byte, error)
- func RawData(content []byte) map[string]any
- func SecureRegularFile(location string) error
- func SyncDirectory(directory string) error
- func SyncRegularFile(location string) error
- type BoundedJSONEncoderDecoder
- type RawEncoderDecoder
Constants ¶
View Source
const ( PrivateDirectoryMode = 0o700 PrivateFileMode = 0o600 )
View Source
const RawContentKey = "content"
Variables ¶
This section is empty.
Functions ¶
func ApplyPrivateFileMode ¶
func PreparePrivateDirectory ¶
func PrivateFilePath ¶
func PrivateSubdirectoryPath ¶
PrivateSubdirectoryPath returns a validated path beneath a private base without creating missing child directories.
func SecureRegularFile ¶
func SyncDirectory ¶
func SyncRegularFile ¶
Types ¶
type BoundedJSONEncoderDecoder ¶
type BoundedJSONEncoderDecoder struct {
MaximumBytes int64
}
BoundedJSONEncoderDecoder is a MapStore codec that rejects oversized files and trailing JSON values.
type RawEncoderDecoder ¶
type RawEncoderDecoder struct {
MaximumBytes int64
}
RawEncoderDecoder lets MapFileStore atomically manage a native payload file without wrapping the payload in JSON on disk.
The in-memory MapStore representation has exactly one string value. Go strings can own arbitrary bytes and avoid exposing mutable byte slices to MapStore's map-copying API.
Click to show internal directories.
Click to hide internal directories.