harness-drone/common/token.go

19 lines
386 B
Go
Raw Normal View History

package common
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
)
type Token struct {
Kind string `json:"kind"`
Login string `json:"-"`
2015-04-13 05:32:32 +00:00
Label string `json:"label"`
Repos []string `json:"repos,omitempty"`
Scopes []string `json:"scopes,omitempty"`
Expiry int64 `json:"expiry,omitempty"`
2015-04-13 05:32:32 +00:00
Issued int64 `json:"issued_at,omitempty"`
}