Documentation ¶
Index ¶
- Constants
- Variables
- func DebugLogErrMsg(h InternalLogHeader, err error, msg string)
- func DebugLogErrNoMsg(h InternalLogHeader, err error)
- func DebugLogNoErrMsg(h InternalLogHeader, msg string)
- func DeleteFileFromLocalStorage(uid string, fileName string) (err error)
- func FileToLines(file *os.File) (lines []string, err error)
- func GetBoolFromString(toCheck string) (b bool)
- func GetLogWriter(path string) (writer *rotatelogs.RotateLogs, err error)
- func GetUnixTime() (stamp int64)
- func LogFatalErrMsg(h InternalLogHeader, err error, msg string)
- func LogFatalErrNoMsg(h InternalLogHeader, err error)
- func LogFatalNoErrMsg(h InternalLogHeader, msg string)
- func LogIncomingRequests(next http.Handler) http.Handler
- func SaveFileToLocalStorage(uid string, fileNameRaw string, src multipart.File) (file *os.File, fileName string, err error)
- func SetLogConfig(newConfig LogConfig)
- func SetLogConfigDefault()
- type A
- type H
- type InternalLogHeader
- type LogConfig
- type LoggingMiddleware
- type Parser
- type Record
- type SecurityMiddleware
Constants ¶
const APPLICATION = "application-log"
APPLICATION log file prefix.
const CONNECTOR = "connector-log"
CONNECTOR log file prefix.
const LOGS = "logs"
LOGS log directory name.
Variables ¶
var LogPath string
LogPath stores log directory path.
Functions ¶
func DebugLogErrMsg ¶
func DebugLogErrMsg(h InternalLogHeader, err error, msg string)
DebugLogErrMsg - Logs request with both error and message
func DebugLogErrNoMsg ¶
func DebugLogErrNoMsg(h InternalLogHeader, err error)
DebugLogErrNoMsg - Logs request without message
func DebugLogNoErrMsg ¶
func DebugLogNoErrMsg(h InternalLogHeader, msg string)
DebugLogNoErrMsg - Logs request without error
func DeleteFileFromLocalStorage ¶
DeleteFileFromLocalStorage takes a uid and a filename and deletes a File determined by the params
func FileToLines ¶
FileToLines will traverse and return an array with all file lines.
func GetBoolFromString ¶
GetBoolFromString converts a string representation of bool to type bool default false
func GetLogWriter ¶
GetLogWriter will return a file log writer.
func GetUnixTime ¶
func GetUnixTime() (stamp int64)
GetUnixTime returns a unix timestamp for when the method got called
func LogFatalErrMsg ¶
func LogFatalErrMsg(h InternalLogHeader, err error, msg string)
LogFatalErrMsg - Logs request with both error and message
func LogFatalErrNoMsg ¶
func LogFatalErrNoMsg(h InternalLogHeader, err error)
LogFatalErrNoMsg - Logs request without message
func LogFatalNoErrMsg ¶
func LogFatalNoErrMsg(h InternalLogHeader, msg string)
LogFatalNoErrMsg - Logs request without error
func LogIncomingRequests ¶
LogIncomingRequests - Logs request traffic into our app.
func SaveFileToLocalStorage ¶
func SaveFileToLocalStorage(uid string, fileNameRaw string, src multipart.File) (file *os.File, fileName string, err error)
SaveFileToLocalStorage - Save the uploaded File in the filesystem. Path: .Records/{uId}/
func SetLogConfigDefault ¶
func SetLogConfigDefault()
SetLogConfigDefault restore logger initial config.
Types ¶
type A ¶
A A record in IGC spec, always the first record in a IGC File. Contains information about FR manufacturer and ID, as well as some additional information (dunno what it is though).
type H ¶
type H struct { Pilot string FlightRecorderType string GliderType string GliderID string FirmwareVersion string HardwareVersion string Date string }
H record, Metadata/header information from a FR recorded flight.
type InternalLogHeader ¶
InternalLogHeader internal log entry without error and message for initialization
func DebugLogPrepareHeader ¶
func DebugLogPrepareHeader(origin string, method string) InternalLogHeader
DebugLogPrepareHeader - Returns a prepared header for logging
type LogConfig ¶
type LogConfig struct {
Path string
}
LogConfig enables users to dictate where log file are to be put.
type LoggingMiddleware ¶
LoggingMiddleware - capture http.Handle.
type Parser ¶
type Parser struct {
Parsed string
}
Parser holds a file, mostly done to keep as much as possible private, while also support testing.
type Record ¶
Record is the metadata information about a IGC approved FR recorded flight. Contains information about the flight recorder itself, as well as some selected header information from the flight.
type SecurityMiddleware ¶
type SecurityMiddleware struct {
App *firebase.App
}
SecurityMiddleware - capture http.Handle.
func (*SecurityMiddleware) CheckIncomingRequests ¶
func (sec *SecurityMiddleware) CheckIncomingRequests(next http.Handler) http.Handler
CheckIncomingRequests - Logs request traffic into our app.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package constant package contains files with various constants in the application.
|
Package constant package contains files with various constants in the application. |
Package models contains various data-structures both for internal usage and payloads in the RESTapi
|
Package models contains various data-structures both for internal usage and payloads in the RESTapi |