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

Method GetTeam

cli/internal/team/team.go:94–105  ·  view source on GitHub ↗
(ctx context.Context, team string)

Source from the content-addressed store, hash-verified

92}
93
94func (c *Client) GetTeam(ctx context.Context, team string) (*Team, error) {
95 resp, err := c.api.GetTeamByNameWithResponse(ctx, team)
96 if err != nil {
97 return nil, err
98 }
99
100 if resp.StatusCode() != http.StatusOK || resp.JSON200 == nil {
101 return nil, fmt.Errorf("failed to get team %q: %w", team, hub.ErrorFromHTTPResponse(resp.HTTPResponse, resp))
102 }
103
104 return resp.JSON200, nil
105}
106
107func Names(teams []Team) []string {
108 names := make([]string, len(teams))

Callers 1

runSwitchFunction · 0.95

Calls 1

ErrorfMethod · 0.80

Tested by

no test coverage detected