Documentation ¶
Overview ¶
Package bookkeeping helps persist documents state to disk
Index ¶
- func GetCommandInterimState(log log.T, commandID, instanceID, locationFolder string) message.CommandState
- func GetDocumentInfo(log log.T, commandID, instanceID, locationFolder string) message.DocumentInfo
- func GetPluginState(log log.T, pluginID, commandID, instanceID, locationFolder string) message.PluginState
- func MoveCommandState(log log.T, commandID, instanceID, srcLocationFolder, dstLocationFolder string)
- func PersistData(log log.T, commandID, instanceID, locationFolder string, object interface{})
- func PersistDocumentInfo(log log.T, docInfo message.DocumentInfo, ...)
- func PersistPluginState(log log.T, pluginState message.PluginState, ...)
- func RemoveData(log log.T, commandID, instanceID, locationFolder string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCommandInterimState ¶
func GetCommandInterimState(log log.T, commandID, instanceID, locationFolder string) message.CommandState
GetCommandInterimState returns CommandState object after reading file <commandID> from locationFolder under defaultLogDir/instanceID
func GetDocumentInfo ¶
func GetDocumentInfo(log log.T, commandID, instanceID, locationFolder string) message.DocumentInfo
GetDocumentInfo returns the document info for the specified commandID
func GetPluginState ¶
func GetPluginState(log log.T, pluginID, commandID, instanceID, locationFolder string) message.PluginState
GetPluginState returns PluginState after reading fileName from given locationFolder under defaultLogDir/instanceID
func MoveCommandState ¶
func MoveCommandState(log log.T, commandID, instanceID, srcLocationFolder, dstLocationFolder string)
MoveCommandState moves the CommandState object
func PersistData ¶
PersistData stores the given object in the file-system in pretty Json indented format This will override the contents of an already existing file
func PersistDocumentInfo ¶
func PersistDocumentInfo(log log.T, docInfo message.DocumentInfo, commandID, instanceID, locationFolder string)
PersistDocumentInfo stores the given PluginState in file-system in pretty Json indented format This will override the contents of an already existing file
func PersistPluginState ¶
func PersistPluginState(log log.T, pluginState message.PluginState, pluginID, commandID, instanceID, locationFolder string)
PersistPluginState stores the given PluginState in file-system in pretty Json indented format This will override the contents of an already existing file
func RemoveData ¶
RemoveData deletes the fileName from locationFolder under defaultLogDir/instanceID
Types ¶
This section is empty.