50 lines
991 B
Go
50 lines
991 B
Go
//
|
|
// Code generated by go-jet DO NOT EDIT.
|
|
//
|
|
// WARNING: Changes to this file may cause incorrect behavior
|
|
// and will be lost if the code is regenerated
|
|
//
|
|
|
|
package model
|
|
|
|
import "errors"
|
|
|
|
type Progress string
|
|
|
|
const (
|
|
Progress_NotStarted Progress = "not-started"
|
|
Progress_InProgress Progress = "in-progress"
|
|
)
|
|
|
|
var ProgressAllValues = []Progress{
|
|
Progress_NotStarted,
|
|
Progress_InProgress,
|
|
}
|
|
|
|
func (e *Progress) Scan(value interface{}) error {
|
|
var enumValue string
|
|
switch val := value.(type) {
|
|
case string:
|
|
enumValue = val
|
|
case []byte:
|
|
enumValue = string(val)
|
|
default:
|
|
return errors.New("jet: Invalid scan value for AllTypesEnum enum. Enum value has to be of type string or []byte")
|
|
}
|
|
|
|
switch enumValue {
|
|
case "not-started":
|
|
*e = Progress_NotStarted
|
|
case "in-progress":
|
|
*e = Progress_InProgress
|
|
default:
|
|
return errors.New("jet: Invalid scan value '" + enumValue + "' for Progress enum")
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (e Progress) String() string {
|
|
return string(e)
|
|
}
|