Files
trufflehog/pkg/sources/source_unit.go
Miccah e12f0f84a1 Setup SourceUnit interface (#1393)
* Test: Asymmetrical unmarshal API

* Test: Symmetric marshal API

* Revert "Test: Symmetric marshal API"

This reverts commit f51c64a797.

* Cleanup test example and add SourceUnitUnmarshaller interface

* Add CommonSourceUnit implementation

* Update comments

* Remove UnmarshalJSON
2023-06-16 10:38:28 -05:00

13 lines
316 B
Go

package sources
// CommonSourceUnit is a common implementation of SourceUnit that Sources can
// use instead of implementing their own types.
type CommonSourceUnit struct {
ID string `json:"source_unit_id"`
}
// Implement the SourceUnit interface.
func (c CommonSourceUnit) SourceUnitID() string {
return c.ID
}