nidus-sync/enums/enums.bob.go
Eli Ribble a2e67e3d60
Add oauth token failure model and notification
This will allow me to mark when an oauth token fails and surface it to
the user so that they can re-up on their auth token.
2025-11-11 20:10:56 +00:00

258 lines
6 KiB
Go

// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
// This file is meant to be re-generated in place and/or deleted at any time.
package enums
import (
"database/sql/driver"
"fmt"
)
// Enum values for Arcgislicensetype
const (
ArcgislicensetypeAdvancedut Arcgislicensetype = "advancedUT"
ArcgislicensetypeBasicut Arcgislicensetype = "basicUT"
ArcgislicensetypeCreatorut Arcgislicensetype = "creatorUT"
ArcgislicensetypeEditorut Arcgislicensetype = "editorUT"
ArcgislicensetypeFieldworkerut Arcgislicensetype = "fieldWorkerUT"
ArcgislicensetypeGisprofessionaladvut Arcgislicensetype = "GISProfessionalAdvUT"
ArcgislicensetypeGisprofessionalbasicut Arcgislicensetype = "GISProfessionalBasicUT"
ArcgislicensetypeGisprofessionalstdut Arcgislicensetype = "GISProfessionalStdUT"
ArcgislicensetypeIndoorsuserut Arcgislicensetype = "IndoorsUserUT"
ArcgislicensetypeInsightsanalystut Arcgislicensetype = "insightsAnalystUT"
ArcgislicensetypeLiteut Arcgislicensetype = "liteUT"
ArcgislicensetypeStandardut Arcgislicensetype = "standardUT"
ArcgislicensetypeStorytellerut Arcgislicensetype = "storytellerUT"
ArcgislicensetypeViewerut Arcgislicensetype = "viewerUT"
)
func AllArcgislicensetype() []Arcgislicensetype {
return []Arcgislicensetype{
ArcgislicensetypeAdvancedut,
ArcgislicensetypeBasicut,
ArcgislicensetypeCreatorut,
ArcgislicensetypeEditorut,
ArcgislicensetypeFieldworkerut,
ArcgislicensetypeGisprofessionaladvut,
ArcgislicensetypeGisprofessionalbasicut,
ArcgislicensetypeGisprofessionalstdut,
ArcgislicensetypeIndoorsuserut,
ArcgislicensetypeInsightsanalystut,
ArcgislicensetypeLiteut,
ArcgislicensetypeStandardut,
ArcgislicensetypeStorytellerut,
ArcgislicensetypeViewerut,
}
}
type Arcgislicensetype string
func (e Arcgislicensetype) String() string {
return string(e)
}
func (e Arcgislicensetype) Valid() bool {
switch e {
case ArcgislicensetypeAdvancedut,
ArcgislicensetypeBasicut,
ArcgislicensetypeCreatorut,
ArcgislicensetypeEditorut,
ArcgislicensetypeFieldworkerut,
ArcgislicensetypeGisprofessionaladvut,
ArcgislicensetypeGisprofessionalbasicut,
ArcgislicensetypeGisprofessionalstdut,
ArcgislicensetypeIndoorsuserut,
ArcgislicensetypeInsightsanalystut,
ArcgislicensetypeLiteut,
ArcgislicensetypeStandardut,
ArcgislicensetypeStorytellerut,
ArcgislicensetypeViewerut:
return true
default:
return false
}
}
// useful when testing in other packages
func (e Arcgislicensetype) All() []Arcgislicensetype {
return AllArcgislicensetype()
}
func (e Arcgislicensetype) MarshalText() ([]byte, error) {
return []byte(e), nil
}
func (e *Arcgislicensetype) UnmarshalText(text []byte) error {
return e.Scan(text)
}
func (e Arcgislicensetype) MarshalBinary() ([]byte, error) {
return []byte(e), nil
}
func (e *Arcgislicensetype) UnmarshalBinary(data []byte) error {
return e.Scan(data)
}
func (e Arcgislicensetype) Value() (driver.Value, error) {
return string(e), nil
}
func (e *Arcgislicensetype) Scan(value any) error {
switch x := value.(type) {
case string:
*e = Arcgislicensetype(x)
case []byte:
*e = Arcgislicensetype(x)
case nil:
return fmt.Errorf("cannot nil into Arcgislicensetype")
default:
return fmt.Errorf("cannot scan type %T: %v", value, value)
}
if !e.Valid() {
return fmt.Errorf("invalid Arcgislicensetype value: %s", *e)
}
return nil
}
// Enum values for Hashtype
const (
HashtypeBcrypt14 Hashtype = "bcrypt-14"
)
func AllHashtype() []Hashtype {
return []Hashtype{
HashtypeBcrypt14,
}
}
type Hashtype string
func (e Hashtype) String() string {
return string(e)
}
func (e Hashtype) Valid() bool {
switch e {
case HashtypeBcrypt14:
return true
default:
return false
}
}
// useful when testing in other packages
func (e Hashtype) All() []Hashtype {
return AllHashtype()
}
func (e Hashtype) MarshalText() ([]byte, error) {
return []byte(e), nil
}
func (e *Hashtype) UnmarshalText(text []byte) error {
return e.Scan(text)
}
func (e Hashtype) MarshalBinary() ([]byte, error) {
return []byte(e), nil
}
func (e *Hashtype) UnmarshalBinary(data []byte) error {
return e.Scan(data)
}
func (e Hashtype) Value() (driver.Value, error) {
return string(e), nil
}
func (e *Hashtype) Scan(value any) error {
switch x := value.(type) {
case string:
*e = Hashtype(x)
case []byte:
*e = Hashtype(x)
case nil:
return fmt.Errorf("cannot nil into Hashtype")
default:
return fmt.Errorf("cannot scan type %T: %v", value, value)
}
if !e.Valid() {
return fmt.Errorf("invalid Hashtype value: %s", *e)
}
return nil
}
// Enum values for Notificationtype
const (
NotificationtypeOauthTokenInvalidated Notificationtype = "oauth_token_invalidated"
)
func AllNotificationtype() []Notificationtype {
return []Notificationtype{
NotificationtypeOauthTokenInvalidated,
}
}
type Notificationtype string
func (e Notificationtype) String() string {
return string(e)
}
func (e Notificationtype) Valid() bool {
switch e {
case NotificationtypeOauthTokenInvalidated:
return true
default:
return false
}
}
// useful when testing in other packages
func (e Notificationtype) All() []Notificationtype {
return AllNotificationtype()
}
func (e Notificationtype) MarshalText() ([]byte, error) {
return []byte(e), nil
}
func (e *Notificationtype) UnmarshalText(text []byte) error {
return e.Scan(text)
}
func (e Notificationtype) MarshalBinary() ([]byte, error) {
return []byte(e), nil
}
func (e *Notificationtype) UnmarshalBinary(data []byte) error {
return e.Scan(data)
}
func (e Notificationtype) Value() (driver.Value, error) {
return string(e), nil
}
func (e *Notificationtype) Scan(value any) error {
switch x := value.(type) {
case string:
*e = Notificationtype(x)
case []byte:
*e = Notificationtype(x)
case nil:
return fmt.Errorf("cannot nil into Notificationtype")
default:
return fmt.Errorf("cannot scan type %T: %v", value, value)
}
if !e.Valid() {
return fmt.Errorf("invalid Notificationtype value: %s", *e)
}
return nil
}