MCPcopy
hub / github.com/authgear/authgear-server / Log

Struct Log

pkg/lib/audit/log.go:14–23  ·  view source on GitHub ↗

Log represents an audit log entry. The keys in JSON struct tags are in camel case because this struct is directly returned in the GraphQL endpoint. Making the keys in camel case saves us from writing boilerplate resolver code.

Source from the content-addressed store, hash-verified

12// because this struct is directly returned in the GraphQL endpoint.
13// Making the keys in camel case saves us from writing boilerplate resolver code.
14type Log struct {
15 ID string `json:"id"`
16 CreatedAt time.Time `json:"createdAt"`
17 ActivityType string `json:"activityType"`
18 UserID string `json:"userID,omitempty"`
19 IPAddress string `json:"ipAddress,omitempty"`
20 UserAgent string `json:"userAgent,omitempty"`
21 ClientID string `json:"clientID,omitempty"`
22 Data map[string]any `json:"data,omitempty"`
23}
24
25func NewLog(e *event.Event) (*Log, error) {
26 var userID string

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected