MCPcopy Index your code
hub / github.com/coder/coder / tokenListRowFromKey

Function tokenListRowFromKey

cli/tokens.go:177–189  ·  view source on GitHub ↗
(token codersdk.APIKey, owner string)

Source from the content-addressed store, hash-verified

175}
176
177func tokenListRowFromKey(token codersdk.APIKey, owner string) tokenListRow {
178 return tokenListRow{
179 APIKey: token,
180 ID: token.ID,
181 TokenName: token.TokenName,
182 Scopes: joinScopes(token.Scopes),
183 Allow: joinAllowList(token.AllowList),
184 LastUsed: token.LastUsed,
185 ExpiresAt: token.ExpiresAt,
186 CreatedAt: token.CreatedAt,
187 Owner: owner,
188 }
189}
190
191func joinScopes(scopes []codersdk.APIKeyScope) string {
192 if len(scopes) == 0 {

Callers 2

tokenListRowFromTokenFunction · 0.85
viewTokenMethod · 0.85

Calls 2

joinScopesFunction · 0.85
joinAllowListFunction · 0.85

Tested by

no test coverage detected