Begin work on saving compliance report
This commit is contained in:
parent
3ad95e1365
commit
553b65556a
22 changed files with 2419 additions and 42 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue