-
Notifications
You must be signed in to change notification settings - Fork 0
/
columnname.go
89 lines (69 loc) · 1.83 KB
/
columnname.go
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
package main
import (
"github.com/syscrusher/fake"
)
const (
columnNameFirst = "name.first"
columnNameFirstFemale = "name.first.female"
columnNameFirstMale = "name.first.male"
columnNameFull = "name.full"
columnNameFullFemale = "name.full.female"
columnNameFullMale = "name.full.male"
columnNameLast = "name.last"
columnNameLastFemale = "name.last.female"
columnNameLastMale = "name.last.male"
)
type ColumnNameFirst struct {
TypedColumnBase
}
func (column ColumnNameFirst) Value(chunk *Chunk) (string, error) {
return fake.FirstName(), nil
}
type ColumnNameFirstFemale struct {
TypedColumnBase
}
func (column ColumnNameFirstFemale) Value(chunk *Chunk) (string, error) {
return fake.FemaleFirstName(), nil
}
type ColumnNameFirstMale struct {
TypedColumnBase
}
func (column ColumnNameFirstMale) Value(chunk *Chunk) (string, error) {
return fake.MaleFirstName(), nil
}
type ColumnNameFull struct {
TypedColumnBase
}
func (column ColumnNameFull) Value(chunk *Chunk) (string, error) {
return fake.FullName(), nil
}
type ColumnNameFullFemale struct {
TypedColumnBase
}
func (column ColumnNameFullFemale) Value(chunk *Chunk) (string, error) {
return fake.FemaleFullName(), nil
}
type ColumnNameFullMale struct {
TypedColumnBase
}
func (column ColumnNameFullMale) Value(chunk *Chunk) (string, error) {
return fake.MaleFullName(), nil
}
type ColumnNameLast struct {
TypedColumnBase
}
func (column ColumnNameLast) Value(chunk *Chunk) (string, error) {
return fake.LastName(), nil
}
type ColumnNameLastFemale struct {
TypedColumnBase
}
func (column ColumnNameLastFemale) Value(chunk *Chunk) (string, error) {
return fake.FemaleLastName(), nil
}
type ColumnNameLastMale struct {
TypedColumnBase
}
func (column ColumnNameLastMale) Value(chunk *Chunk) (string, error) {
return fake.MaleLastName(), nil
}