Download this file
| 1 | package equipo |
| 2 | |
| 3 | import ( |
| 4 | "amadan.net/oficina/equipo/internal/equipo/setup" |
| 5 | "amadan.net/oficina/equipo/internal/runnerproto" |
| 6 | "time" |
| 7 | ) |
| 8 | |
| 9 | type Runner = setup.Runner |
| 10 | type RunnerPrincipal = runnerproto.RunnerPrincipal |
| 11 | type runnerRecord = setup.RunnerRecord |
| 12 | type runnerEnrolment = setup.EnrolmentRecord |
| 13 | |
| 14 | type runnerCredentialRecord struct { |
| 15 | ID string `gorm:"primaryKey"` |
| 16 | RunnerID string `gorm:"index:runner_credential_runner"` |
| 17 | InstanceID string |
| 18 | Audience string |
| 19 | Person string |
| 20 | MachineKeyHash string |
| 21 | TokenHash string `gorm:"uniqueIndex:runner_token"` |
| 22 | ExpiresAt time.Time |
| 23 | RotatedAt *time.Time |
| 24 | RevokedAt *time.Time |
| 25 | } |
| 26 | |
| 27 | func (runnerCredentialRecord) TableName() string { return "runner_credentials" } |
| 28 | |
| 29 | type runnerRate struct { |
| 30 | Key string `gorm:"primaryKey"` |
| 31 | WindowStart time.Time |
| 32 | Count int |
| 33 | } |
| 34 | |