aboutsummaryrefslogtreecommitdiff
path: root/models/ssh_key.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/ssh_key.go')
-rw-r--r--models/ssh_key.go24
1 files changed, 12 insertions, 12 deletions
diff --git a/models/ssh_key.go b/models/ssh_key.go
index 350c5f75..3a8d205f 100644
--- a/models/ssh_key.go
+++ b/models/ssh_key.go
@@ -23,9 +23,9 @@ import (
"golang.org/x/crypto/ssh"
log "gopkg.in/clog.v1"
- "github.com/gogits/gogs/pkg/process"
- "github.com/gogits/gogs/pkg/setting"
- "github.com/gogits/gogs/pkg/tool"
+ "github.com/gogs/gogs/pkg/process"
+ "github.com/gogs/gogs/pkg/setting"
+ "github.com/gogs/gogs/pkg/tool"
)
const (
@@ -51,12 +51,12 @@ type PublicKey struct {
Mode AccessMode `xorm:"NOT NULL DEFAULT 2"`
Type KeyType `xorm:"NOT NULL DEFAULT 1"`
- Created time.Time `xorm:"-"`
+ Created time.Time `xorm:"-" json:"-"`
CreatedUnix int64
- Updated time.Time `xorm:"-"` // Note: Updated must below Created for AfterSet.
+ Updated time.Time `xorm:"-" json:"-"` // Note: Updated must below Created for AfterSet.
UpdatedUnix int64
- HasRecentActivity bool `xorm:"-"`
- HasUsed bool `xorm:"-"`
+ HasRecentActivity bool `xorm:"-" json:"-"`
+ HasUsed bool `xorm:"-" json:"-"`
}
func (k *PublicKey) BeforeInsert() {
@@ -568,14 +568,14 @@ type DeployKey struct {
RepoID int64 `xorm:"UNIQUE(s) INDEX"`
Name string
Fingerprint string
- Content string `xorm:"-"`
+ Content string `xorm:"-" json:"-"`
- Created time.Time `xorm:"-"`
+ Created time.Time `xorm:"-" json:"-"`
CreatedUnix int64
- Updated time.Time `xorm:"-"` // Note: Updated must below Created for AfterSet.
+ Updated time.Time `xorm:"-" json:"-"` // Note: Updated must below Created for AfterSet.
UpdatedUnix int64
- HasRecentActivity bool `xorm:"-"`
- HasUsed bool `xorm:"-"`
+ HasRecentActivity bool `xorm:"-" json:"-"`
+ HasUsed bool `xorm:"-" json:"-"`
}
func (k *DeployKey) BeforeInsert() {