MCPcopy Create free account
hub / github.com/algolia/cli / resolveScope

Method resolveScope

pkg/cmd/open/open.go:264–273  ·  view source on GitHub ↗

resolveScope returns the dashboard base URL and the application id used to build dashboard links. displayAppID falls back to a placeholder so links can be shown even when no application is configured.

()

Source from the content-addressed store, hash-verified

262// build dashboard links. displayAppID falls back to a placeholder so links can
263// be shown even when no application is configured.
264func (opts *OpenOptions) resolveScope() (baseURL, appID, displayAppID string) {
265 appID, _ = opts.config.Profile().GetApplicationID()
266 displayAppID = appID
267 if displayAppID == "" {
268 displayAppID = "<app-id>"
269 }
270 baseURL = opts.NewDashboardClient(auth.OAuthClientID()).DashboardURL
271
272 return baseURL, appID, displayAppID
273}
274
275// entryFor builds the page entry for a shortcut, or returns false if the
276// shortcut is unknown.

Callers 2

allEntriesMethod · 0.95
printTargetsFunction · 0.80

Calls 3

OAuthClientIDFunction · 0.92
GetApplicationIDMethod · 0.80
ProfileMethod · 0.65

Tested by

no test coverage detected