clients

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplicationsClient

type ApplicationsClient struct {
	BaseClient base.Client
}

ApplicationsClient performs operations on Applications.

func NewApplicationsClient

func NewApplicationsClient(tenantId string) *ApplicationsClient

NewApplicationsClient returns a new ApplicationsClient

func (*ApplicationsClient) AddKey

func (c *ApplicationsClient) AddKey(ctx context.Context, applicationId string, keyCredential models.KeyCredential) (*models.KeyCredential, int, error)

AddKey appends a new key credential to an Application.

func (*ApplicationsClient) AddOwners

func (c *ApplicationsClient) AddOwners(ctx context.Context, application *models.Application) (int, error)

AddOwners adds a new owner to an Application. First populate the Owners field of the Application using the AppendOwner method of the model, then call this method.

func (*ApplicationsClient) Create

func (c *ApplicationsClient) Create(ctx context.Context, application models.Application) (*models.Application, int, error)

Create creates a new Application.

func (*ApplicationsClient) Delete

func (c *ApplicationsClient) Delete(ctx context.Context, id string) (int, error)

Delete removes an Application.

func (*ApplicationsClient) Get

Get retrieves an Application manifest.

func (*ApplicationsClient) GetOwner

func (c *ApplicationsClient) GetOwner(ctx context.Context, applicationId, ownerId string) (*string, int, error)

GetOwner retrieves a single owner for the specified Application. applicationId is the object ID of the application. ownerId is the object ID of the owning object.

func (*ApplicationsClient) List

func (c *ApplicationsClient) List(ctx context.Context, filter string) (*[]models.Application, int, error)

List returns a list of Applications, optionally filtered using OData.

func (*ApplicationsClient) ListOwners

func (c *ApplicationsClient) ListOwners(ctx context.Context, id string) (*[]string, int, error)

ListOwners retrieves the owners of the specified Application. id is the object ID of the application.

func (*ApplicationsClient) RemoveOwners

func (c *ApplicationsClient) RemoveOwners(ctx context.Context, applicationId string, ownerIds *[]string) (int, error)

RemoveOwners removes owners from an Application. applicationId is the object ID of the application. ownerIds is a *[]string containing object IDs of owners to remove.

func (*ApplicationsClient) Update

func (c *ApplicationsClient) Update(ctx context.Context, application models.Application) (int, error)

Update amends the manifest of an existing Application.

type DomainsClient

type DomainsClient struct {
	BaseClient base.Client
}

DomainsClient performs operations on Domains.

func NewDomainsClient

func NewDomainsClient(tenantId string) *DomainsClient

NewDomainsClient returns a new DomainsClient.

func (*DomainsClient) Get

func (c *DomainsClient) Get(ctx context.Context, id string) (*models.Domain, int, error)

Get retrieves a Domain.

func (*DomainsClient) List

func (c *DomainsClient) List(ctx context.Context) (*[]models.Domain, int, error)

List returns a list of Domains.

type GroupsClient

type GroupsClient struct {
	BaseClient base.Client
}

GroupsClient performs operations on Groups.

func NewGroupsClient

func NewGroupsClient(tenantId string) *GroupsClient

NewGroupsClient returns a new GroupsClient.

func (*GroupsClient) AddMembers

func (c *GroupsClient) AddMembers(ctx context.Context, group *models.Group) (int, error)

AddMembers adds a new member to a Group. First populate the Members field of the Group using the AppendMember method of the model, then call this method.

func (*GroupsClient) AddOwners

func (c *GroupsClient) AddOwners(ctx context.Context, group *models.Group) (int, error)

AddOwners adds a new owner to a Group. First populate the Owners field of the Group using the AppendOwner method of the model, then call this method.

func (*GroupsClient) Create

func (c *GroupsClient) Create(ctx context.Context, group models.Group) (*models.Group, int, error)

Create creates a new Group.

func (*GroupsClient) Delete

func (c *GroupsClient) Delete(ctx context.Context, id string) (int, error)

Delete removes a Group.

func (*GroupsClient) Get

func (c *GroupsClient) Get(ctx context.Context, id string) (*models.Group, int, error)

Get retrieves a Group.

func (*GroupsClient) GetMember

func (c *GroupsClient) GetMember(ctx context.Context, groupId, memberId string) (*string, int, error)

GetMember retrieves a single member of the specified Group. groupId is the object ID of the group. memberId is the object ID of the member object.

func (*GroupsClient) GetOwner

func (c *GroupsClient) GetOwner(ctx context.Context, groupId, ownerId string) (*string, int, error)

GetOwner retrieves a single owner for the specified Group. groupId is the object ID of the group. ownerId is the object ID of the owning object.

func (*GroupsClient) List

func (c *GroupsClient) List(ctx context.Context, filter string) (*[]models.Group, int, error)

List returns a list of Groups, optionally filtered using OData.

func (*GroupsClient) ListMembers

func (c *GroupsClient) ListMembers(ctx context.Context, id string) (*[]string, int, error)

ListMembers retrieves the members of the specified Group. id is the object ID of the group.

func (*GroupsClient) ListOwners

func (c *GroupsClient) ListOwners(ctx context.Context, id string) (*[]string, int, error)

ListOwners retrieves the owners of the specified Group. id is the object ID of the group.

func (*GroupsClient) RemoveMembers

func (c *GroupsClient) RemoveMembers(ctx context.Context, id string, memberIds *[]string) (int, error)

RemoveMembers removes members from a Group. groupId is the object ID of the group. memberIds is a *[]string containing object IDs of members to remove.

func (*GroupsClient) RemoveOwners

func (c *GroupsClient) RemoveOwners(ctx context.Context, id string, ownerIds *[]string) (int, error)

RemoveOwners removes owners from a Group. groupId is the object ID of the group. ownerIds is a *[]string containing object IDs of owners to remove.

func (*GroupsClient) Update

func (c *GroupsClient) Update(ctx context.Context, group models.Group) (int, error)

Update amends an existing Group.

type InvitationsClient added in v0.9.0

type InvitationsClient struct {
	BaseClient base.Client
}

InvitationsClient performs operations on Invitations.

func NewInvitationsClient added in v0.9.0

func NewInvitationsClient(tenantId string) *InvitationsClient

NewInvitationsClient returns a new InvitationsClient.

func (*InvitationsClient) Create added in v0.9.0

func (c *InvitationsClient) Create(ctx context.Context, invitation models.Invitation) (*models.Invitation, int, error)

Create creates a new Invitation.

type MeClient

type MeClient struct {
	BaseClient base.Client
}

MeClient performs operations on the authenticated user.

func NewMeClient

func NewMeClient(tenantId string) *MeClient

NewMeClient returns a new MeClient.

func (*MeClient) Get

func (c *MeClient) Get(ctx context.Context) (*models.Me, int, error)

Get retrieves information about the authenticated user.

func (*MeClient) GetProfile

func (c *MeClient) GetProfile(ctx context.Context) (*models.Me, int, error)

GetProfile retrieves the profile of the authenticated user.

type ServicePrincipalsClient

type ServicePrincipalsClient struct {
	BaseClient base.Client
}

ServicePrincipalsClient performs operations on Service Principals.

func NewServicePrincipalsClient

func NewServicePrincipalsClient(tenantId string) *ServicePrincipalsClient

NewServicePrincipalsClient returns a new ServicePrincipalsClient.

func (*ServicePrincipalsClient) AddOwners

func (c *ServicePrincipalsClient) AddOwners(ctx context.Context, servicePrincipal *models.ServicePrincipal) (int, error)

AddOwners adds a new owner to a Service Principal. First populate the Owners field of the ServicePrincipal using the AppendOwner method of the model, then call this method.

func (*ServicePrincipalsClient) Create

Create creates a new Service Principal.

func (*ServicePrincipalsClient) Delete

func (c *ServicePrincipalsClient) Delete(ctx context.Context, id string) (int, error)

Delete removes a Service Principal.

func (*ServicePrincipalsClient) Get

Get retrieves a Service Principal.

func (*ServicePrincipalsClient) GetOwner

func (c *ServicePrincipalsClient) GetOwner(ctx context.Context, servicePrincipalId, ownerId string) (*string, int, error)

GetOwner retrieves a single owner for the specified Service Principal. servicePrincipalId is the object ID of the service principal. ownerId is the object ID of the owning object.

func (*ServicePrincipalsClient) List

List returns a list of Service Principals, optionally filtered using OData.

func (*ServicePrincipalsClient) ListGroupMemberships added in v0.4.0

func (c *ServicePrincipalsClient) ListGroupMemberships(ctx context.Context, id string, filter string) (*[]models.Group, int, error)

ListGroupMemberships returns a list of Groups the Service Principal is member of, optionally filtered using OData.

func (*ServicePrincipalsClient) ListOwners

func (c *ServicePrincipalsClient) ListOwners(ctx context.Context, id string) (*[]string, int, error)

ListOwners retrieves the owners of the specified Service Principal. id is the object ID of the service principal.

func (*ServicePrincipalsClient) RemoveOwners

func (c *ServicePrincipalsClient) RemoveOwners(ctx context.Context, servicePrincipalId string, ownerIds *[]string) (int, error)

RemoveOwners removes owners from a Service Principal. servicePrincipalId is the object ID of the service principal. ownerIds is a *[]string containing object IDs of owners to remove.

func (*ServicePrincipalsClient) Update

func (c *ServicePrincipalsClient) Update(ctx context.Context, servicePrincipal models.ServicePrincipal) (int, error)

Update amends an existing Service Principal.

type UsersClient

type UsersClient struct {
	BaseClient base.Client
}

UsersClient performs operations on Users.

func NewUsersClient

func NewUsersClient(tenantId string) *UsersClient

NewUsersClient returns a new UsersClient.

func (*UsersClient) Create

func (c *UsersClient) Create(ctx context.Context, user models.User) (*models.User, int, error)

Create creates a new User.

func (*UsersClient) Delete

func (c *UsersClient) Delete(ctx context.Context, id string) (int, error)

Delete removes a User.

func (*UsersClient) Get

func (c *UsersClient) Get(ctx context.Context, id string) (*models.User, int, error)

Get retrieves a User.

func (*UsersClient) List

func (c *UsersClient) List(ctx context.Context, filter string) (*[]models.User, int, error)

List returns a list of Users, optionally filtered using OData.

func (*UsersClient) ListGroupMemberships added in v0.4.0

func (c *UsersClient) ListGroupMemberships(ctx context.Context, id string, filter string) (*[]models.Group, int, error)

ListGroupMemberships returns a list of Groups the user is member of, optionally filtered using OData.

func (*UsersClient) Update

func (c *UsersClient) Update(ctx context.Context, user models.User) (int, error)

Update amends an existing User.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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