mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-25 01:40:30 +00:00
18 lines
531 B
Go
18 lines
531 B
Go
package common
|
|
|
|
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"`
|
|
}
|
|
|
|
const (
|
|
TokenUser = "u"
|
|
TokenSess = "s"
|
|
TokenHook = "h"
|
|
TokenAgent = "a"
|
|
)
|