master
Raw Download raw file
 1package main
 2
 3import "time"
 4
 5type VisitorType int
 6
 7const (
 8	CONTRACTOR VisitorType = iota
 9	MILITARY
10	CIVILIAN
11)
12
13var visitorTypes = [...]string{
14	"CONTRACTOR",
15	"MILITARY",
16	"CIVILIAN",
17}
18
19func (v VisitorType) String() string {
20	return visitorTypes[v]
21}
22
23type AccessType int
24
25const (
26	UNCLASSIFIED AccessType = iota
27	CONFIDENTIAL
28	SECRET
29	TOP_SECRET
30	TOP_SECRET_SCI
31)
32
33var accessTypes = [...]string{
34	"UNCLASSIFIED",
35	"CONFIDENTIAL",
36	"SECRET",
37	"TOP SECRET",
38	"TOP SECRET // SCI",
39}
40
41func (a AccessType) String() string {
42	return accessTypes[a]
43}
44
45type Visitor struct {
46	ID           string
47	Username     string
48	First        string
49	Last         string
50	Organization string
51	Type         VisitorType
52	Affiliation  string
53	USCitizen    bool
54	AccessLevel  AccessType
55	DateOfBirth  time.Time
56	BirthCountry string
57	BirthState   string
58}
59
60type Visit struct {
61	ID       string
62	Name     string
63	Start    time.Time
64	End      time.Time
65	Purpose  string
66	Sponsor  string
67	Visitors []Visitor
68}