Documentation ¶
Index ¶
- type LogEntry
- type LogEntryIterator
- type Logger
- func (log *Logger) AddSetting(key, value string) error
- func (log *Logger) Close() error
- func (log *Logger) DeleteFile(filepath string) error
- func (log *Logger) DeleteSetting(key string) error
- func (log *Logger) Entries() (*LogEntryIterator, error)
- func (log *Logger) EntriesByParticipantId(participantId string) (*LogEntryIterator, error)
- func (log *Logger) GenerateParticipantId() error
- func (log *Logger) GenerateSeed() (int64, error)
- func (log *Logger) GetSetting(key string) (string, error)
- func (log *Logger) LatestVersionFromFile(filepath string) (int, error)
- func (log *Logger) Log(entry LogEntry) error
- func (log *Logger) OpenFile(filepath string) ([]byte, error)
- func (log *Logger) OpenVersionedFile(filepath string, file_version int) ([]byte, error)
- func (log *Logger) ParticipantId() string
- func (log *Logger) RenameFile(oldFilepath, newFilepath string) error
- func (log *Logger) Reset() error
- func (log *Logger) Setup() error
- func (log *Logger) WriteFile(filepath string, content []byte) error
- func (log *Logger) WriteVersionedFile(filepath string, content []byte, file_version int) error
- type NullTime
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LogEntry ¶
type LogEntry struct { Id int `db:"id,omitempty"` ParticipantId string `db:"participant_id"` ExecutedCommand string `db:"executed_command"` ErrorType string `db:"error_type"` ErrorCode int `db:"error_code"` ErrorMessage string `db:"error_message"` ErrorLine int `db:"error_line"` ErrorColumn int `db:"error_column"` GeneratedOutput string `db:"generated_output"` FilePath string `db:"file_path"` FileVersion int `db:"file_version"` CreatedAt *NullTime `db:"created_at,omitempty"` }
type LogEntryIterator ¶
type LogEntryIterator struct {
// contains filtered or unexported fields
}
Implement a streaming iterator for log entries This will allow us to iterate through the log entries without loading all of them into memory This is useful for large logs
func (*LogEntryIterator) List ¶
func (it *LogEntryIterator) List() ([]LogEntry, error)
func (*LogEntryIterator) Next ¶
func (it *LogEntryIterator) Next() bool
func (*LogEntryIterator) Value ¶
func (it *LogEntryIterator) Value() (LogEntry, error)
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func NewLoggerFromPath ¶
func NewLoggerFromPathPanic ¶
func NewLoggerPanic ¶
func NewLoggerPanic() *Logger
func NewMemoryLogger ¶
func NewMemoryLoggerPanic ¶
func NewMemoryLoggerPanic() *Logger
func (*Logger) AddSetting ¶
func (*Logger) DeleteFile ¶
func (*Logger) DeleteSetting ¶
func (*Logger) Entries ¶
func (log *Logger) Entries() (*LogEntryIterator, error)
func (*Logger) EntriesByParticipantId ¶
func (log *Logger) EntriesByParticipantId(participantId string) (*LogEntryIterator, error)
func (*Logger) GenerateParticipantId ¶
func (*Logger) GenerateSeed ¶
func (*Logger) LatestVersionFromFile ¶
func (*Logger) OpenVersionedFile ¶
func (*Logger) ParticipantId ¶
func (*Logger) RenameFile ¶
Click to show internal directories.
Click to hide internal directories.