Documentation
¶
Index ¶
- func WithLogger(logger Logger)
- type Annotation
- type Collector
- func (c *Collector) Entries() []Entry
- func (c *Collector) EntriesWith(annotation string) []Entry
- func (c *Collector) EntriesWithArgType(annotationName string, argumentType string) []Entry
- func (c *Collector) EntriesWithPrefix(prefix string) []Entry
- func (c *Collector) EntriesWithResultType(annotation string, result string) []Entry
- type DefaultLogger
- func (n DefaultLogger) Debug(args ...interface{})
- func (n DefaultLogger) Debugf(format string, args ...interface{})
- func (n DefaultLogger) Error(args ...interface{})
- func (n DefaultLogger) Errorf(format string, args ...interface{})
- func (n DefaultLogger) Fatal(args ...interface{})
- func (n DefaultLogger) Fatalf(format string, args ...interface{})
- func (n DefaultLogger) Info(args ...interface{})
- func (n DefaultLogger) Infof(format string, args ...interface{})
- func (n DefaultLogger) Panic(args ...interface{})
- func (n DefaultLogger) Panicf(format string, args ...interface{})
- func (n DefaultLogger) Trace(args ...interface{})
- func (n DefaultLogger) Tracef(format string, args ...interface{})
- func (n DefaultLogger) Warn(args ...interface{})
- func (n DefaultLogger) Warnf(format string, args ...interface{})
- type Entry
- type EntryFunc
- type EntryFuncType
- type EntryHeader
- type Logger
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithLogger ¶
func WithLogger(logger Logger)
Types ¶
type Annotation ¶
func NewAnnotation ¶
func NewAnnotation(name string, value string) Annotation
func (*Annotation) Decode ¶
func (m *Annotation) Decode(a interface{}) error
func (*Annotation) RawValue ¶
func (m *Annotation) RawValue() string
type Collector ¶
type Collector struct {
// contains filtered or unexported fields
}
func (*Collector) EntriesWith ¶
func (*Collector) EntriesWithArgType ¶
func (*Collector) EntriesWithPrefix ¶
type DefaultLogger ¶
type DefaultLogger struct{}
func (DefaultLogger) Debug ¶
func (n DefaultLogger) Debug(args ...interface{})
func (DefaultLogger) Debugf ¶
func (n DefaultLogger) Debugf(format string, args ...interface{})
func (DefaultLogger) Error ¶
func (n DefaultLogger) Error(args ...interface{})
func (DefaultLogger) Errorf ¶
func (n DefaultLogger) Errorf(format string, args ...interface{})
func (DefaultLogger) Fatal ¶
func (n DefaultLogger) Fatal(args ...interface{})
func (DefaultLogger) Fatalf ¶
func (n DefaultLogger) Fatalf(format string, args ...interface{})
func (DefaultLogger) Info ¶
func (n DefaultLogger) Info(args ...interface{})
func (DefaultLogger) Infof ¶
func (n DefaultLogger) Infof(format string, args ...interface{})
func (DefaultLogger) Panic ¶
func (n DefaultLogger) Panic(args ...interface{})
func (DefaultLogger) Panicf ¶
func (n DefaultLogger) Panicf(format string, args ...interface{})
func (DefaultLogger) Trace ¶
func (n DefaultLogger) Trace(args ...interface{})
func (DefaultLogger) Tracef ¶
func (n DefaultLogger) Tracef(format string, args ...interface{})
func (DefaultLogger) Warn ¶
func (n DefaultLogger) Warn(args ...interface{})
func (DefaultLogger) Warnf ¶
func (n DefaultLogger) Warnf(format string, args ...interface{})
type Entry ¶
type Entry struct {
Header EntryHeader // Metadata for the entry
Comments []string
Module string // Name of the module where the entry is located
File string // Name of the file where the entry is located
Path string // Path to the file where the entry is located
Package string // Name of the package where the entry is located
Func EntryFunc // Details about the function in the entry
Struct string // Name of the struct in the entry
Annotations []Annotation // Annotations for the entry
}
Entry represents a single entry parsed from the *ast.File.
type EntryFunc ¶
type EntryFunc struct {
Name string // Name of the function
Parameters []EntryFuncType // Parameters of the function
Results []EntryFuncType // Results of the function
}
EntryFunc represents a function and its details.
type EntryFuncType ¶
type EntryFuncType struct {
Name string // Name of the parameter/result
Type string // Type of the parameter/result
}
EntryFuncType represents a parameter or a result type of a function.
type EntryHeader ¶
type EntryHeader struct {
Title string // Title of the entry
Description string // Description of the entry
}
EntryHeader represents the metadata for an entry.
type Logger ¶
type Logger interface {
Tracef(format string, args ...interface{})
Trace(args ...interface{})
Debugf(format string, args ...interface{})
Debug(args ...interface{})
Infof(format string, args ...interface{})
Info(args ...interface{})
Warnf(format string, args ...interface{})
Warn(args ...interface{})
Errorf(format string, args ...interface{})
Error(args ...interface{})
Fatalf(format string, args ...interface{})
Fatal(args ...interface{})
Panicf(format string, args ...interface{})
Panic(args ...interface{})
}
Logger is our contract for the logger.
Click to show internal directories.
Click to hide internal directories.