cla_manager

package
v0.0.0-...-c99d6ee Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Configure

func Configure(api *operations.ClaAPI, service IService, companyService company.IService, projectService service2.Service, usersService users.Service, sigService signatures.SignatureService, eventsService events.Service, emailSvc emails.EmailTemplateService)

Configure is the API handler routine for the CLA manager routes

func ToAuthUser

func ToAuthUser(claUser *user.CLAUser) *auth.User

ToAuthUser converts a legacy v1 CLA user to a v2 platform auth user

Types

type CLAManagerRequest

type CLAManagerRequest struct {
	RequestID         string `json:"request_id"`
	CompanyID         string `json:"company_id"`
	CompanyExternalID string `json:"company_external_id"`
	CompanyName       string `json:"company_name"`
	ProjectID         string `json:"project_id"`
	ProjectExternalID string `json:"project_external_id"`
	ProjectName       string `json:"project_name"`
	UserID            string `json:"user_id"`
	UserExternalID    string `json:"user_external_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"`
}

CLAManagerRequest data model

type CLAManagerRequests

type CLAManagerRequests struct {
	Requests []CLAManagerRequest
}

CLAManagerRequests data model

type IRepository

type IRepository interface {
	CreateRequest(reqModel *CLAManagerRequest) (*CLAManagerRequest, error)
	GetRequests(companyID, projectID string) (*CLAManagerRequests, error)
	GetRequestsByUserID(companyID, projectID, userID string) (*CLAManagerRequests, error)
	GetRequest(requestID string) (*CLAManagerRequest, error)
	GetRequestsByCLAGroup(claGroupID string) ([]CLAManagerRequest, error)
	UpdateRequestsByCLAGroup(model *models.DBProjectModel) error

	ApproveRequest(companyID, projectID, requestID string) (*CLAManagerRequest, error)
	DenyRequest(companyID, projectID, requestID string) (*CLAManagerRequest, error)
	PendingRequest(companyID, projectID, requestID string) (*CLAManagerRequest, error)
	DeleteRequest(requestID string) error
	// contains filtered or unexported methods
}

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 {
	CreateRequest(reqModel *CLAManagerRequest) (*models.ClaManagerRequest, error)
	GetRequests(companyID, claGroupID string) (*models.ClaManagerRequestList, error)
	GetRequestsByUserID(companyID, claGroupID, userID string) (*models.ClaManagerRequestList, error)
	GetRequest(requestID string) (*models.ClaManagerRequest, error)

	ApproveRequest(companyID, claGroupID, requestID string) (*models.ClaManagerRequest, error)
	DenyRequest(companyID, claGroupID, requestID string) (*models.ClaManagerRequest, error)
	PendingRequest(companyID, claGroupID, requestID string) (*models.ClaManagerRequest, error)
	DeleteRequest(requestID string) error

	AddClaManager(ctx context.Context, authUser *auth.User, companyID string, claGroupID string, LFID string, projectSFID string) (*models.Signature, error)
	RemoveClaManager(ctx context.Context, authUser *auth.User, companyID string, claGroupID string, LFID string, projectSFName string) (*models.Signature, error)
}

IService interface defining the functions for the company service

func NewService

func NewService(repo IRepository, projectClaRepository projects_cla_groups.Repository, companyService company.IService, projectService service2.Service, usersService users.Service, sigService signatures.SignatureService, eventsService events.Service, emailTemplateService emails.EmailTemplateService, corporateConsoleURL string) IService

NewService creates a new service object

type ProjectDetails

type ProjectDetails struct {
	ProjectName string
	ProjectSFID []string
}

Jump to

Keyboard shortcuts

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