MCPcopy Index your code
hub / github.com/rilldata/rill / jwtAttributesForService

Method jwtAttributesForService

admin/server/server.go:394–410  ·  view source on GitHub ↗
(ctx context.Context, serviceID string, projectPermissions *adminv1.ProjectPermissions)

Source from the content-addressed store, hash-verified

392}
393
394func (s *Server) jwtAttributesForService(ctx context.Context, serviceID string, projectPermissions *adminv1.ProjectPermissions) (map[string]any, error) {
395 service, err := s.admin.DB.FindService(ctx, serviceID)
396 if err != nil {
397 return nil, err
398 }
399
400 attr := map[string]any{
401 "name": service.Name,
402 "admin": projectPermissions.ManageProject,
403 }
404
405 for k, v := range service.Attributes {
406 attr[k] = v
407 }
408
409 return attr, nil
410}
411
412func timeoutSelector(fullMethodName string) time.Duration {
413 if strings.HasPrefix(fullMethodName, "/rill.admin.v1.AIService") {

Callers 1

issueRuntimeTokenMethod · 0.95

Calls 1

FindServiceMethod · 0.65

Tested by

no test coverage detected