summaryrefslogtreecommitdiff
path: root/internal/mapr/fieldtypes.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/mapr/fieldtypes.go')
-rw-r--r--internal/mapr/fieldtypes.go29
1 files changed, 29 insertions, 0 deletions
diff --git a/internal/mapr/fieldtypes.go b/internal/mapr/fieldtypes.go
new file mode 100644
index 0000000..a64efd1
--- /dev/null
+++ b/internal/mapr/fieldtypes.go
@@ -0,0 +1,29 @@
+package mapr
+
+import "fmt"
+
+type fieldType int
+
+// The possible field types.
+const (
+ UndefFieldType fieldType = iota
+ Field fieldType = iota
+ String fieldType = iota
+ Float fieldType = iota
+ FunctionStack fieldType = iota
+)
+
+func (w fieldType) String() string {
+ switch w {
+ case Field:
+ return fmt.Sprintf("Field")
+ case String:
+ return fmt.Sprintf("String")
+ case Float:
+ return fmt.Sprintf("Float")
+ case FunctionStack:
+ return fmt.Sprintf("FunctionStack")
+ default:
+ return fmt.Sprintf("UndefFieldType")
+ }
+}