-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathtype.go
More file actions
61 lines (53 loc) · 1.21 KB
/
type.go
File metadata and controls
61 lines (53 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
package avro
// Type - primitive or derived type name as defined below
type Type string
const (
// Primitve types
// TypeNull -
TypeNull Type = "null"
// TypeBoolean -
TypeBoolean Type = "boolean"
// TypeInt32 -
TypeInt32 Type = "int"
// TypeInt64 -
TypeInt64 Type = "long"
// TypeFloat32 -
TypeFloat32 Type = "float"
// TypeFloat64 -
TypeFloat64 Type = "double"
// TypeBytes -
TypeBytes Type = "bytes"
// TypeString -
TypeString Type = "string"
// Complex types
// TypeUnion -
TypeUnion Type = "union"
// TypeRecord -
TypeRecord Type = "record"
// TypeArray -
TypeArray Type = "array"
// TypeMap -
TypeMap Type = "map"
// TypeEnum -
TypeEnum Type = "enum"
// TypeFixed -
TypeFixed Type = "fixed"
)
// LogicalType decorates primitive and complex types to represent a derived type
type LogicalType Type
const (
// LogicalTypeDecimal -
LogicalTypeDecimal LogicalType = "decimal"
// LogicalTypeDate -
LogicalTypeDate LogicalType = "date"
// LogicalTypeTime -
LogicalTypeTime LogicalType = "time"
// LogicalTypeTimestamp -
LogicalTypeTimestamp LogicalType = "timestamp"
// LogialTypeDuration -
LogialTypeDuration LogicalType = "duration"
)
// TypeName -
func (t Type) TypeName() Type {
return t
}