Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository interface { GetProjectByProjectID(projectID string) (*entities.Project, error) GetProjects(query bson.D) ([]*entities.Project, error) GetProjectsByUserID(request *entities.ListProjectRequest) (*entities.ListProjectResponse, error) GetProjectStats() ([]*entities.ProjectStats, error) CreateProject(project *entities.Project) error AddMember(projectID string, member *entities.Member) error RemoveInvitation(projectID string, userID string, invitation entities.Invitation) error UpdateInvite(projectID string, userID string, invitation entities.Invitation, role *entities.MemberRole) error UpdateProjectName(projectID string, projectName string) error UpdateMemberRole(projectID string, userID string, role *entities.MemberRole) error GetAggregateProjects(pipeline mongo.Pipeline, opts *options.AggregateOptions) (*mongo.Cursor, error) UpdateProjectState(ctx context.Context, userID string, deactivateTime int64, isDeactivate bool) error GetOwnerProjects(ctx context.Context, userID string) ([]*entities.Project, error) GetProjectRole(projectID string, userID string) (*entities.MemberRole, error) GetProjectMembers(projectID string, state string) ([]*entities.Member, error) GetProjectOwners(projectID string) ([]*entities.Member, error) DeleteProject(projectID string) error ListInvitations(userID string, invitationState entities.Invitation) ([]*entities.Project, error) }
Repository holds the mongo database implementation of the Service
func NewRepo ¶
func NewRepo(collection *mongo.Collection) Repository
NewRepo creates a new instance of this repository
Click to show internal directories.
Click to hide internal directories.