File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 99 "time"
1010
1111 "github.com/stackitcloud/stackit-sdk-go/core/oapierror"
12- "github.com/stackitcloud/stackit-sdk-go/services/auditlog"
12+ auditlog "github.com/stackitcloud/stackit-sdk-go/services/auditlog/v2api "
1313)
1414
1515func main () {
@@ -26,7 +26,7 @@ func main() {
2626 }
2727
2828 // List all audit logs of a project
29- listProjectLogsReq := auditlogClient .ListProjectAuditLogEntries (context .Background (), projectId ).
29+ listProjectLogsReq := auditlogClient .DefaultAPI . ListProjectAuditLogEntries (context .Background (), projectId ).
3030 StartTimeRange (startTime ).
3131 EndTimeRange (endTime ).
3232 Limit (limit )
@@ -54,12 +54,12 @@ func main() {
5454 os .Exit (1 )
5555 }
5656 // Break loop when response has no items
57- if result == nil || result .Items == nil || len (* result .Items ) == 0 {
57+ if result == nil || result .Items == nil || len (result .Items ) == 0 {
5858 break
5959 }
6060
6161 // Append items to allItems
62- allItems = append (allItems , * result .Items ... )
62+ allItems = append (allItems , result .Items ... )
6363
6464 // If cursor is not set, end of logs is reached
6565 if result .Cursor == nil {
Original file line number Diff line number Diff line change @@ -2,6 +2,9 @@ module auditlog
22
33go 1.21
44
5+ // This is not needed in production. This is only here to point the golangci linter to the local version instead of the last release on GitHub.
6+ replace github.com/stackitcloud/stackit-sdk-go/services/auditlog => ../../services/auditlog
7+
58require (
69 github.com/stackitcloud/stackit-sdk-go/core v0.21.1
710 github.com/stackitcloud/stackit-sdk-go/services/auditlog v0.1.5
You can’t perform that action at this time.
0 commit comments