Documentation
¶
Index ¶
Constants ¶
View Source
const ( // DirTypeConfig is a directory used to store configuration. This is commonly // used to store application configs like yaml or json files used during // the bootstrapping phase of an application startup. DirTypeConfig dirType = iota // DirTypeCache is a directory used to store any temporary cache that is generated // by the application. This directory type can be used to store tokens when logging in, // or serialized cache such as large responses that you don't want to have to request again // for some amount of time. Anything in here should be considered temporary and can be removed // at any time. DirTypeCache // DirTypeData is a directory to store long term data. This data can be database files or assets // that need to later be extracted out into another location. Things in this directory should be // considered important and backed up. DirTypeData )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CleanupFunc ¶
type CleanupFunc func() error
type Namespace ¶
type Namespace struct {
// contains filtered or unexported fields
}
Namespace holds the directory parts that will be joined together to form a namespaced path segment in the final workdir.
func NewNamespace ¶
NewNamespace returns a new Namespace with the provided parts slice set
type Options ¶
type Options struct { // Mode is the octal filemode to use when creating each directory Mode os.FileMode }
Options for changing the behavior of directory management
type WorkDir ¶
type WorkDir struct { // Path is the absolute path to the directory requested. Path string // Cleanup is a function that will cleanup any directory and files under // Path. Cleanup CleanupFunc }
WorkDir is a response type that contains the Path to a directory created by this package.
Click to show internal directories.
Click to hide internal directories.