Help us shape the future of Go! Take the 2026 Go Developer Survey

orderaudit

package
v1.21.2 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package orderaudit writes the durable audit record created alongside an order. Callers invoke it with the transaction-scoped log repository so the order and its audit row commit or roll back together.

Index

Constants

View Source
const (
	SourceUser  = "user"
	SourceGuest = "guest"
	SourceAdmin = "admin"
)

The sources an order audit record names as the order's creator.

Variables

This section is empty.

Functions

func InsertCreated

func InsertCreated(ctx context.Context, logs LogWriter, data *order.Order, source string) error

InsertCreated stores a safe order summary and request risk metadata.

Types

type LogWriter added in v1.21.0

type LogWriter interface {
	Insert(ctx context.Context, data *logEntity.SystemLog) error
}

LogWriter appends to the audit log; the transaction-scoped log repository satisfies it.

Jump to

Keyboard shortcuts

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