privatefiles

package
v0.0.0-...-2d4ef54 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 15, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package privatefiles confines private credential reads and atomic writes to regular 0600 files and owned 0700 directories.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Lock

func Lock(root *os.Root, name string) (*os.File, error)

Lock coordinates independent deployment processes. Closing the returned file releases the OS lock, including when its process exits unexpectedly.

func OpenRoot

func OpenRoot(dir string) (*os.Root, error)

func OpenSubRoot

func OpenSubRoot(parent *os.Root, name string) (*os.Root, error)

func Read

func Read(path string, limit int64) ([]byte, error)

func ReadAt

func ReadAt(root *os.Root, name string, limit int64) ([]byte, error)

func SyncDirectory

func SyncDirectory(root *os.Root) error

SyncDirectory persists a newly published filename as well as its contents.

func Write

func Write(root *os.Root, name string, data []byte) error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL