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

Method GetAPIKeyByName

coderd/database/dbmetrics/querymetrics.go:1133–1139  ·  view source on GitHub ↗
(ctx context.Context, arg database.GetAPIKeyByNameParams)

Source from the content-addressed store, hash-verified

1131}
1132
1133func (m queryMetricsStore) GetAPIKeyByName(ctx context.Context, arg database.GetAPIKeyByNameParams) (database.APIKey, error) {
1134 start := time.Now()
1135 r0, r1 := m.s.GetAPIKeyByName(ctx, arg)
1136 m.queryLatencies.WithLabelValues("GetAPIKeyByName").Observe(time.Since(start).Seconds())
1137 m.queryCounts.WithLabelValues(httpmw.ExtractHTTPRoute(ctx), httpmw.ExtractHTTPMethod(ctx), "GetAPIKeyByName").Inc()
1138 return r0, r1
1139}
1140
1141func (m queryMetricsStore) GetAPIKeysByLoginType(ctx context.Context, loginType database.GetAPIKeysByLoginTypeParams) ([]database.APIKey, error) {
1142 start := time.Now()

Callers

nothing calls this directly

Calls 4

ExtractHTTPRouteFunction · 0.92
ExtractHTTPMethodFunction · 0.92
WithLabelValuesMethod · 0.80
GetAPIKeyByNameMethod · 0.65

Tested by

no test coverage detected