@@ -17,7 +17,7 @@ import (
17
17
18
18
"code.gitea.io/gitea/modules/git"
19
19
"code.gitea.io/gitea/modules/log"
20
- "code.gitea.io/gitea/modules/util "
20
+ "code.gitea.io/gitea/modules/timeutil "
21
21
22
22
"github.com/go-xorm/xorm"
23
23
"github.com/keybase/go-crypto/openpgp"
@@ -27,14 +27,14 @@ import (
27
27
28
28
// GPGKey represents a GPG key.
29
29
type GPGKey struct {
30
- ID int64 `xorm:"pk autoincr"`
31
- OwnerID int64 `xorm:"INDEX NOT NULL"`
32
- KeyID string `xorm:"INDEX CHAR(16) NOT NULL"`
33
- PrimaryKeyID string `xorm:"CHAR(16)"`
34
- Content string `xorm:"TEXT NOT NULL"`
35
- CreatedUnix util .TimeStamp `xorm:"created"`
36
- ExpiredUnix util .TimeStamp
37
- AddedUnix util .TimeStamp
30
+ ID int64 `xorm:"pk autoincr"`
31
+ OwnerID int64 `xorm:"INDEX NOT NULL"`
32
+ KeyID string `xorm:"INDEX CHAR(16) NOT NULL"`
33
+ PrimaryKeyID string `xorm:"CHAR(16)"`
34
+ Content string `xorm:"TEXT NOT NULL"`
35
+ CreatedUnix timeutil .TimeStamp `xorm:"created"`
36
+ ExpiredUnix timeutil .TimeStamp
37
+ AddedUnix timeutil .TimeStamp
38
38
SubsKey []* GPGKey `xorm:"-"`
39
39
Emails []* EmailAddress
40
40
CanSign bool
@@ -51,7 +51,7 @@ type GPGKeyImport struct {
51
51
52
52
// BeforeInsert will be invoked by XORM before inserting a record
53
53
func (key * GPGKey ) BeforeInsert () {
54
- key .AddedUnix = util .TimeStampNow ()
54
+ key .AddedUnix = timeutil .TimeStampNow ()
55
55
}
56
56
57
57
// AfterLoad is invoked from XORM after setting the values of all fields of this object.
@@ -223,8 +223,8 @@ func parseSubGPGKey(ownerID int64, primaryID string, pubkey *packet.PublicKey, e
223
223
KeyID : pubkey .KeyIdString (),
224
224
PrimaryKeyID : primaryID ,
225
225
Content : content ,
226
- CreatedUnix : util .TimeStamp (pubkey .CreationTime .Unix ()),
227
- ExpiredUnix : util .TimeStamp (expiry .Unix ()),
226
+ CreatedUnix : timeutil .TimeStamp (pubkey .CreationTime .Unix ()),
227
+ ExpiredUnix : timeutil .TimeStamp (expiry .Unix ()),
228
228
CanSign : pubkey .CanSign (),
229
229
CanEncryptComms : pubkey .PubKeyAlgo .CanEncrypt (),
230
230
CanEncryptStorage : pubkey .PubKeyAlgo .CanEncrypt (),
@@ -301,8 +301,8 @@ func parseGPGKey(ownerID int64, e *openpgp.Entity) (*GPGKey, error) {
301
301
KeyID : pubkey .KeyIdString (),
302
302
PrimaryKeyID : "" ,
303
303
Content : content ,
304
- CreatedUnix : util .TimeStamp (pubkey .CreationTime .Unix ()),
305
- ExpiredUnix : util .TimeStamp (expiry .Unix ()),
304
+ CreatedUnix : timeutil .TimeStamp (pubkey .CreationTime .Unix ()),
305
+ ExpiredUnix : timeutil .TimeStamp (expiry .Unix ()),
306
306
Emails : emails ,
307
307
SubsKey : subkeys ,
308
308
CanSign : pubkey .CanSign (),
0 commit comments