(ctx context.Context, name string)
| 50 | } |
| 51 | |
| 52 | func (r *Runner) GetGithubEndpoint(ctx context.Context, name string) (params.ForgeEndpoint, error) { |
| 53 | if !auth.IsAdmin(ctx) { |
| 54 | return params.ForgeEndpoint{}, runnerErrors.ErrUnauthorized |
| 55 | } |
| 56 | endpoint, err := r.store.GetGithubEndpoint(ctx, name) |
| 57 | if err != nil { |
| 58 | return params.ForgeEndpoint{}, fmt.Errorf("failed to get github endpoint: %w", err) |
| 59 | } |
| 60 | |
| 61 | return endpoint, nil |
| 62 | } |
| 63 | |
| 64 | func (r *Runner) DeleteGithubEndpoint(ctx context.Context, name string) error { |
| 65 | if !auth.IsAdmin(ctx) { |
nothing calls this directly
no test coverage detected