organization_service

package
v0.0.0-...-5643740 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitClient

func InitClient(APIGwURL string, eventService events.Service)

InitClient initializes the user_service client

Types

type Client

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

Client is client for organization_service

func GetClient

func GetClient() *Client

GetClient return user_service client

func (*Client) CreateOrg

func (osc *Client) CreateOrg(ctx context.Context, companyName, signingEntityName, companyWebsite string) (*models.Organization, error)

CreateOrg creates company based on name and website with additional data for required fields

func (*Client) CreateOrgUserRoleOrgScope

func (osc *Client) CreateOrgUserRoleOrgScope(ctx context.Context, emailID string, organizationID string, roleID string) error

CreateOrgUserRoleOrgScope attached role scope for particular org and user

func (*Client) CreateOrgUserRoleOrgScopeProjectOrg

func (osc *Client) CreateOrgUserRoleOrgScopeProjectOrg(ctx context.Context, emailID string, projectID string, organizationID string, roleID string) error

CreateOrgUserRoleOrgScopeProjectOrg assigns role scope to user

func (*Client) DeleteOrgUserRoleOrgScopeProjectOrg

func (osc *Client) DeleteOrgUserRoleOrgScopeProjectOrg(ctx context.Context, organizationID string, roleID string, scopeID string, userName *string, userEmail *string) error

DeleteOrgUserRoleOrgScopeProjectOrg removes role scope for user

func (*Client) DeleteRolePermissions

func (osc *Client) DeleteRolePermissions(ctx context.Context, organizationID, projectID, role string, authUser *auth.User) error

DeleteRolePermissions removes the specified Org/Project user permissions for with the given role

func (*Client) GetOrganization

func (osc *Client) GetOrganization(ctx context.Context, orgID string) (*models.Organization, error)

GetOrganization gets organization from organization id

func (*Client) GetScopeID

func (osc *Client) GetScopeID(ctx context.Context, organizationID string, projectID string, roleName string, objectTypeName string, userLFID string) (string, error)

GetScopeID will return scopeID for a give role

func (*Client) IsCompanyOwner

func (osc *Client) IsCompanyOwner(ctx context.Context, userSFID string, orgs []string) (bool, error)

IsCompanyOwner checks if User is company owner

func (*Client) IsUserHaveRoleScope

func (osc *Client) IsUserHaveRoleScope(ctx context.Context, roleName string, userSFID string, organizationID string, projectSFID string) (bool, error)

IsUserHaveRoleScope checks if user have required role and scope

func (*Client) ListOrg

func (osc *Client) ListOrg(ctx context.Context, orgName string) (*models.OrganizationList, error)

ListOrg returns organization

func (*Client) ListOrgUserAdminScopes

func (osc *Client) ListOrgUserAdminScopes(ctx context.Context, orgID string, role *string) (*models.UserrolescopesList, error)

ListOrgUserAdminScopes returns admin role scope of organization

func (*Client) ListOrgUserScopes

func (osc *Client) ListOrgUserScopes(ctx context.Context, orgID string, roleName []string) (*models.UserrolescopesList, error)

ListOrgUserScopes returns role scope of organization, rolename is optional filter

func (*Client) SearchOrgLookup

func (osc *Client) SearchOrgLookup(ctx context.Context, orgName, websiteName *string) (*organizations.LookupOK, error)

SearchOrgLookup returns organization

func (*Client) SearchOrganization

func (osc *Client) SearchOrganization(ctx context.Context, orgName string, websiteName string, filter string) ([]*models.Organization, error)

SearchOrganization search organization by name. It will return array of organization matching with the orgName.

func (*Client) UpdateOrg

func (osc *Client) UpdateOrg(ctx context.Context, existingCompanyModel *models.Organization, signingEntityName string) (*models.Organization, error)

UpdateOrg updates the company record based on the provided name, signingEntityName, and website

Jump to

Keyboard shortcuts

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