Documentation ¶
Index ¶
Constants ¶
View Source
const (
SignatureReferenceIndex = "reference-signature-index"
)
View Source
const (
// StatusPending indicates the invitation status is pending
StatusPending = "pending"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DBModel ¶
type DBModel struct { CompanyID string `dynamodbav:"company_id" json:"company_id"` CompanyName string `dynamodbav:"company_name" json:"company_name"` SigningEntityName string `dynamodbav:"signing_entity_name" json:"signing_entity_name"` CompanyACL []string `dynamodbav:"company_acl" json:"company_acl"` CompanyExternalID string `dynamodbav:"company_external_id" json:"company_external_id"` CompanyManagerID string `dynamodbav:"company_manager_id" json:"company_manager_id"` Created string `dynamodbav:"date_created" json:"date_created"` Updated string `dynamodbav:"date_modified" json:"date_modified"` Note string `dynamodbav:"note" json:"note"` Version string `dynamodbav:"version" json:"version"` }
DBModel data model
type IRepository ¶
type IRepository interface { CreateCompany(ctx context.Context, in *models.Company) (*models.Company, error) GetCompanies(ctx context.Context) (*models.Companies, error) GetCompany(ctx context.Context, companyID string) (*models.Company, error) GetCompanyByExternalID(ctx context.Context, companySFID string) (*models.Company, error) GetCompaniesByExternalID(ctx context.Context, companySFID string, includeChildCompanies bool) ([]*models.Company, error) GetCompanyBySigningEntityName(ctx context.Context, signingEntityName string) (*models.Company, error) GetCompanyByName(ctx context.Context, companyName string) (*models.Company, error) SearchCompanyByName(ctx context.Context, companyName string, nextKey string) (*models.Companies, error) DeleteCompanyByID(ctx context.Context, companyID string) error DeleteCompanyBySFID(ctx context.Context, companySFID string) error GetCompaniesByUserManager(ctx context.Context, userID string, userModel user.User) (*models.Companies, error) GetCompaniesByUserManagerWithInvites(ctx context.Context, userID string, userModel user.User) (*models.CompaniesWithInvites, error) AddPendingCompanyInviteRequest(ctx context.Context, companyID string, userModel user.User) (*Invite, error) GetCompanyInviteRequest(ctx context.Context, companyInviteID string) (*Invite, error) GetCompanyInviteRequests(ctx context.Context, companyID string, status *string) ([]Invite, error) GetCompanyUserInviteRequests(ctx context.Context, companyID string, userID string) (*Invite, error) GetUserInviteRequests(ctx context.Context, userID string) ([]Invite, error) ApproveCompanyAccessRequest(ctx context.Context, companyInviteID string) error RejectCompanyAccessRequest(ctx context.Context, companyInviteID string) error UpdateCompanyAccessList(ctx context.Context, companyID string, companyACL []string) error IsCCLAEnabledForCompany(ctx context.Context, companyID string) (bool, error) }
IRepository interface methods
func NewRepository ¶
func NewRepository(awsSession *session.Session, stage string) IRepository
NewRepository creates a new company repository instance
type IService ¶
type IService interface { CreateOrgFromExternalID(ctx context.Context, signingEntityName, companySFID string) (*models.Company, error) GetCompanies(ctx context.Context) (*models.Companies, error) GetCompany(ctx context.Context, companyID string) (*models.Company, error) GetCompanyByExternalID(ctx context.Context, companySFID string) (*models.Company, error) GetCompaniesByExternalID(ctx context.Context, companySFID string, includeChildCompanies bool) ([]*models.Company, error) GetCompanyBySigningEntityName(ctx context.Context, signingEntityName, companySFID string) (*models.Company, error) SearchCompanyByName(ctx context.Context, companyName string, nextKey string) (*models.Companies, error) GetCompaniesByUserManager(ctx context.Context, userID string) (*models.Companies, error) GetCompaniesByUserManagerWithInvites(ctx context.Context, userID string) (*models.CompaniesWithInvites, error) AddUserToCompanyAccessList(ctx context.Context, companyID, lfid string) error GetCompanyInviteRequests(ctx context.Context, companyID string, status *string) ([]models.CompanyInviteUser, error) GetCompanyUserInviteRequests(ctx context.Context, companyID string, userID string) (*models.CompanyInviteUser, error) AddPendingCompanyInviteRequest(ctx context.Context, companyID string, userID string) (*InviteModel, error) ApproveCompanyAccessRequest(ctx context.Context, companyInviteID string) (*InviteModel, error) RejectCompanyAccessRequest(ctx context.Context, companyInviteID string) (*InviteModel, error) IsCCLAEnabledForCompany(ctx context.Context, companySFID string) (bool, error) // calls org service SearchOrganizationByName(ctx context.Context, orgName string, websiteName string, includeSigningEntityName bool, filter string) (*models.OrgList, error) }
IService interface defining the functions for the company service
func NewService ¶
func NewService(repo IRepository, corporateConsoleURL string, userDynamoRepo user.RepositoryService, userService users.Service) IService
NewService creates a new company service object
type Invite ¶
type Invite struct { CompanyInviteID string `dynamodbav:"company_invite_id" json:"company_invite_id"` RequestedCompanyID string `dynamodbav:"requested_company_id" json:"requested_company_id"` UserID string `dynamodbav:"user_id" json:"user_id"` Status string `dynamodbav:"status" json:"status"` Created string `dynamodbav:"date_created" json:"date_created"` Updated string `dynamodbav:"date_modified" json:"date_modified"` Note string `dynamodbav:"note" json:"note"` Version string `dynamodbav:"version" json:"version"` }
Invite data model
type InviteModel ¶
type InviteModel struct { CompanyInviteID string `json:"company_invite_id"` RequestedCompanyID string `json:"requested_company_id"` CompanyName string `json:"company_name"` UserID string `json:"user_id"` UserName string `json:"user_name"` UserEmail string `json:"user_email"` Status string `json:"status"` Created string `json:"date_created"` Updated string `json:"date_modified"` Note string `json:"note"` Version string `json:"version"` }
InviteModel data model
Click to show internal directories.
Click to hide internal directories.