Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Scopes = map[ScopeCode]Scope{ ScopeAPIToken: { Code: ScopeAPIToken, Title: "Allows requests to go-api API", Value: "apitoken", }, ScopeMockAPI: { Code: ScopeMockAPI, Title: "Allows requests to mock API", Value: "mockapi", }, }
Functions ¶
func GenerateRawToken ¶
func GenerateRawToken() string
Types ¶
type LiteToken ¶
type LiteToken struct {
Id string `json:"id"`
Timestamp int64 `json:"timestamp"`
Expire int64 `json:"expire"`
Name string `json:"name"`
Description string `json:"description"`
Scopes []ScopeCode `json:"scopes"`
Owner string `json:"owner"`
}
func ToLiteToken ¶
type Repository ¶
type Scope ¶
type Scope struct {
Code ScopeCode `json:"code"`
Title string `json:"title"`
Value string `json:"value"`
}
func ListScopes ¶
func ListScopes() []Scope
type Token ¶
type Token struct {
Id string `json:"id"`
Timestamp int64 `json:"timestamp"`
Expire int64 `json:"expire"`
Name string `json:"name"`
Description string `json:"description"`
Token string `json:"token"`
Scopes []ScopeCode `json:"scopes"`
Owner string `json:"owner"`
}
func (Token) PersistenceId ¶
Click to show internal directories.
Click to hide internal directories.