diff options
Diffstat (limited to 'internal/model/types.go')
| -rw-r--r-- | internal/model/types.go | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/internal/model/types.go b/internal/model/types.go index b326e76af..674e6aa43 100644 --- a/internal/model/types.go +++ b/internal/model/types.go @@ -7,37 +7,9 @@ import ( "fmt" "net" - "github.com/google/uuid" - "github.com/authelia/authelia/v4/internal/utils" ) -// NullUUID is a nullable uuid.UUID. -type NullUUID struct { - uuid.UUID - Valid bool -} - -// Value is the NullUUID implementation of the databases/sql driver.Valuer. -func (u NullUUID) Value() (value driver.Value, err error) { - if !u.Valid { - return nil, nil - } - - return u.UUID.Value() -} - -// Scan is the NullUUID implementation of the sql.Scanner. -func (u *NullUUID) Scan(src interface{}) (err error) { - if src == nil { - u.UUID, u.Valid = uuid.UUID{}, false - - return nil - } - - return u.UUID.Scan(src) -} - // NewIP easily constructs a new IP. func NewIP(value net.IP) (ip IP) { return IP{IP: value} |
