Documentation ¶
Index ¶
- Variables
- func GetAppDataDir(pwd string, isDebugBuild bool) (string, error)
- func InitLogFile(appDataDir, logFileName string) (*os.File, error)
- func InitLogger(logFile io.Writer, appVersion, commitSha string) zerolog.Logger
- func InitializeAppDataDir(appDataDir string)
- func IsWailsRunningAppToGenerateBindings(osArgs []string) bool
- func NewValidationError(msg string) error
- func NewWailsLoggerAdapter(logger *zerolog.Logger) logger.Logger
- type Context
- type ErrorHandler
- type ValidationError
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrValidation = &ValidationError{ActualError: errors.New("VALIDATION_ERROR")} ErrFatal = errors.New("FATAL_ERROR") )
Functions ¶
func InitLogFile ¶
InitLogFile creates (or appends) a log file in the app data directory
func InitializeAppDataDir ¶
func InitializeAppDataDir(appDataDir string)
InitializeAppDataDir creates the app data directory if it does not exist and exits the program if it cannot be created
func NewValidationError ¶
Types ¶
type Context ¶
type ErrorHandler ¶
type ErrorHandler interface { Catch(ctx Context, logger zerolog.Logger, err error) CatchWithMsg(ctx Context, logger zerolog.Logger, err error, msg string) }
func NewErrorHandler ¶
func NewErrorHandler() ErrorHandler
type ValidationError ¶
type ValidationError struct {
ActualError error
}
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
func (*ValidationError) Is ¶
func (e *ValidationError) Is(target error) bool
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Click to show internal directories.
Click to hide internal directories.