MCPcopy Create free account
hub / github.com/Scalingo/cli / getFromEmail

Function getFromEmail

collaborators/remove.go:40–51  ·  view source on GitHub ↗
(ctx context.Context, client *scalingo.Client, app, email string)

Source from the content-addressed store, hash-verified

38}
39
40func getFromEmail(ctx context.Context, client *scalingo.Client, app, email string) (scalingo.Collaborator, error) {
41 collaborators, err := client.CollaboratorsList(ctx, app)
42 if err != nil {
43 return scalingo.Collaborator{}, errors.Wrap(ctx, err, "list collaborators")
44 }
45 for _, collaborator := range collaborators {
46 if collaborator.Email == email {
47 return collaborator, nil
48 }
49 }
50 return scalingo.Collaborator{}, errNotFound
51}

Callers 2

UpdateFunction · 0.85
RemoveFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected