member

package
v0.0.0-...-12382fa Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Mgr default project member manager
	Mgr = NewManager()
)

Functions

This section is empty.

Types

type Manager

type Manager interface {
	// AddProjectMember add project member
	AddProjectMember(ctx context.Context, member models.Member) (int, error)
	// Delete delete project member
	Delete(ctx context.Context, projectID int64, memberID int) error
	// Get get project member by ID
	Get(ctx context.Context, projectID int64, memberID int) (*models.Member, error)
	// List list the project member by conditions
	List(ctx context.Context, queryMember models.Member, query *q.Query) ([]*models.Member, error)
	// UpdateRole update project member's role
	UpdateRole(ctx context.Context, projectID int64, pmID int, role int) error
	// SearchMemberByName search project member by name
	SearchMemberByName(ctx context.Context, projectID int64, entityName string) ([]*models.Member, error)
	// DeleteMemberByUserID delete project member by user id
	DeleteMemberByUserID(ctx context.Context, uid int) error
	// DeleteMemberByProjectID delete project member by project id
	DeleteMemberByProjectID(ctx context.Context, projectID int64) error
	// GetTotalOfProjectMembers get the total amount of project members
	GetTotalOfProjectMembers(ctx context.Context, projectID int64, query *q.Query, roles ...int) (int, error)
	// ListRoles list project roles
	ListRoles(ctx context.Context, user *models.User, projectID int64) ([]int, error)
}

Manager is used to manage the project member

func NewManager

func NewManager() Manager

NewManager ...

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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