MCPcopy Index your code
hub / github.com/coder/coder / convertAuditLogs

Method convertAuditLogs

coderd/audit.go:195–203  ·  view source on GitHub ↗
(ctx context.Context, dblogs []database.GetAuditLogsOffsetRow)

Source from the content-addressed store, hash-verified

193}
194
195func (api *API) convertAuditLogs(ctx context.Context, dblogs []database.GetAuditLogsOffsetRow) []codersdk.AuditLog {
196 alogs := make([]codersdk.AuditLog, 0, len(dblogs))
197
198 for _, dblog := range dblogs {
199 alogs = append(alogs, api.convertAuditLog(ctx, dblog))
200 }
201
202 return alogs
203}
204
205func (api *API) convertAuditLog(ctx context.Context, dblog database.GetAuditLogsOffsetRow) codersdk.AuditLog {
206 ip, _ := netip.AddrFromSlice(dblog.AuditLog.Ip.IPNet.IP)

Callers 1

auditLogsMethod · 0.95

Calls 1

convertAuditLogMethod · 0.95

Tested by

no test coverage detected