diff --git a/go.mod b/go.mod index 385b82c..e391582 100644 --- a/go.mod +++ b/go.mod @@ -14,6 +14,7 @@ require ( github.com/joho/godotenv v1.5.1 // indirect github.com/redis/go-redis/v9 v9.3.0 // indirect github.com/sirupsen/logrus v1.9.3 // indirect + github.com/zekroTJA/timedmap v1.5.2 // indirect golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 // indirect golang.org/x/net v0.7.0 // indirect golang.org/x/sys v0.5.0 // indirect diff --git a/go.sum b/go.sum index 7ad5286..029be4a 100644 --- a/go.sum +++ b/go.sum @@ -27,6 +27,8 @@ github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVs github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +github.com/zekroTJA/timedmap v1.5.2 h1:5bhWBdyvekLHLrZu8cNJB6iCpIQl4bGaG4HTmPbTNKY= +github.com/zekroTJA/timedmap v1.5.2/go.mod h1:Go4uPxMN1Wjl5IgO6HYD1tM9IQhkYEVqcrrdsI4ljXo= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b h1:7mWr3k41Qtv8XlltBkDkl8LoP3mpSgBW8BUoxtEdbXg= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= diff --git a/types.go b/types.go index f8f4239..8c1b10d 100644 --- a/types.go +++ b/types.go @@ -12,6 +12,14 @@ type Field struct { id string // The id of the field } +// RegisterContext is used to store the contextual information used during registration. +type RegisterContext struct { + hiddenKeys []string // The form inputs that are hidden & unused + requiredFormKeys []string // The form inputs that arne't hidden - required to submit the form + propertyId uint // The property ID involved with the request + residentId uint // The resident ID involved with the request +} + const ( GuestCodeRequired = iota GuestCodeNotRequired = iota