16 lines
198 B
Go
16 lines
198 B
Go
package limiter
|
|
|
|
import "time"
|
|
|
|
type Action struct {
|
|
Type string
|
|
Timestamp time.Time
|
|
}
|
|
|
|
func NewAction(t string) *Action {
|
|
a := new(Action)
|
|
a.Timestamp = time.Now()
|
|
a.Type = t
|
|
return a
|
|
}
|