mirror of
https://git.ptzo.gdn/feditools/relay.git
synced 2024-09-21 17:17:11 +00:00
28 lines
654 B
Go
28 lines
654 B
Go
package token
|
|
|
|
// Kind represents the kind of model to encode a token for.
|
|
type Kind int64
|
|
|
|
// This order can not change else all external urls with tokens will become invalid.
|
|
const (
|
|
// KindInstance is a token that represents a federated social instance.
|
|
KindInstance Kind = 1 + iota
|
|
// KindAccount is a token that represents a federated social account.
|
|
KindAccount
|
|
// KindBlock is a token that represents a blocked federated social instance.
|
|
KindBlock
|
|
)
|
|
|
|
func (k Kind) String() string {
|
|
switch k {
|
|
case KindInstance:
|
|
return "Instance"
|
|
case KindAccount:
|
|
return "Account"
|
|
case KindBlock:
|
|
return "Block"
|
|
default:
|
|
return "unknown"
|
|
}
|
|
}
|