• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

goto / guardian / 5875882014

16 Aug 2023 07:24AM UTC coverage: 75.659% (-0.4%) from 76.038%
5875882014

push

github

web-flow
feat: grant dormancy check (#56)

* refactor(provider): refactor ListLogEntries

* feat: grant dormancy check

* fix: read raw config

* fix: fix some query logs issue

* fix: change time range parameter

* feat: send notification to the grants owner

* chore: apply suggestions from code review

Co-authored-by: sushmith <6890568+bsushmith@users.noreply.github.com>

* refactor: reuse slices.UniqueStringSlice

* refactor: reuse StructToMap

* chore: remove unused lines

* chore: enhance error log with provider.URN

* chore: add validation for activity config

* fix: check required private log viewer permission

* test: add test cases for client.ListActivities

* test: add test case for CorrelateGrantActivities

* fix: mark grant.IsPermanent as false when updating the exp date

* chore: fix lint warnings

* chore: extract sending notifications from goroutine

* chore: log activities summary

* chore: log provider_urn as key-value in logger

---------

Co-authored-by: sushmith <6890568+bsushmith@users.noreply.github.com>

408 of 408 new or added lines in 16 files covered. (100.0%)

8377 of 11072 relevant lines covered (75.66%)

4.22 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

66.67
/utils/struct.go
1
package utils
2

3
import "encoding/json"
4

5
// StructToMap converts a struct to a map using json marshalling
6
func StructToMap(v interface{}) (map[string]interface{}, error) {
3✔
7
        result := map[string]interface{}{}
3✔
8

3✔
9
        if v != nil {
5✔
10
                jsonString, err := json.Marshal(v)
2✔
11
                if err != nil {
2✔
12
                        return nil, err
×
13
                }
×
14

15
                if err := json.Unmarshal(jsonString, &result); err != nil {
2✔
16
                        return nil, err
×
17
                }
×
18
        }
19

20
        return result, nil
3✔
21
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc