Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type RawFormat ¶
type RawFormat string
const ( RawFormatJSON RawFormat = "json" RawFormatYAML RawFormat = "yaml" // RawFormatCUE is retained only so contracts already stored with this format // (and the wire enum) remain valid. CUE is no longer accepted or evaluated: // evaluating attacker-supplied CUE server-side is an unbounded, uncancellable // operation and was a DoS vector. New contracts must be JSON or YAML. RawFormatCUE RawFormat = "cue" )
func IdentifyFormat ¶
IdentifyFormat does best effort to identify the format of the raw contract by going the unmarshalling path in the following order: json, yaml. NOTE that we are just validating the format, not the content using regular marshalling not even proto marshalling, that comes later once we know the format. CUE is intentionally not detected: it is no longer a supported contract format.
func (RawFormat) Values ¶
Implements https://pkg.go.dev/entgo.io/ent/schema/field#EnumValues
Click to show internal directories.
Click to hide internal directories.