Documentation ¶
Index ¶
- func GetKey(entityType string, keyPart ...string) string
- type Event
- type File
- type Manager
- func (store Manager) AddEvent(eventtype, mediatype, details string, ip string, expiresafter time.Duration) (Event, error)
- func (store Manager) AddFile(filepath, description string) (File, error)
- func (store Manager) Close() error
- func (store Manager) DeleteFile(id string) error
- func (store Manager) GetAllEvents() ([]Event, error)
- func (store Manager) GetAllFiles() ([]File, error)
- func (store Manager) GetEvent(id string) (Event, error)
- func (store Manager) GetFile(id string) (File, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Event ¶
type Event struct { ID string `json:"id"` // Unique Event ID Created time.Time `json:"created"` // Event creation time SourceIP string `json:"ip"` // Source IP address of the event EventType string `json:"eventtype"` // One of: System startup, File found, File processed, File error, System shutdown MediaType string `json:"mediatype"` // The type of media involved: TV / Movie / Music / System Details string `json:"details"` // Additional information (like the files involved) }
Event represents an event in the system. These events can be logged or passed (as meta information) to other systems
type File ¶
type File struct { ID string `json:"id"` // Unique File ID Created time.Time `json:"created"` // File create time FilePath string `json:"filepath"` // Full filepath to the file Description string `json:"details"` // Additional information (like the files involved) }
File represents an uploaded file.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager is the data manager
func NewManager ¶
NewManager creates a new instance of a Manager and returns it
func (Manager) AddEvent ¶
func (store Manager) AddEvent(eventtype, mediatype, details string, ip string, expiresafter time.Duration) (Event, error)
AddEvent adds an event to the system
func (Manager) DeleteFile ¶
DeleteFile deletes a file from the system
func (Manager) GetAllEvents ¶
GetAllEvents gets all events in the system
func (Manager) GetAllFiles ¶
GetAllFiles gets all files in the system
Click to show internal directories.
Click to hide internal directories.