(ctx context.Context, name string)
| 142 | } |
| 143 | |
| 144 | func runtimeWithService(ctx context.Context, name string) (*app.Runtime, error) { |
| 145 | runtime, ok := app.FromContext(ctx) |
| 146 | if !ok { |
| 147 | return nil, fmt.Errorf("%w: %s", errRuntimeServiceRequired, name) |
| 148 | } |
| 149 | return runtime, nil |
| 150 | } |
| 151 | |
| 152 | func adminDirectoryService(ctx context.Context, account string) (*admin.Service, error) { |
| 153 | runtime, err := runtimeWithService(ctx, "admin directory") |
no test coverage detected