project

package
v0.0.0-...-e417875 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager interface {
	// Create creates project instance
	Create(ctx context.Context, project *models.Project) (int64, error)

	// Count returns the total count of projects according to the query
	Count(ctx context.Context, query *q.Query) (total int64, err error)

	// Delete deletes the project instance by id
	Delete(ctx context.Context, id int64) error

	// Get the project specified by the ID or name
	Get(ctx context.Context, idOrName interface{}) (*models.Project, error)

	// List projects according to the query
	List(ctx context.Context, query *q.Query) ([]*models.Project, error)

	// ListRoles returns the roles of user for the specific project
	ListRoles(ctx context.Context, projectID int64, userID int, groupIDs ...int) ([]int, error)

	// ListAdminRolesOfUser returns the roles of user for the all projects
	ListAdminRolesOfUser(ctx context.Context, user commonmodels.User) ([]models.Member, error)
}

Manager is used for project management

func New

func New() Manager

New returns a default implementation of Manager

Directories

Path Synopsis
dao

Jump to

Keyboard shortcuts

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