Begin work on saving compliance report

This commit is contained in:
Eli Ribble 2026-04-09 23:38:20 +00:00
parent 3ad95e1365
commit 553b65556a
No known key found for this signature in database
22 changed files with 2419 additions and 42 deletions

View file

@ -1614,6 +1614,85 @@ func (e *Notificationtype) Scan(value any) error {
return nil
}
// Enum values for Permissionaccesstype
const (
PermissionaccesstypeDenied Permissionaccesstype = "denied"
PermissionaccesstypeGranted Permissionaccesstype = "granted"
PermissionaccesstypeUnselected Permissionaccesstype = "unselected"
PermissionaccesstypeWithOwner Permissionaccesstype = "with-owner"
)
func AllPermissionaccesstype() []Permissionaccesstype {
return []Permissionaccesstype{
PermissionaccesstypeDenied,
PermissionaccesstypeGranted,
PermissionaccesstypeUnselected,
PermissionaccesstypeWithOwner,
}
}
type Permissionaccesstype string
func (e Permissionaccesstype) String() string {
return string(e)
}
func (e Permissionaccesstype) Valid() bool {
switch e {
case PermissionaccesstypeDenied,
PermissionaccesstypeGranted,
PermissionaccesstypeUnselected,
PermissionaccesstypeWithOwner:
return true
default:
return false
}
}
// useful when testing in other packages
func (e Permissionaccesstype) All() []Permissionaccesstype {
return AllPermissionaccesstype()
}
func (e Permissionaccesstype) MarshalText() ([]byte, error) {
return []byte(e), nil
}
func (e *Permissionaccesstype) UnmarshalText(text []byte) error {
return e.Scan(text)
}
func (e Permissionaccesstype) MarshalBinary() ([]byte, error) {
return []byte(e), nil
}
func (e *Permissionaccesstype) UnmarshalBinary(data []byte) error {
return e.Scan(data)
}
func (e Permissionaccesstype) Value() (driver.Value, error) {
return string(e), nil
}
func (e *Permissionaccesstype) Scan(value any) error {
switch x := value.(type) {
case string:
*e = Permissionaccesstype(x)
case []byte:
*e = Permissionaccesstype(x)
case nil:
return fmt.Errorf("cannot nil into Permissionaccesstype")
default:
return fmt.Errorf("cannot scan type %T: %v", value, value)
}
if !e.Valid() {
return fmt.Errorf("invalid Permissionaccesstype value: %s", *e)
}
return nil
}
// Enum values for Poolconditiontype
const (
PoolconditiontypeBlue Poolconditiontype = "blue"