MCPcopy Create free account
hub / github.com/Comfy-Org/registry-backend / StatusValidator

Function StatusValidator

ent/nodeversion/nodeversion.go:130–137  ·  view source on GitHub ↗

StatusValidator is a validator for the "status" field enum values. It is called by the builders before save.

(s schema.NodeVersionStatus)

Source from the content-addressed store, hash-verified

128
129// StatusValidator is a validator for the "status" field enum values. It is called by the builders before save.
130func StatusValidator(s schema.NodeVersionStatus) error {
131 switch s {
132 case "active", "banned", "deleted", "pending", "flagged":
133 return nil
134 default:
135 return fmt.Errorf("nodeversion: invalid enum value for status field: %q", s)
136 }
137}
138
139// OrderOption defines the ordering options for the NodeVersion queries.
140type OrderOption func(*sql.Selector)

Callers 3

checkMethod · 0.92
checkMethod · 0.92
checkMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected