Versions in this module Expand all Collapse all v1 v1.1.0 Sep 11, 2026 Changes in this version type Client + func (c *Client) Enqueue(entry LogEntry, onSent OnSent, onFailed OnFailed) (bool, error) + func (c *Client) EnqueueMany(entries []LogEntry, onSent OnSent, onFailed OnFailed) (int, error) v1.0.0 Sep 9, 2026 Changes in this version + func ApplyBodyRedaction(body string, plan *RedactionPlan) string + func ContainsAlwaysRedactedName(body string) bool + func SerializeHeaders(headers http.Header, plan *RedactionPlan) string + type Client struct + func New(opts Options) (*Client, error) + func (c *Client) Logger() Logger + func (c *Client) Middleware(opts RequestLoggingOptions) func(http.Handler) http.Handler + func (c *Client) Shutdown(ctx context.Context) error + type EnricherFunc func(r *http.Request, statusCode int, responseHeaders http.Header) string + type LogEntry struct + AppVersionName string + CollectionName string + CorrelationID string + Date time.Time + Detail map[string]string + DeviceIdentifier string + Event string + LogLevel LogLevel + LogSourceType LogSourceType + Metadata map[string]string + Path string + type LogError struct + Cause error + Message string + Reason LogFailureReason + StatusCode int + func (e *LogError) Error() string + type LogFailureReason string + const LogFailureReasonForbidden + const LogFailureReasonHTTPError + const LogFailureReasonNetwork + const LogFailureReasonQueueFull + const LogFailureReasonTimeout + const LogFailureReasonUnauthorized + type LogLevel int + const LogLevelDebug + const LogLevelError + const LogLevelFatal + const LogLevelInformation + const LogLevelWarning + type LogSourceType int + const LogSourceTypeBackend + const LogSourceTypeDevice + type Logger interface + Enqueue func(entry LogEntry, onSent OnSent, onFailed OnFailed) (bool, error) + EnqueueMany func(entries []LogEntry, onSent OnSent, onFailed OnFailed) (int, error) + type OnFailed func(entry LogEntry, err *LogError) + type OnSent func(entry LogEntry) + type Options struct + APILogsCollectionName string + AppVersionName string + BatchSize int + BulkPath string + DeviceIdentifier string + FlushInterval time.Duration + HTTPTimeout time.Duration + QueueCapacity int + SecretKey string + type RedactionPlan struct + RedactAll bool + func NewRedactionPlan(redactAll bool, declaredNames []string) *RedactionPlan + func (p *RedactionPlan) ContainsDeclaredName(body string) bool + func (p *RedactionPlan) HasDeclaredRedactions() bool + func (p *RedactionPlan) ShouldRedact(name string) bool + type RequestLoggingOptions struct + Detail map[string]EnricherFunc + ExcludePaths []string + Metadata map[string]EnricherFunc + RedactFields []string + RedactPaths []string + ResolveAppVersionName func(r *http.Request) string + ResolveDeviceIdentifier func(r *http.Request) string Other modules containing this package github.com/pinqponq/pinqloq-go-sdk/v2