harness-drone/pkg/types/token.go

19 lines
530 B
Go
Raw Normal View History

2015-05-17 20:51:42 +00:00
package types
type Token struct {
ID int64 `meddler:"token_id,pk" json:"-"`
UserID int64 `meddler:"user_id" json:"-"`
Login string `meddler:"-" json:"-"`
Kind string `meddler:"token_kind" json:"kind,omitempty"`
Label string `meddler:"token_label" json:"label,omitempty"`
Expiry int64 `meddler:"token_expiry" json:"expiry,omitempty"`
Issued int64 `meddler:"token_issued" json:"issued_at,omitempty"`
}
2015-04-13 05:32:32 +00:00
const (
2015-04-30 21:23:46 +00:00
TokenUser = "u"
TokenSess = "s"
TokenHook = "h"
TokenAgent = "a"
2015-04-13 05:32:32 +00:00
)