Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AppFs = afero.NewOsFs()
AppFs is a layer of abstraction for the filesystem
View Source
var RootCmd = &cobra.Command{
Use: "rot",
Short: `rot empowers you to stage files and folders for rotting (later deletion).`,
}
RootCmd represents the base command when called without any subcommands
Functions ¶
Types ¶
type RotItem ¶
type RotItem struct { Path string `json:"path"` IsFolder bool `json:"is_folder,omitempty"` Hash string `json:"hash"` // currently SHA-256 DeleteIfModified bool `json:"delete_if_modified,omitempty"` AddedAt time.Time `json:"added_at"` DeleteAt time.Time `json:"delete_at,omitempty"` }
RotItem is modelling one file or folder to rot
func NewRotItem ¶
NewRotItem returns a new RotItem if the referenced path exists
func (RotItem) HasChanged ¶
HasChanged determines if the referenced item has changed since being staged for rotting.
func (RotItem) IsRotten ¶
IsRotten determines if the referenced item could be deleted at given time.
func (*RotItem) SetDeletionDate ¶
SetDeletionDate sets the date for deletion of the referenced item
func (*RotItem) SetDeletionDuration ¶
SetDeletionDuration sets the date for deletion of the referenced item by supplying an ISO 8601 duration string
Source Files
¶
Click to show internal directories.
Click to hide internal directories.