2015-04-07 08:20:55 +00:00
|
|
|
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
|
|
|
)
|
|
|
|
|
2015-04-07 08:20:55 +00:00
|
|
|
type Token struct {
|
2015-04-21 22:48:06 +00:00
|
|
|
Kind string `json:"kind"`
|
2015-04-07 08:20:55 +00:00
|
|
|
Login string `json:"-"`
|
2015-04-13 05:32:32 +00:00
|
|
|
Label string `json:"label"`
|
2015-04-07 08:20:55 +00:00
|
|
|
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"`
|
2015-04-07 08:20:55 +00:00
|
|
|
}
|