MCPcopy Create free account
hub / github.com/cloudquery/cloudquery / FindTeam

Method FindTeam

cli/internal/team/team.go:45–56  ·  view source on GitHub ↗
(teams []Team, name string)

Source from the content-addressed store, hash-verified

43}
44
45func (*Client) FindTeam(teams []Team, name string) (*Team, error) {
46 for _, t := range teams {
47 if t.Name == name {
48 return &t, nil
49 }
50 }
51 teamNames := make([]string, 0, len(teams))
52 for _, t := range teams {
53 teamNames = append(teamNames, t.Name)
54 }
55 return nil, fmt.Errorf("team %q not found. Teams available to you: %v", name, strings.Join(teamNames, ", "))
56}
57
58func (c *Client) ListAllTeams(ctx context.Context) ([]Team, error) {
59 page := cloudquery_api.Page(1)

Callers 2

ValidateTeamMethod · 0.95
setTeamOnLoginFunction · 0.95

Calls 1

ErrorfMethod · 0.80

Tested by

no test coverage detected