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

Method GetOrganization

database/sql/organizations.go:82–94  ·  view source on GitHub ↗
(ctx context.Context, name, endpointName string)

Source from the content-addressed store, hash-verified

80}
81
82func (s *sqlDatabase) GetOrganization(ctx context.Context, name, endpointName string) (params.Organization, error) {
83 org, err := s.getOrg(ctx, name, endpointName)
84 if err != nil {
85 return params.Organization{}, fmt.Errorf("error fetching org: %w", err)
86 }
87
88 param, err := s.sqlToCommonOrganization(org, true)
89 if err != nil {
90 return params.Organization{}, fmt.Errorf("error fetching org: %w", err)
91 }
92
93 return param, nil
94}
95
96func (s *sqlDatabase) ListOrganizations(_ context.Context, filter params.OrganizationFilter) ([]params.Organization, error) {
97 var orgs []Organization

Callers

nothing calls this directly

Calls 2

getOrgMethod · 0.95

Tested by

no test coverage detected