Documentation ¶
Overview ¶
Package loginfo tracks changes to objects when they're saved, noting the actor performing the action, what kind of action it was, the time of the change, the type of object and its id, and a dump of the object's state.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LogEvent ¶
LogEvent writes an event of the action type, performed by the given actor, against the given object.
func PurgeLogInfos ¶
PurgeLogInfos removes all logged events before the given id.
Types ¶
type LogInfo ¶
type LogInfo struct { Actor actor.Actor `json:"-"` ActorInfo string `json:"actor_info"` ActorType string `json:"actor_type"` Time time.Time `json:"time"` Action string `json:"action"` ObjectType string `json:"object_type"` ObjectName string `json:"object_name"` ExtendedInfo string `json:"extended_info"` ID int `json:"id"` }
LogInfo holds log information about events.
func AllLogInfos ¶
func AllLogInfos() []*LogInfo
AllLogInfos returns a list of all logged events in the database. Provides a wrapper around GetLogInfos() for consistency with the other object types for exporting data.
func GetLogInfos ¶
GetLogInfos gets a slice of the logged events. May be called with an offset and limit, (in that order) but that is not required. The offset can be specified without a limit, but a limit requires an offset (which can be 0). The map of search params may be nil, but something must be present.