projects_cla_groups

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

Overview

Package projects_cla_groups is a generated GoMock package.

Index

Constants

View Source
const (
	CLAGroupIDIndex     = "cla-group-id-index"
	FoundationSFIDIndex = "foundation-sfid-index"
	NotDefined          = "Not Defined"
	NotFound            = "Not Found"
)

constants

Variables

View Source
var (
	ErrProjectNotAssociatedWithClaGroup = errors.New("provided project is not associated with cla_group")
	ErrAssociationAlreadyExist          = errors.New("cla_group project association already exist")
	ErrCLAGroupDoesNotExist             = errors.New("cla group does not exist")
)

errors

Functions

This section is empty.

Types

type MockRepository

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

MockRepository is a mock of Repository interface

func NewMockRepository

func NewMockRepository(ctrl *gomock.Controller) *MockRepository

NewMockRepository creates a new mock instance

func (*MockRepository) AssociateClaGroupWithProject

func (m *MockRepository) AssociateClaGroupWithProject(claGroupID, projectSFID, foundationSFID string) error

AssociateClaGroupWithProject mocks base method

func (*MockRepository) EXPECT

EXPECT returns an object that allows the caller to indicate expected use

func (*MockRepository) GetCLAGroup

func (m *MockRepository) GetCLAGroup(claGroupID string) (*ProjectClaGroup, error)

GetCLAGroup mocks base method

func (*MockRepository) GetCLAGroupNameByID

func (m *MockRepository) GetCLAGroupNameByID(claGroupID string) (string, error)

GetCLAGroupNameByID mocks base method

func (*MockRepository) GetClaGroupIDForProject

func (m *MockRepository) GetClaGroupIDForProject(projectSFID string) (*ProjectClaGroup, error)

GetClaGroupIDForProject mocks base method

func (*MockRepository) GetProjectsIdsForAllFoundation

func (m *MockRepository) GetProjectsIdsForAllFoundation() ([]*ProjectClaGroup, error)

GetProjectsIdsForAllFoundation mocks base method

func (*MockRepository) GetProjectsIdsForClaGroup

func (m *MockRepository) GetProjectsIdsForClaGroup(claGroupID string) ([]*ProjectClaGroup, error)

GetProjectsIdsForClaGroup mocks base method

func (*MockRepository) GetProjectsIdsForFoundation

func (m *MockRepository) GetProjectsIdsForFoundation(foundationSFID string) ([]*ProjectClaGroup, error)

GetProjectsIdsForFoundation mocks base method

func (*MockRepository) IsAssociated

func (m *MockRepository) IsAssociated(projectSFID, claGroupID string) (bool, error)

IsAssociated mocks base method

func (*MockRepository) IsExistingFoundationLevelCLAGroup

func (m *MockRepository) IsExistingFoundationLevelCLAGroup(foundationSFID string) (bool, error)

IsExistingFoundationLevelCLAGroup mocks base method

func (*MockRepository) RemoveProjectAssociatedWithClaGroup

func (m *MockRepository) RemoveProjectAssociatedWithClaGroup(claGroupID string, projectSFIDList []string, all bool) error

RemoveProjectAssociatedWithClaGroup mocks base method

func (*MockRepository) UpdateRepositoriesCount

func (m *MockRepository) UpdateRepositoriesCount(projectSFID string, diff int64) error

UpdateRepositoriesCount mocks base method

type MockRepositoryMockRecorder

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

MockRepositoryMockRecorder is the mock recorder for MockRepository

func (*MockRepositoryMockRecorder) AssociateClaGroupWithProject

func (mr *MockRepositoryMockRecorder) AssociateClaGroupWithProject(claGroupID, projectSFID, foundationSFID interface{}) *gomock.Call

AssociateClaGroupWithProject indicates an expected call of AssociateClaGroupWithProject

func (*MockRepositoryMockRecorder) GetCLAGroup

func (mr *MockRepositoryMockRecorder) GetCLAGroup(claGroupID interface{}) *gomock.Call

GetCLAGroup indicates an expected call of GetCLAGroup

func (*MockRepositoryMockRecorder) GetCLAGroupNameByID

func (mr *MockRepositoryMockRecorder) GetCLAGroupNameByID(claGroupID interface{}) *gomock.Call

GetCLAGroupNameByID indicates an expected call of GetCLAGroupNameByID

func (*MockRepositoryMockRecorder) GetClaGroupIDForProject

func (mr *MockRepositoryMockRecorder) GetClaGroupIDForProject(projectSFID interface{}) *gomock.Call

GetClaGroupIDForProject indicates an expected call of GetClaGroupIDForProject

func (*MockRepositoryMockRecorder) GetProjectsIdsForAllFoundation

func (mr *MockRepositoryMockRecorder) GetProjectsIdsForAllFoundation() *gomock.Call

GetProjectsIdsForAllFoundation indicates an expected call of GetProjectsIdsForAllFoundation

func (*MockRepositoryMockRecorder) GetProjectsIdsForClaGroup

func (mr *MockRepositoryMockRecorder) GetProjectsIdsForClaGroup(claGroupID interface{}) *gomock.Call

GetProjectsIdsForClaGroup indicates an expected call of GetProjectsIdsForClaGroup

func (*MockRepositoryMockRecorder) GetProjectsIdsForFoundation

func (mr *MockRepositoryMockRecorder) GetProjectsIdsForFoundation(foundationSFID interface{}) *gomock.Call

GetProjectsIdsForFoundation indicates an expected call of GetProjectsIdsForFoundation

func (*MockRepositoryMockRecorder) IsAssociated

func (mr *MockRepositoryMockRecorder) IsAssociated(projectSFID, claGroupID interface{}) *gomock.Call

IsAssociated indicates an expected call of IsAssociated

func (*MockRepositoryMockRecorder) IsExistingFoundationLevelCLAGroup

func (mr *MockRepositoryMockRecorder) IsExistingFoundationLevelCLAGroup(foundationSFID interface{}) *gomock.Call

IsExistingFoundationLevelCLAGroup indicates an expected call of IsExistingFoundationLevelCLAGroup

func (*MockRepositoryMockRecorder) RemoveProjectAssociatedWithClaGroup

func (mr *MockRepositoryMockRecorder) RemoveProjectAssociatedWithClaGroup(claGroupID, projectSFIDList, all interface{}) *gomock.Call

RemoveProjectAssociatedWithClaGroup indicates an expected call of RemoveProjectAssociatedWithClaGroup

func (*MockRepositoryMockRecorder) UpdateRepositoriesCount

func (mr *MockRepositoryMockRecorder) UpdateRepositoriesCount(projectSFID, diff interface{}) *gomock.Call

UpdateRepositoriesCount indicates an expected call of UpdateRepositoriesCount

type ProjectCLAGroupsService

type ProjectCLAGroupsService interface {
	GetClaGroupIDForProject(ctx context.Context, projectSFID string) (*ProjectClaGroup, error)
	GetProjectsIdsForClaGroup(ctx context.Context, claGroupID string) ([]*ProjectClaGroup, error)
	GetProjectsIdsForFoundation(ctx context.Context, foundationSFID string) ([]*ProjectClaGroup, error)
	GetProjectsIdsForAllFoundation() ([]*ProjectClaGroup, error)
	AssociateClaGroupWithProject(ctx context.Context, claGroupID string, projectSFID string, foundationSFID string) error
	RemoveProjectAssociatedWithClaGroup(ctx context.Context, claGroupID string, projectSFIDList []string, all bool) error
	GetCLAGroupNameByID(ctx context.Context, claGroupID string) (string, error)
	GetCLAGroup(ctx context.Context, claGroupID string) (*ProjectClaGroup, error)

	IsExistingFoundationLevelCLAGroup(ctx context.Context, foundationSFID string) (bool, error)
	IsAssociated(ctx context.Context, projectSFID string, claGroupID string) (bool, error)
	UpdateRepositoriesCount(ctx context.Context, projectSFID string, diff int64, reset bool) error
	UpdateClaGroupName(ctx context.Context, projectSFID string, claGroupName string) error
}

ProjectCLAGroupsService interface

type ProjectClaGroup

type ProjectClaGroup struct {
	ProjectExternalID string `dynamodbav:"project_external_id" json:"project_external_id"`
	ProjectSFID       string `dynamodbav:"project_sfid" json:"project_sfid"`
	ProjectName       string `dynamodbav:"project_name" son:"project_name"`
	ClaGroupID        string `dynamodbav:"cla_group_id" json:"cla_group_id"`
	ClaGroupName      string `dynamodbav:"cla_group_name" json:"cla_group_name"`
	FoundationSFID    string `dynamodbav:"foundation_sfid" json:"foundation_sfid"`
	FoundationName    string `dynamodbav:"foundation_name" json:"foundation_name"`
	RepositoriesCount int64  `dynamodbav:"repositories_count" json:"repositories_count"`
	Note              string `dynamodbav:"version" json:"note"`
	Version           string `dynamodbav:"version" json:"version"`
	DateCreated       string `dynamodbav:"version" json:"date_created"`
	DateModified      string `dynamodbav:"version" json:"date_modified"`
}

ProjectClaGroup is database model for projects_cla_group table

type Repository

type Repository interface {
	GetClaGroupIDForProject(ctx context.Context, projectSFID string) (*ProjectClaGroup, error)
	GetProjectsIdsForClaGroup(ctx context.Context, claGroupID string) ([]*ProjectClaGroup, error)
	GetProjectsIdsForFoundation(ctx context.Context, foundationSFID string) ([]*ProjectClaGroup, error)
	GetProjectsIdsForAllFoundation(ctx context.Context) ([]*ProjectClaGroup, error)
	AssociateClaGroupWithProject(ctx context.Context, claGroupID string, projectSFID string, foundationSFID string) error
	RemoveProjectAssociatedWithClaGroup(ctx context.Context, claGroupID string, projectSFIDList []string, all bool) error
	GetCLAGroupNameByID(ctx context.Context, claGroupID string) (string, error)
	GetCLAGroup(ctx context.Context, claGroupID string) (*ProjectClaGroup, error)

	IsExistingFoundationLevelCLAGroup(ctx context.Context, foundationSFID string) (bool, error)
	IsAssociated(ctx context.Context, projectSFID string, claGroupID string) (bool, error)
	UpdateRepositoriesCount(ctx context.Context, projectSFID string, diff int64, reset bool) error
	UpdateClaGroupName(ctx context.Context, projectSFID string, claGroupName string) error
}

Repository provides interface for interacting with project_cla_groups table

func NewRepository

func NewRepository(awsSession *session.Session, stage string) Repository

NewRepository provides implementation of projects_cla_group repository

type Service

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

Service model

func NewService

func NewService(repo Repository) Service

NewService creates a new whitelist service

func (Service) AssociateClaGroupWithProject

func (s Service) AssociateClaGroupWithProject(ctx context.Context, claGroupID string, projectSFID string, foundationSFID string) error

AssociateClaGroupWithProject service method

func (Service) GetCLAGroup

func (s Service) GetCLAGroup(ctx context.Context, claGroupID string) (*ProjectClaGroup, error)

GetCLAGroup service method

func (Service) GetCLAGroupNameByID

func (s Service) GetCLAGroupNameByID(ctx context.Context, claGroupID string) (string, error)

GetCLAGroupNameByID service method

func (Service) GetClaGroupIDForProject

func (s Service) GetClaGroupIDForProject(ctx context.Context, projectSFID string) (*ProjectClaGroup, error)

GetClaGroupIDForProject service method

func (Service) GetProjectsIdsForAllFoundation

func (s Service) GetProjectsIdsForAllFoundation(ctx context.Context) ([]*ProjectClaGroup, error)

GetProjectsIdsForAllFoundation service method

func (Service) GetProjectsIdsForClaGroup

func (s Service) GetProjectsIdsForClaGroup(ctx context.Context, claGroupID string) ([]*ProjectClaGroup, error)

GetProjectsIdsForClaGroup service method

func (Service) GetProjectsIdsForFoundation

func (s Service) GetProjectsIdsForFoundation(ctx context.Context, foundationSFID string) ([]*ProjectClaGroup, error)

GetProjectsIdsForFoundation service method

func (Service) IsAssociated

func (s Service) IsAssociated(ctx context.Context, projectSFID string, claGroupID string) (bool, error)

IsAssociated service method

func (Service) IsExistingFoundationLevelCLAGroup

func (s Service) IsExistingFoundationLevelCLAGroup(ctx context.Context, foundationSFID string) (bool, error)

IsExistingFoundationLevelCLAGroup service method

func (Service) RemoveProjectAssociatedWithClaGroup

func (s Service) RemoveProjectAssociatedWithClaGroup(ctx context.Context, claGroupID string, projectSFIDList []string, all bool) error

RemoveProjectAssociatedWithClaGroup service method

func (Service) UpdateClaGroupName

func (s Service) UpdateClaGroupName(ctx context.Context, projectSFID string, claGroupName string) error

UpdateClaGroupName service method

func (Service) UpdateRepositoriesCount

func (s Service) UpdateRepositoriesCount(ctx context.Context, projectSFID string, diff int64, reset bool) error

UpdateRepositoriesCount service method

Jump to

Keyboard shortcuts

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