Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrorLogger ¶
ErrorLogger is the same as a PostRequestLogger, but only logs if an error occurred.
If the generator does not have an [error] as its last return value, [LogError] will never be called.
It returns the code that is used for logging.
type Logger ¶
type Logger interface { // Imports returns the import paths of the imports that are required // for the logger. Imports() []string }
Logger is the abstraction of a logger. It should implement at least one of the below interfaces.
type PostRequestLogger ¶
PostRequestLogger is a Logger that logs after a request is made, regardless of whether an error occurred.
It returns the code that is used for logging.
type PreRequestLogger ¶
PreRequestLogger is a Logger that logs before a request is made.
It returns the code that is used for logging.
type SuccessLogger ¶
SuccessLogger is the same as a PostRequestLogger, but only logs if no error occurred.
If the generator does not have an [error] as its last return value, [LogSuccess] will always be called.
It returns the code that is used for logging.