internal

package
v1.6.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 17, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAuthenticationService

func NewAuthenticationService(client service.Connector) common.Authentication

Types

type AuthenticationService

type AuthenticationService struct {
	// contains filtered or unexported fields
}

func (*AuthenticationService) GetBasicAuth

func (a *AuthenticationService) GetBasicAuth() (string, string)

func (*AuthenticationService) GetBearerToken

func (a *AuthenticationService) GetBearerToken() string

func (*AuthenticationService) GetUserAgent

func (a *AuthenticationService) GetUserAgent() string

func (*AuthenticationService) HasBasicAuth

func (a *AuthenticationService) HasBasicAuth() bool

func (*AuthenticationService) HasSetExperimentalFlag

func (a *AuthenticationService) HasSetExperimentalFlag() bool

func (*AuthenticationService) HasUserAgent

func (a *AuthenticationService) HasUserAgent() bool

func (*AuthenticationService) SetBasicAuth

func (a *AuthenticationService) SetBasicAuth(mail, token string)

func (*AuthenticationService) SetBearerToken

func (a *AuthenticationService) SetBearerToken(token string)

func (*AuthenticationService) SetExperimentalFlag

func (a *AuthenticationService) SetExperimentalFlag()

func (*AuthenticationService) SetUserAgent

func (a *AuthenticationService) SetUserAgent(agent string)

type OrganizationDirectoryService added in v1.5.1

type OrganizationDirectoryService struct {
	// contains filtered or unexported fields
}

func NewOrganizationDirectoryService added in v1.5.1

func NewOrganizationDirectoryService(client service.Connector) *OrganizationDirectoryService

func (*OrganizationDirectoryService) Activity added in v1.5.1

func (o *OrganizationDirectoryService) Activity(ctx context.Context, organizationID, accountID string) (*model.UserProductAccessScheme, *model.ResponseScheme, error)

Activity returns a user’s last active date for each product listed in Atlassian Administration.

Active is defined as viewing a product's page for a minimum of 2 seconds.

Last activity data can be delayed by up to 4 hours.

If the user has not accessed a product, the product_access response field will be empty.

The added_to_org date field is available only to customers using the new user management experience.

GET /admin/v1/orgs/{orgId}/directory/users/{accountId}/last-active-dates

https://docs.go-atlassian.io/atlassian-admin-cloud/organization/directory#users-last-active-dates

func (*OrganizationDirectoryService) Remove added in v1.5.1

func (o *OrganizationDirectoryService) Remove(ctx context.Context, organizationID, accountID string) (*model.ResponseScheme, error)

Remove removes user access to products listed in Atlassian Administration.

-- The API is available for customers using the new user management experience only. --

Note: Users with emails whose domain is claimed can still be found in Managed accounts in Directory.

DELETE /admin/v1/orgs/{orgId}/directory/users/{accountId}

https://docs.go-atlassian.io/atlassian-admin-cloud/organization/directory#remove-user-access

func (*OrganizationDirectoryService) Restore added in v1.5.1

Restore restores user access to products listed in Atlassian Administration.

-- The API is available for customers using the new user management experience only. --

Note: Users with emails whose domain is claimed can still be found in Managed accounts in Directory.

POST /admin/v1/orgs/{orgId}/directory/users/{accountId}/restore-access

https://docs.go-atlassian.io/atlassian-admin-cloud/organization/directory#restore-user-access

func (*OrganizationDirectoryService) Suspend added in v1.5.1

Suspend suspends user access to products listed in Atlassian Administration.

-- The API is available for customers using the new user management experience only. --

Note: Users with emails whose domain is claimed can still be found in Managed accounts in Directory.

POST /admin/v1/orgs/{orgId}/directory/users/{accountId}/suspend-access

https://docs.go-atlassian.io/atlassian-admin-cloud/organization/directory#suspend-user-access

type OrganizationPolicyService

type OrganizationPolicyService struct {
	// contains filtered or unexported fields
}

func NewOrganizationPolicyService

func NewOrganizationPolicyService(client service.Connector) *OrganizationPolicyService

func (*OrganizationPolicyService) Create

Create creates a policy for an org

POST /admin/v1/orgs/{orgId}/policies

https://docs.go-atlassian.io/atlassian-admin-cloud/organization/policy#create-a-policy

func (*OrganizationPolicyService) Delete

func (o *OrganizationPolicyService) Delete(ctx context.Context, organizationID, policyID string) (*model.ResponseScheme, error)

Delete deletes a policy for an org.

DELETE /admin/v1/orgs/{orgId}/policies/{policyId}

https://docs.go-atlassian.io/atlassian-admin-cloud/organization/policy#delete-a-policy

func (*OrganizationPolicyService) Get

Get returns information about a single policy by ID.

GET /admin/v1/orgs/{orgId}/policies/{policyId}

https://docs.go-atlassian.io/atlassian-admin-cloud/organization/policy#get-a-policy-by-id

func (*OrganizationPolicyService) Gets

func (o *OrganizationPolicyService) Gets(ctx context.Context, organizationID, policyType, cursor string) (*model.OrganizationPolicyPageScheme, *model.ResponseScheme, error)

Gets returns information about org policies.

GET /admin/v1/orgs/{orgId}/policies

https://docs.go-atlassian.io/atlassian-admin-cloud/organization/policy#get-list-of-policies

func (*OrganizationPolicyService) Update

Update updates a policy for an org

PUT /admin/v1/orgs/{orgId}/policies/{policyId}

https://docs.go-atlassian.io/atlassian-admin-cloud/organization/policy#update-a-policy

type OrganizationService

type OrganizationService struct {
	Policy    *OrganizationPolicyService
	Directory *OrganizationDirectoryService
	// contains filtered or unexported fields
}

func (*OrganizationService) Actions

Actions returns information localized event actions.

GET /admin/v1/orgs/{orgId}/event-actions

https://docs.go-atlassian.io/atlassian-admin-cloud/organization#get-list-of-event-actions

func (*OrganizationService) Domain

func (o *OrganizationService) Domain(ctx context.Context, organizationID, domainID string) (*model.OrganizationDomainScheme, *model.ResponseScheme, error)

Domain returns information about a single verified domain by ID.

GET /admin/v1/orgs/{orgId}/domains/{domainId}

https://docs.go-atlassian.io/atlassian-admin-cloud/organization#get-domain-by-id

func (*OrganizationService) Domains

Domains returns a list of domains in an organization one page at a time.

GET /admin/v1/orgs/{orgId}/domains

https://docs.go-atlassian.io/atlassian-admin-cloud/organization#get-domains-in-an-organization

func (*OrganizationService) Event

func (o *OrganizationService) Event(ctx context.Context, organizationID, eventID string) (*model.OrganizationEventScheme, *model.ResponseScheme, error)

Event returns information about a single event by ID.

GET /admin/v1/orgs/{orgId}/events/{eventId}

https://docs.go-atlassian.io/atlassian-admin-cloud/organization#get-an-event-by-id

func (*OrganizationService) Events

Events returns an audit log of events from an organization one page at a time.

GET /admin/v1/orgs/{orgId}/events

https://docs.go-atlassian.io/atlassian-admin-cloud/organization#get-an-audit-log-of-events

func (*OrganizationService) Get

Get returns information about a single organization by ID

GET /admin/v1/orgs/{orgId}

https://docs.go-atlassian.io/atlassian-admin-cloud/organization#get-an-organization-by-id

func (*OrganizationService) Gets

Gets returns a list of your organizations (based on your API key).

GET /admin/v1/orgs

https://docs.go-atlassian.io/atlassian-admin-cloud/organization#get-organizations

func (*OrganizationService) Users

Users returns a list of users in an organization.

GET /admin/v1/orgs/{orgId}/users

https://docs.go-atlassian.io/atlassian-admin-cloud/organization#get-users-in-an-organization

type SCIMGroupService

type SCIMGroupService struct {
	// contains filtered or unexported fields
}

func NewSCIMGroupService

func NewSCIMGroupService(client service.Connector) *SCIMGroupService

func (*SCIMGroupService) Create

func (s *SCIMGroupService) Create(ctx context.Context, directoryID, groupName string) (*model.ScimGroupScheme, *model.ResponseScheme, error)

Create creates a group in a directory.

An attempt to create a group with an existing name fails with a 409 (Conflict) error.

POST /scim/directory/{directoryId}/Groups

https://docs.go-atlassian.io/atlassian-admin-cloud/scim/groups#create-a-group

func (*SCIMGroupService) Delete

func (s *SCIMGroupService) Delete(ctx context.Context, directoryID, groupID string) (*model.ResponseScheme, error)

Delete deletes a group from a directory.

An attempt to delete a non-existent group fails with a 404 (Resource Not found) error.

DELETE /scim/directory/{directoryId}/Groups/{id}

https://docs.go-atlassian.io/atlassian-admin-cloud/scim/groups#delete-a-group-by-id

func (*SCIMGroupService) Get

func (s *SCIMGroupService) Get(ctx context.Context, directoryID, groupID string) (*model.ScimGroupScheme, *model.ResponseScheme, error)

Get returns a group from a directory by group ID.

GET /scim/directory/{directoryId}/Groups/{id}

https://docs.go-atlassian.io/atlassian-admin-cloud/scim/groups#get-a-group-by-id

func (*SCIMGroupService) Gets

func (s *SCIMGroupService) Gets(ctx context.Context, directoryID, filter string, startAt, maxResults int) (*model.ScimGroupPageScheme, *model.ResponseScheme, error)

Gets get groups from a directory.

Filtering is supported with a single exact match (eq) against the displayName attribute.

Pagination is supported.

Sorting is not supported.

GET /scim/directory/{directoryId}/Groups

https://docs.go-atlassian.io/atlassian-admin-cloud/scim/groups#get-groups

func (*SCIMGroupService) Path

func (s *SCIMGroupService) Path(ctx context.Context, directoryID, groupID string, payload *model.SCIMGroupPathScheme) (*model.ScimGroupScheme, *model.ResponseScheme, error)

Path update a group's information in a directory by groupId via PATCH.

You can use this API to manage group membership.

PATCH /scim/directory/{directoryId}/Groups/{id}

https://docs.go-atlassian.io/atlassian-admin-cloud/scim/groups#update-a-group-by-id-patch

func (*SCIMGroupService) Update

func (s *SCIMGroupService) Update(ctx context.Context, directoryID, groupID string, newGroupName string) (*model.ScimGroupScheme, *model.ResponseScheme, error)

Update updates a group in a directory by group ID.

PUT /scim/directory/{directoryId}/Groups/{id}

https://docs.go-atlassian.io/atlassian-admin-cloud/scim/groups#update-a-group-by-id

type SCIMSchemaService

type SCIMSchemaService struct {
	// contains filtered or unexported fields
}

func NewSCIMSchemaService

func NewSCIMSchemaService(client service.Connector) *SCIMSchemaService

func (*SCIMSchemaService) Enterprise

func (s *SCIMSchemaService) Enterprise(ctx context.Context, directoryID string) (*model.SCIMSchemaScheme, *model.ResponseScheme, error)

Enterprise get the user enterprise extension schemas from the SCIM provider.

Filtering, pagination and sorting are not supported.

GET /scim/directory/{directoryId}/Schemas/urn:ietf:params:scim:schemas:extension:enterprise:2.0:User

https://docs.go-atlassian.io/atlassian-admin-cloud/scim/schemas#get-user-enterprise-extension-schemas

func (*SCIMSchemaService) Feature

Feature get metadata about the supported SCIM features.

This is a service provider configuration endpoint providing supported SCIM features.

Filtering, pagination and sorting are not supported.

GET /scim/directory/{directoryId}/ServiceProviderConfig

https://docs.go-atlassian.io/atlassian-admin-cloud/scim/schemas#get-feature-metadata

func (*SCIMSchemaService) Gets

Gets get all SCIM features metadata.

Filtering, pagination and sorting are not supported.

GET /scim/directory/{directoryId}/Schemas

https://docs.go-atlassian.io/atlassian-admin-cloud/scim/schemas#get-all-schemas

func (*SCIMSchemaService) Group

Group get the group schemas from the SCIM provider.

Filtering, pagination and sorting are not supported.

GET /scim/directory/{directoryId}/Schemas/urn:ietf:params:scim:schemas:core:2.0:Group

https://docs.go-atlassian.io/atlassian-admin-cloud/scim/schemas#get-group-schemas

func (*SCIMSchemaService) User

User get the user schemas from the SCIM provider.

Filtering, pagination and sorting are not supported.

GET /scim/directory/{directoryId}/Schemas/urn:ietf:params:scim:schemas:core:2.0:User

https://docs.go-atlassian.io/atlassian-admin-cloud/scim/schemas#get-user-schemas

type SCIMService

type SCIMService struct {
	User   *SCIMUserService
	Group  *SCIMGroupService
	Schema *SCIMSchemaService
}

type SCIMUserService

type SCIMUserService struct {
	// contains filtered or unexported fields
}

func NewSCIMUserService

func NewSCIMUserService(client service.Connector) *SCIMUserService

func (*SCIMUserService) Create

func (s *SCIMUserService) Create(ctx context.Context, directoryID string, payload *model.SCIMUserScheme, attributes, excludedAttributes []string) (*model.SCIMUserScheme, *model.ResponseScheme, error)

Create creates a user in a directory.

An attempt to create an existing user fails with a 409 (Conflict) error.

A user account can only be created if it has an email address on a verified domain.

If a managed Atlassian account already exists on the Atlassian platform for the specified email address,

the user in your identity provider is linked to the user in your Atlassian organization.

POST /scim/directory/{directoryId}/Users

https://docs.go-atlassian.io/atlassian-admin-cloud/scim/users#create-a-user

func (*SCIMUserService) Deactivate

func (s *SCIMUserService) Deactivate(ctx context.Context, directoryID, userID string) (*model.ResponseScheme, error)

Deactivate deactivates a user by userId.

The user is not available for future requests until activated again.

Any future operation for the deactivated user returns the 404 (resource not found) error.

DELETE /scim/directory/{directoryId}/Users/{userId}

func (*SCIMUserService) Get

func (s *SCIMUserService) Get(ctx context.Context, directoryID, userID string, attributes, excludedAttributes []string) (*model.SCIMUserScheme, *model.ResponseScheme, error)

Get gets a user from a directory by userId.

GET /scim/directory/{directoryId}/Users/{userId}

https://docs.go-atlassian.io/atlassian-admin-cloud/scim/users#get-a-user-by-id

func (*SCIMUserService) Gets

func (s *SCIMUserService) Gets(ctx context.Context, directoryID string, opts *model.SCIMUserGetsOptionsScheme, startIndex, count int) (*model.SCIMUserPageScheme, *model.ResponseScheme, error)

Gets get users from the specified directory.

Filtering is supported with a single exact match (eq) against the userName and externalId attributes.

Pagination is supported.

Sorting is not supported.

GET /scim/directory/{directoryId}/Users

https://docs.go-atlassian.io/atlassian-admin-cloud/scim/users#get-users

func (*SCIMUserService) Path

func (s *SCIMUserService) Path(ctx context.Context, directoryID, userID string, payload *model.SCIMUserToPathScheme, attributes, excludedAttributes []string) (*model.SCIMUserScheme, *model.ResponseScheme, error)

Path updates a user's information in a directory by userId via PATCH.

Refer to GET /ServiceProviderConfig for details on the supported operations.

PATCH /scim/directory/{directoryId}/Users/{userId}

https://docs.go-atlassian.io/atlassian-admin-cloud/scim/users#update-user-by-id-patch

func (*SCIMUserService) Update

func (s *SCIMUserService) Update(ctx context.Context, directoryID, userID string, payload *model.SCIMUserScheme, attributes, excludedAttributes []string) (*model.SCIMUserScheme, *model.ResponseScheme, error)

Update updates a user's information in a directory by userId via user attributes.

User information is replaced attribute-by-attribute, except immutable and read-only attributes.

Existing values of unspecified attributes are cleaned.

PUT /scim/directory/{directoryId}/Users/{userId}

https://docs.go-atlassian.io/atlassian-admin-cloud/scim/users#update-user-via-user-attributes

type UserService

type UserService struct {
	Token *UserTokenService
	// contains filtered or unexported fields
}

func NewUserService

func NewUserService(client service.Connector, token *UserTokenService) *UserService

func (*UserService) Disable

func (u *UserService) Disable(ctx context.Context, accountID, message string) (*model.ResponseScheme, error)

Disable deactivate the specified user account.

The permission to make use of this resource is exposed by the lifecycle.enablement privilege.

You can optionally set a message associated with the block.

If none is supplied, a default message will be used.

POST /users/{account_id}/manage/lifecycle/disable

https://docs.go-atlassian.io/atlassian-admin-cloud/user#disable-a-user

func (*UserService) Enable

func (u *UserService) Enable(ctx context.Context, accountID string) (*model.ResponseScheme, error)

Enable activates the specified user account.

The permission to make use of this resource is exposed by the lifecycle.enablement privilege.

POST /users/{account_id}/manage/lifecycle/enable

https://docs.go-atlassian.io/atlassian-admin-cloud/user#enable-a-user

func (*UserService) Get

Get returns information about a single Atlassian account by ID

GET /users/{account_id}/manage/profile

https://docs.go-atlassian.io/atlassian-admin-cloud/user#get-profile

func (*UserService) Permissions

func (u *UserService) Permissions(ctx context.Context, accountID string, privileges []string) (*model.AdminUserPermissionScheme, *model.ResponseScheme, error)

Permissions returns the set of permissions you have for managing the specified Atlassian account

GET /users/{account_id}/manage

https://docs.go-atlassian.io/atlassian-admin-cloud/user#get-user-management-permissions

func (*UserService) Update

func (u *UserService) Update(ctx context.Context, accountID string, payload map[string]interface{}) (*model.AdminUserScheme, *model.ResponseScheme, error)

Update updates fields in a user account. The profile.write privilege details which fields you can change.

PATCH /users/{account_id}/manage/profile

https://docs.go-atlassian.io/atlassian-admin-cloud/user#update-profile

type UserTokenService

type UserTokenService struct {
	// contains filtered or unexported fields
}

func NewUserTokenService

func NewUserTokenService(client service.Connector) *UserTokenService

func (*UserTokenService) Delete

func (u *UserTokenService) Delete(ctx context.Context, accountID, tokenID string) (*model.ResponseScheme, error)

Delete deletes a specified API token by ID.

DELETE /users/{account_id}/manage/api-tokens/{tokenId}

https://docs.go-atlassian.io/atlassian-admin-cloud/user/token#delete-api-token

func (*UserTokenService) Gets

Gets gets the API tokens owned by the specified user.

GET /users/{account_id}/manage/api-tokens

https://docs.go-atlassian.io/atlassian-admin-cloud/user/token#get-api-tokens

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL