MCPcopy Create free account
hub / github.com/cloudbase/garm / GetGithubEndpoint

Method GetGithubEndpoint

runner/github_endpoints.go:52–62  ·  view source on GitHub ↗
(ctx context.Context, name string)

Source from the content-addressed store, hash-verified

50}
51
52func (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
64func (r *Runner) DeleteGithubEndpoint(ctx context.Context, name string) error {
65 if !auth.IsAdmin(ctx) {

Callers

nothing calls this directly

Calls 2

IsAdminFunction · 0.92
GetGithubEndpointMethod · 0.65

Tested by

no test coverage detected