util

package
v0.0.0-...-56a5168 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 17, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnqueueRequestLog

func EnqueueRequestLog(entry LogEntry)

func GetLogChannelSize

func GetLogChannelSize() int

func PointerNotNil

func PointerNotNil[T any](ptr *T) bool

func PointerNotNilIdx

func PointerNotNilIdx[T any](ptr *T, _ int) bool

func WriteChannelLogsToFile

func WriteChannelLogsToFile()

func WriteLogsToFile

func WriteLogsToFile(date time.Time, entries []LogEntry)

Types

type LogEntry

type LogEntry struct {
	Timestamp time.Time `json:"timestamp"`
	UserID    string    `json:"user_id"`
	Endpoint  string    `json:"endpoint"`
	FriendID  string    `json:"friend_id"`
}

func GetLogsForDate

func GetLogsForDate(date time.Time) (logEntries []LogEntry, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL