Skip to content

Commit

Permalink
Autogenerate opentelemetry tracer
Browse files Browse the repository at this point in the history
Took 4 minutes
  • Loading branch information
Fank committed Nov 8, 2024
1 parent 0ee9a0f commit 7fc1081
Show file tree
Hide file tree
Showing 137 changed files with 3,483 additions and 0 deletions.
3 changes: 3 additions & 0 deletions admin/api_client_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ type Client struct {
func (c *Client) NewRequest(ctx context.Context, method, urlStr, contentType string, body interface{}) (*http.Request, error) {

// Parse the relative URL.
ctx, span := tracer().Start(ctx, "(*Client).NewRequest")
defer span.End()

rel, err := url.Parse(urlStr)
if err != nil {
return nil, err
Expand Down
24 changes: 24 additions & 0 deletions admin/internal/organization_directory_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ type OrganizationDirectoryService struct {
//
// https://docs.go-atlassian.io/atlassian-admin-cloud/organization/directory#users-last-active-dates
func (o *OrganizationDirectoryService) Activity(ctx context.Context, organizationID, accountID string) (*model.UserProductAccessScheme, *model.ResponseScheme, error) {
ctx, span := tracer().Start(ctx, "(*OrganizationDirectoryService).Activity")

Check failure on line 39 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / test (1.22, macos-latest)

undefined: tracer

Check failure on line 39 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / build

undefined: tracer

Check failure on line 39 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / GolangCI-Lint (1.23, ubuntu-latest)

undefined: tracer

Check failure on line 39 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / GolangCI-Lint (1.22, macos-latest)

undefined: tracer

Check failure on line 39 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / test (1.23, macos-latest)

undefined: tracer

Check failure on line 39 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / GolangCI-Lint (1.22, ubuntu-latest)

undefined: tracer

Check failure on line 39 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / test (1.22, ubuntu-latest)

undefined: tracer

Check failure on line 39 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / test (1.22, ubuntu-latest)

undefined: tracer

Check failure on line 39 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / build

undefined: tracer

Check failure on line 39 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / GolangCI-Lint (1.22, macos-latest)

undefined: tracer

Check failure on line 39 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / test (1.22, macos-latest)

undefined: tracer

Check failure on line 39 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / test (1.23, macos-latest)

undefined: tracer

Check failure on line 39 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / test (1.23, ubuntu-latest)

undefined: tracer
defer span.End()

return o.internalClient.Activity(ctx, organizationID, accountID)
}

Expand All @@ -49,6 +52,9 @@ func (o *OrganizationDirectoryService) Activity(ctx context.Context, organizatio
//
// https://docs.go-atlassian.io/atlassian-admin-cloud/organization/directory#remove-user-access
func (o *OrganizationDirectoryService) Remove(ctx context.Context, organizationID, accountID string) (*model.ResponseScheme, error) {
ctx, span := tracer().Start(ctx, "(*OrganizationDirectoryService).Remove")

Check failure on line 55 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / test (1.22, macos-latest)

undefined: tracer

Check failure on line 55 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / build

undefined: tracer

Check failure on line 55 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / GolangCI-Lint (1.23, ubuntu-latest)

undefined: tracer

Check failure on line 55 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / GolangCI-Lint (1.22, macos-latest)

undefined: tracer

Check failure on line 55 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / test (1.23, macos-latest)

undefined: tracer

Check failure on line 55 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / GolangCI-Lint (1.22, ubuntu-latest)

undefined: tracer

Check failure on line 55 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / test (1.22, ubuntu-latest)

undefined: tracer

Check failure on line 55 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / test (1.22, ubuntu-latest)

undefined: tracer

Check failure on line 55 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / build

undefined: tracer

Check failure on line 55 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / GolangCI-Lint (1.22, macos-latest)

undefined: tracer

Check failure on line 55 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / test (1.22, macos-latest)

undefined: tracer

Check failure on line 55 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / test (1.23, macos-latest)

undefined: tracer

Check failure on line 55 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / test (1.23, ubuntu-latest)

undefined: tracer
defer span.End()

return o.internalClient.Remove(ctx, organizationID, accountID)
}

Expand All @@ -62,6 +68,9 @@ func (o *OrganizationDirectoryService) Remove(ctx context.Context, organizationI
//
// https://docs.go-atlassian.io/atlassian-admin-cloud/organization/directory#suspend-user-access
func (o *OrganizationDirectoryService) Suspend(ctx context.Context, organizationID, accountID string) (*model.GenericActionSuccessScheme, *model.ResponseScheme, error) {
ctx, span := tracer().Start(ctx, "(*OrganizationDirectoryService).Suspend")

Check failure on line 71 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / test (1.22, macos-latest)

undefined: tracer

Check failure on line 71 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / build

undefined: tracer

Check failure on line 71 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / GolangCI-Lint (1.23, ubuntu-latest)

undefined: tracer

Check failure on line 71 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / GolangCI-Lint (1.22, macos-latest)

undefined: tracer

Check failure on line 71 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / test (1.23, macos-latest)

undefined: tracer

Check failure on line 71 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / GolangCI-Lint (1.22, ubuntu-latest)

undefined: tracer

Check failure on line 71 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / test (1.22, ubuntu-latest)

undefined: tracer

Check failure on line 71 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / test (1.22, ubuntu-latest)

undefined: tracer

Check failure on line 71 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / build

undefined: tracer

Check failure on line 71 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / GolangCI-Lint (1.22, macos-latest)

undefined: tracer

Check failure on line 71 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / test (1.22, macos-latest)

undefined: tracer

Check failure on line 71 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / test (1.23, macos-latest)

undefined: tracer

Check failure on line 71 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / test (1.23, ubuntu-latest)

undefined: tracer
defer span.End()

return o.internalClient.Suspend(ctx, organizationID, accountID)
}

Expand All @@ -75,6 +84,9 @@ func (o *OrganizationDirectoryService) Suspend(ctx context.Context, organization
//
// https://docs.go-atlassian.io/atlassian-admin-cloud/organization/directory#restore-user-access
func (o *OrganizationDirectoryService) Restore(ctx context.Context, organizationID, accountID string) (*model.GenericActionSuccessScheme, *model.ResponseScheme, error) {
ctx, span := tracer().Start(ctx, "(*OrganizationDirectoryService).Restore")

Check failure on line 87 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / test (1.22, macos-latest)

undefined: tracer

Check failure on line 87 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / build

undefined: tracer

Check failure on line 87 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / GolangCI-Lint (1.23, ubuntu-latest)

undefined: tracer

Check failure on line 87 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / GolangCI-Lint (1.22, macos-latest)

undefined: tracer

Check failure on line 87 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / test (1.23, macos-latest)

undefined: tracer

Check failure on line 87 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / GolangCI-Lint (1.22, ubuntu-latest)

undefined: tracer

Check failure on line 87 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / test (1.22, ubuntu-latest)

undefined: tracer

Check failure on line 87 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / test (1.22, ubuntu-latest)

undefined: tracer

Check failure on line 87 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / build

undefined: tracer

Check failure on line 87 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / GolangCI-Lint (1.22, macos-latest)

undefined: tracer

Check failure on line 87 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / test (1.22, macos-latest)

undefined: tracer

Check failure on line 87 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / test (1.23, macos-latest)

undefined: tracer

Check failure on line 87 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / test (1.23, ubuntu-latest)

undefined: tracer
defer span.End()

return o.internalClient.Restore(ctx, organizationID, accountID)
}

Expand All @@ -84,6 +96,9 @@ type internalOrganizationDirectoryServiceImpl struct {

func (i *internalOrganizationDirectoryServiceImpl) Activity(ctx context.Context, organizationID, accountID string) (*model.UserProductAccessScheme, *model.ResponseScheme, error) {

ctx, span := tracer().Start(ctx, "(*internalOrganizationDirectoryServiceImpl).Activity")

Check failure on line 99 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / test (1.22, macos-latest)

undefined: tracer

Check failure on line 99 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / build

undefined: tracer

Check failure on line 99 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / GolangCI-Lint (1.23, ubuntu-latest)

undefined: tracer

Check failure on line 99 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / GolangCI-Lint (1.22, macos-latest)

undefined: tracer

Check failure on line 99 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / test (1.23, macos-latest)

undefined: tracer

Check failure on line 99 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / GolangCI-Lint (1.22, ubuntu-latest)

undefined: tracer

Check failure on line 99 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / test (1.22, ubuntu-latest)

undefined: tracer

Check failure on line 99 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / test (1.22, ubuntu-latest)

undefined: tracer

Check failure on line 99 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / build

undefined: tracer

Check failure on line 99 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / GolangCI-Lint (1.22, macos-latest)

undefined: tracer

Check failure on line 99 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / test (1.22, macos-latest)

undefined: tracer

Check failure on line 99 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / test (1.23, macos-latest)

undefined: tracer

Check failure on line 99 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / test (1.23, ubuntu-latest)

undefined: tracer
defer span.End()

if organizationID == "" {
return nil, nil, model.ErrNoAdminOrganization
}
Expand All @@ -110,6 +125,9 @@ func (i *internalOrganizationDirectoryServiceImpl) Activity(ctx context.Context,

func (i *internalOrganizationDirectoryServiceImpl) Remove(ctx context.Context, organizationID, accountID string) (*model.ResponseScheme, error) {

ctx, span := tracer().Start(ctx, "(*internalOrganizationDirectoryServiceImpl).Remove")

Check failure on line 128 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / test (1.22, macos-latest)

undefined: tracer

Check failure on line 128 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / build

undefined: tracer

Check failure on line 128 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / GolangCI-Lint (1.23, ubuntu-latest)

undefined: tracer

Check failure on line 128 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / GolangCI-Lint (1.22, macos-latest)

undefined: tracer

Check failure on line 128 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / test (1.23, macos-latest)

undefined: tracer

Check failure on line 128 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / GolangCI-Lint (1.22, ubuntu-latest)

undefined: tracer

Check failure on line 128 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / test (1.22, ubuntu-latest)

undefined: tracer

Check failure on line 128 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / test (1.22, ubuntu-latest)

undefined: tracer

Check failure on line 128 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / build

undefined: tracer

Check failure on line 128 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / GolangCI-Lint (1.22, macos-latest)

undefined: tracer

Check failure on line 128 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / test (1.22, macos-latest)

undefined: tracer

Check failure on line 128 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / test (1.23, macos-latest)

undefined: tracer

Check failure on line 128 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / test (1.23, ubuntu-latest)

undefined: tracer
defer span.End()

if organizationID == "" {
return nil, model.ErrNoAdminOrganization
}
Expand All @@ -130,6 +148,9 @@ func (i *internalOrganizationDirectoryServiceImpl) Remove(ctx context.Context, o

func (i *internalOrganizationDirectoryServiceImpl) Suspend(ctx context.Context, organizationID, accountID string) (*model.GenericActionSuccessScheme, *model.ResponseScheme, error) {

ctx, span := tracer().Start(ctx, "(*internalOrganizationDirectoryServiceImpl).Suspend")

Check failure on line 151 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / test (1.22, macos-latest)

undefined: tracer

Check failure on line 151 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / build

undefined: tracer

Check failure on line 151 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / GolangCI-Lint (1.23, ubuntu-latest)

undefined: tracer

Check failure on line 151 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / GolangCI-Lint (1.22, macos-latest)

undefined: tracer

Check failure on line 151 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / test (1.23, macos-latest)

undefined: tracer

Check failure on line 151 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / GolangCI-Lint (1.22, ubuntu-latest)

undefined: tracer

Check failure on line 151 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / test (1.22, ubuntu-latest)

undefined: tracer

Check failure on line 151 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / test (1.22, ubuntu-latest)

undefined: tracer

Check failure on line 151 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / build

undefined: tracer

Check failure on line 151 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / GolangCI-Lint (1.22, macos-latest)

undefined: tracer

Check failure on line 151 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / test (1.22, macos-latest)

undefined: tracer

Check failure on line 151 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / test (1.23, macos-latest)

undefined: tracer

Check failure on line 151 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / test (1.23, ubuntu-latest)

undefined: tracer
defer span.End()

if organizationID == "" {
return nil, nil, model.ErrNoAdminOrganization
}
Expand All @@ -156,6 +177,9 @@ func (i *internalOrganizationDirectoryServiceImpl) Suspend(ctx context.Context,

func (i *internalOrganizationDirectoryServiceImpl) Restore(ctx context.Context, organizationID, accountID string) (*model.GenericActionSuccessScheme, *model.ResponseScheme, error) {

ctx, span := tracer().Start(ctx, "(*internalOrganizationDirectoryServiceImpl).Restore")

Check failure on line 180 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / test (1.22, macos-latest)

undefined: tracer

Check failure on line 180 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / build

undefined: tracer

Check failure on line 180 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / GolangCI-Lint (1.23, ubuntu-latest)

undefined: tracer

Check failure on line 180 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / GolangCI-Lint (1.22, macos-latest)

undefined: tracer

Check failure on line 180 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / test (1.23, macos-latest)

undefined: tracer

Check failure on line 180 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / GolangCI-Lint (1.22, ubuntu-latest)

undefined: tracer

Check failure on line 180 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / test (1.22, ubuntu-latest)

undefined: tracer

Check failure on line 180 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / test (1.22, ubuntu-latest)

undefined: tracer

Check failure on line 180 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / build

undefined: tracer

Check failure on line 180 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / GolangCI-Lint (1.22, macos-latest)

undefined: tracer

Check failure on line 180 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / test (1.22, macos-latest)

undefined: tracer

Check failure on line 180 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / test (1.23, macos-latest)

undefined: tracer

Check failure on line 180 in admin/internal/organization_directory_impl.go

View workflow job for this annotation

GitHub Actions / test (1.23, ubuntu-latest)

undefined: tracer
defer span.End()

if organizationID == "" {
return nil, nil, model.ErrNoAdminOrganization
}
Expand Down
48 changes: 48 additions & 0 deletions admin/internal/organization_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ type OrganizationService struct {
//
// https://docs.go-atlassian.io/atlassian-admin-cloud/organization#get-organizations
func (o *OrganizationService) Gets(ctx context.Context, cursor string) (*model.AdminOrganizationPageScheme, *model.ResponseScheme, error) {
ctx, span := tracer().Start(ctx, "(*OrganizationService).Gets")

Check failure on line 34 in admin/internal/organization_impl.go

View workflow job for this annotation

GitHub Actions / test (1.22, macos-latest)

undefined: tracer

Check failure on line 34 in admin/internal/organization_impl.go

View workflow job for this annotation

GitHub Actions / build

undefined: tracer

Check failure on line 34 in admin/internal/organization_impl.go

View workflow job for this annotation

GitHub Actions / GolangCI-Lint (1.23, ubuntu-latest)

undefined: tracer

Check failure on line 34 in admin/internal/organization_impl.go

View workflow job for this annotation

GitHub Actions / GolangCI-Lint (1.22, macos-latest)

undefined: tracer

Check failure on line 34 in admin/internal/organization_impl.go

View workflow job for this annotation

GitHub Actions / test (1.23, macos-latest)

undefined: tracer

Check failure on line 34 in admin/internal/organization_impl.go

View workflow job for this annotation

GitHub Actions / GolangCI-Lint (1.22, ubuntu-latest)

undefined: tracer

Check failure on line 34 in admin/internal/organization_impl.go

View workflow job for this annotation

GitHub Actions / test (1.22, ubuntu-latest)

undefined: tracer

Check failure on line 34 in admin/internal/organization_impl.go

View workflow job for this annotation

GitHub Actions / test (1.22, ubuntu-latest)

undefined: tracer

Check failure on line 34 in admin/internal/organization_impl.go

View workflow job for this annotation

GitHub Actions / build

undefined: tracer

Check failure on line 34 in admin/internal/organization_impl.go

View workflow job for this annotation

GitHub Actions / GolangCI-Lint (1.22, macos-latest)

undefined: tracer

Check failure on line 34 in admin/internal/organization_impl.go

View workflow job for this annotation

GitHub Actions / test (1.22, macos-latest)

undefined: tracer

Check failure on line 34 in admin/internal/organization_impl.go

View workflow job for this annotation

GitHub Actions / test (1.23, macos-latest)

undefined: tracer

Check failure on line 34 in admin/internal/organization_impl.go

View workflow job for this annotation

GitHub Actions / test (1.23, ubuntu-latest)

undefined: tracer
defer span.End()

return o.internalClient.Gets(ctx, cursor)
}

Expand All @@ -40,6 +43,9 @@ func (o *OrganizationService) Gets(ctx context.Context, cursor string) (*model.A
//
// https://docs.go-atlassian.io/atlassian-admin-cloud/organization#get-an-organization-by-id
func (o *OrganizationService) Get(ctx context.Context, organizationID string) (*model.AdminOrganizationScheme, *model.ResponseScheme, error) {
ctx, span := tracer().Start(ctx, "(*OrganizationService).Get")

Check failure on line 46 in admin/internal/organization_impl.go

View workflow job for this annotation

GitHub Actions / test (1.22, macos-latest)

undefined: tracer

Check failure on line 46 in admin/internal/organization_impl.go

View workflow job for this annotation

GitHub Actions / build

undefined: tracer

Check failure on line 46 in admin/internal/organization_impl.go

View workflow job for this annotation

GitHub Actions / GolangCI-Lint (1.23, ubuntu-latest)

undefined: tracer

Check failure on line 46 in admin/internal/organization_impl.go

View workflow job for this annotation

GitHub Actions / GolangCI-Lint (1.22, macos-latest)

undefined: tracer

Check failure on line 46 in admin/internal/organization_impl.go

View workflow job for this annotation

GitHub Actions / test (1.23, macos-latest)

undefined: tracer

Check failure on line 46 in admin/internal/organization_impl.go

View workflow job for this annotation

GitHub Actions / GolangCI-Lint (1.22, ubuntu-latest)

undefined: tracer

Check failure on line 46 in admin/internal/organization_impl.go

View workflow job for this annotation

GitHub Actions / test (1.22, ubuntu-latest)

undefined: tracer

Check failure on line 46 in admin/internal/organization_impl.go

View workflow job for this annotation

GitHub Actions / test (1.22, ubuntu-latest)

undefined: tracer

Check failure on line 46 in admin/internal/organization_impl.go

View workflow job for this annotation

GitHub Actions / build

undefined: tracer

Check failure on line 46 in admin/internal/organization_impl.go

View workflow job for this annotation

GitHub Actions / GolangCI-Lint (1.22, macos-latest)

undefined: tracer

Check failure on line 46 in admin/internal/organization_impl.go

View workflow job for this annotation

GitHub Actions / test (1.22, macos-latest)

undefined: tracer

Check failure on line 46 in admin/internal/organization_impl.go

View workflow job for this annotation

GitHub Actions / test (1.23, macos-latest)

undefined: tracer

Check failure on line 46 in admin/internal/organization_impl.go

View workflow job for this annotation

GitHub Actions / test (1.23, ubuntu-latest)

undefined: tracer
defer span.End()

return o.internalClient.Get(ctx, organizationID)
}

Expand All @@ -49,6 +55,9 @@ func (o *OrganizationService) Get(ctx context.Context, organizationID string) (*
//
// https://docs.go-atlassian.io/atlassian-admin-cloud/organization#get-users-in-an-organization
func (o *OrganizationService) Users(ctx context.Context, organizationID, cursor string) (*model.OrganizationUserPageScheme, *model.ResponseScheme, error) {
ctx, span := tracer().Start(ctx, "(*OrganizationService).Users")
defer span.End()

return o.internalClient.Users(ctx, organizationID, cursor)
}

Expand All @@ -58,6 +67,9 @@ func (o *OrganizationService) Users(ctx context.Context, organizationID, cursor
//
// https://docs.go-atlassian.io/atlassian-admin-cloud/organization#get-domains-in-an-organization
func (o *OrganizationService) Domains(ctx context.Context, organizationID, cursor string) (*model.OrganizationDomainPageScheme, *model.ResponseScheme, error) {
ctx, span := tracer().Start(ctx, "(*OrganizationService).Domains")
defer span.End()

return o.internalClient.Domains(ctx, organizationID, cursor)
}

Expand All @@ -67,6 +79,9 @@ func (o *OrganizationService) Domains(ctx context.Context, organizationID, curso
//
// https://docs.go-atlassian.io/atlassian-admin-cloud/organization#get-domain-by-id
func (o *OrganizationService) Domain(ctx context.Context, organizationID, domainID string) (*model.OrganizationDomainScheme, *model.ResponseScheme, error) {
ctx, span := tracer().Start(ctx, "(*OrganizationService).Domain")
defer span.End()

return o.internalClient.Domain(ctx, organizationID, domainID)
}

Expand All @@ -76,6 +91,9 @@ func (o *OrganizationService) Domain(ctx context.Context, organizationID, domain
//
// https://docs.go-atlassian.io/atlassian-admin-cloud/organization#get-an-audit-log-of-events
func (o *OrganizationService) Events(ctx context.Context, organizationID string, options *model.OrganizationEventOptScheme, cursor string) (*model.OrganizationEventPageScheme, *model.ResponseScheme, error) {
ctx, span := tracer().Start(ctx, "(*OrganizationService).Events")
defer span.End()

return o.internalClient.Events(ctx, organizationID, options, cursor)
}

Expand All @@ -85,6 +103,9 @@ func (o *OrganizationService) Events(ctx context.Context, organizationID string,
//
// https://docs.go-atlassian.io/atlassian-admin-cloud/organization#get-an-event-by-id
func (o *OrganizationService) Event(ctx context.Context, organizationID, eventID string) (*model.OrganizationEventScheme, *model.ResponseScheme, error) {
ctx, span := tracer().Start(ctx, "(*OrganizationService).Event")
defer span.End()

return o.internalClient.Event(ctx, organizationID, eventID)
}

Expand All @@ -94,6 +115,9 @@ func (o *OrganizationService) Event(ctx context.Context, organizationID, eventID
//
// https://docs.go-atlassian.io/atlassian-admin-cloud/organization#get-list-of-event-actions
func (o *OrganizationService) Actions(ctx context.Context, organizationID string) (*model.OrganizationEventActionScheme, *model.ResponseScheme, error) {
ctx, span := tracer().Start(ctx, "(*OrganizationService).Actions")
defer span.End()

return o.internalClient.Actions(ctx, organizationID)
}

Expand All @@ -103,6 +127,9 @@ type internalOrganizationImpl struct {

func (i *internalOrganizationImpl) Gets(ctx context.Context, cursor string) (*model.AdminOrganizationPageScheme, *model.ResponseScheme, error) {

ctx, span := tracer().Start(ctx, "(*internalOrganizationImpl).Gets")
defer span.End()

var endpoint strings.Builder
endpoint.WriteString("admin/v1/orgs")

Expand All @@ -129,6 +156,9 @@ func (i *internalOrganizationImpl) Gets(ctx context.Context, cursor string) (*mo

func (i *internalOrganizationImpl) Get(ctx context.Context, organizationID string) (*model.AdminOrganizationScheme, *model.ResponseScheme, error) {

ctx, span := tracer().Start(ctx, "(*internalOrganizationImpl).Get")
defer span.End()

if organizationID == "" {
return nil, nil, model.ErrNoAdminOrganization
}
Expand All @@ -151,6 +181,9 @@ func (i *internalOrganizationImpl) Get(ctx context.Context, organizationID strin

func (i *internalOrganizationImpl) Users(ctx context.Context, organizationID, cursor string) (*model.OrganizationUserPageScheme, *model.ResponseScheme, error) {

ctx, span := tracer().Start(ctx, "(*internalOrganizationImpl).Users")
defer span.End()

if organizationID == "" {
return nil, nil, model.ErrNoAdminOrganization
}
Expand Down Expand Up @@ -181,6 +214,9 @@ func (i *internalOrganizationImpl) Users(ctx context.Context, organizationID, cu

func (i *internalOrganizationImpl) Domains(ctx context.Context, organizationID, cursor string) (*model.OrganizationDomainPageScheme, *model.ResponseScheme, error) {

ctx, span := tracer().Start(ctx, "(*internalOrganizationImpl).Domains")
defer span.End()

if organizationID == "" {
return nil, nil, model.ErrNoAdminOrganization
}
Expand Down Expand Up @@ -211,6 +247,9 @@ func (i *internalOrganizationImpl) Domains(ctx context.Context, organizationID,

func (i *internalOrganizationImpl) Domain(ctx context.Context, organizationID, domainID string) (*model.OrganizationDomainScheme, *model.ResponseScheme, error) {

ctx, span := tracer().Start(ctx, "(*internalOrganizationImpl).Domain")
defer span.End()

if organizationID == "" {
return nil, nil, model.ErrNoAdminOrganization
}
Expand All @@ -237,6 +276,9 @@ func (i *internalOrganizationImpl) Domain(ctx context.Context, organizationID, d

func (i *internalOrganizationImpl) Events(ctx context.Context, organizationID string, options *model.OrganizationEventOptScheme, cursor string) (*model.OrganizationEventPageScheme, *model.ResponseScheme, error) {

ctx, span := tracer().Start(ctx, "(*internalOrganizationImpl).Events")
defer span.End()

if organizationID == "" {
return nil, nil, model.ErrNoAdminOrganization
}
Expand Down Expand Up @@ -290,6 +332,9 @@ func (i *internalOrganizationImpl) Events(ctx context.Context, organizationID st

func (i *internalOrganizationImpl) Event(ctx context.Context, organizationID, eventID string) (*model.OrganizationEventScheme, *model.ResponseScheme, error) {

ctx, span := tracer().Start(ctx, "(*internalOrganizationImpl).Event")
defer span.End()

if organizationID == "" {
return nil, nil, model.ErrNoAdminOrganization
}
Expand All @@ -316,6 +361,9 @@ func (i *internalOrganizationImpl) Event(ctx context.Context, organizationID, ev

func (i *internalOrganizationImpl) Actions(ctx context.Context, organizationID string) (*model.OrganizationEventActionScheme, *model.ResponseScheme, error) {

ctx, span := tracer().Start(ctx, "(*internalOrganizationImpl).Actions")
defer span.End()

if organizationID == "" {
return nil, nil, model.ErrNoAdminOrganization
}
Expand Down
30 changes: 30 additions & 0 deletions admin/internal/organization_policy_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ type OrganizationPolicyService struct {
//
// https://docs.go-atlassian.io/atlassian-admin-cloud/organization/policy#get-list-of-policies
func (o *OrganizationPolicyService) Gets(ctx context.Context, organizationID, policyType, cursor string) (*model.OrganizationPolicyPageScheme, *model.ResponseScheme, error) {
ctx, span := tracer().Start(ctx, "(*OrganizationPolicyService).Gets")
defer span.End()

return o.internalClient.Gets(ctx, organizationID, policyType, cursor)
}

Expand All @@ -38,6 +41,9 @@ func (o *OrganizationPolicyService) Gets(ctx context.Context, organizationID, po
//
// https://docs.go-atlassian.io/atlassian-admin-cloud/organization/policy#get-a-policy-by-id
func (o *OrganizationPolicyService) Get(ctx context.Context, organizationID, policyID string) (*model.OrganizationPolicyScheme, *model.ResponseScheme, error) {
ctx, span := tracer().Start(ctx, "(*OrganizationPolicyService).Get")
defer span.End()

return o.internalClient.Get(ctx, organizationID, policyID)
}

Expand All @@ -47,6 +53,9 @@ func (o *OrganizationPolicyService) Get(ctx context.Context, organizationID, pol
//
// https://docs.go-atlassian.io/atlassian-admin-cloud/organization/policy#create-a-policy
func (o *OrganizationPolicyService) Create(ctx context.Context, organizationID string, payload *model.OrganizationPolicyData) (*model.OrganizationPolicyScheme, *model.ResponseScheme, error) {
ctx, span := tracer().Start(ctx, "(*OrganizationPolicyService).Create")
defer span.End()

return o.internalClient.Create(ctx, organizationID, payload)
}

Expand All @@ -56,6 +65,9 @@ func (o *OrganizationPolicyService) Create(ctx context.Context, organizationID s
//
// https://docs.go-atlassian.io/atlassian-admin-cloud/organization/policy#update-a-policy
func (o *OrganizationPolicyService) Update(ctx context.Context, organizationID, policyID string, payload *model.OrganizationPolicyData) (*model.OrganizationPolicyScheme, *model.ResponseScheme, error) {
ctx, span := tracer().Start(ctx, "(*OrganizationPolicyService).Update")
defer span.End()

return o.internalClient.Update(ctx, organizationID, policyID, payload)
}

Expand All @@ -65,6 +77,9 @@ func (o *OrganizationPolicyService) Update(ctx context.Context, organizationID,
//
// https://docs.go-atlassian.io/atlassian-admin-cloud/organization/policy#delete-a-policy
func (o *OrganizationPolicyService) Delete(ctx context.Context, organizationID, policyID string) (*model.ResponseScheme, error) {
ctx, span := tracer().Start(ctx, "(*OrganizationPolicyService).Delete")
defer span.End()

return o.internalClient.Delete(ctx, organizationID, policyID)
}

Expand All @@ -74,6 +89,9 @@ type internalOrganizationPolicyImpl struct {

func (i *internalOrganizationPolicyImpl) Gets(ctx context.Context, organizationID, policyType, cursor string) (*model.OrganizationPolicyPageScheme, *model.ResponseScheme, error) {

ctx, span := tracer().Start(ctx, "(*internalOrganizationPolicyImpl).Gets")
defer span.End()

if organizationID == "" {
return nil, nil, model.ErrNoAdminOrganization
}
Expand Down Expand Up @@ -110,6 +128,9 @@ func (i *internalOrganizationPolicyImpl) Gets(ctx context.Context, organizationI

func (i *internalOrganizationPolicyImpl) Get(ctx context.Context, organizationID, policyID string) (*model.OrganizationPolicyScheme, *model.ResponseScheme, error) {

ctx, span := tracer().Start(ctx, "(*internalOrganizationPolicyImpl).Get")
defer span.End()

if organizationID == "" {
return nil, nil, model.ErrNoAdminOrganization
}
Expand All @@ -136,6 +157,9 @@ func (i *internalOrganizationPolicyImpl) Get(ctx context.Context, organizationID

func (i *internalOrganizationPolicyImpl) Create(ctx context.Context, organizationID string, payload *model.OrganizationPolicyData) (*model.OrganizationPolicyScheme, *model.ResponseScheme, error) {

ctx, span := tracer().Start(ctx, "(*internalOrganizationPolicyImpl).Create")
defer span.End()

if organizationID == "" {
return nil, nil, model.ErrNoAdminOrganization
}
Expand All @@ -158,6 +182,9 @@ func (i *internalOrganizationPolicyImpl) Create(ctx context.Context, organizatio

func (i *internalOrganizationPolicyImpl) Update(ctx context.Context, organizationID, policyID string, payload *model.OrganizationPolicyData) (*model.OrganizationPolicyScheme, *model.ResponseScheme, error) {

ctx, span := tracer().Start(ctx, "(*internalOrganizationPolicyImpl).Update")
defer span.End()

if organizationID == "" {
return nil, nil, model.ErrNoAdminOrganization
}
Expand All @@ -184,6 +211,9 @@ func (i *internalOrganizationPolicyImpl) Update(ctx context.Context, organizatio

func (i *internalOrganizationPolicyImpl) Delete(ctx context.Context, organizationID, policyID string) (*model.ResponseScheme, error) {

ctx, span := tracer().Start(ctx, "(*internalOrganizationPolicyImpl).Delete")
defer span.End()

if organizationID == "" {
return nil, model.ErrNoAdminOrganization
}
Expand Down
Loading

0 comments on commit 7fc1081

Please sign in to comment.