project

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2024 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package project implements functionality related to Phobos projects.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateProjectInput

type CreateProjectInput struct {
	Name        string
	Description string
	OrgID       string
}

CreateProjectInput is the input for creating a project

type DeleteProjectInput

type DeleteProjectInput struct {
	Version *int
	ID      string
}

DeleteProjectInput is the input for deleting a project

type GetProjectsInput

type GetProjectsInput struct {
	// Sort specifies the field to sort on and direction
	Sort *db.ProjectSortableField
	// PaginationOptions supports cursor based pagination
	PaginationOptions *pagination.Options
	// Organization filters the projects by the specified organization
	Organization *models.Organization
	// Search is used to search for a project by name
	Search *string
}

GetProjectsInput is the input for querying a list of projects

type Service

type Service interface {
	GetProjectByID(ctx context.Context, id string) (*models.Project, error)
	GetProjectsByIDs(ctx context.Context, idList []string) ([]models.Project, error)
	GetProjectByPRN(ctx context.Context, prn string) (*models.Project, error)
	GetProjects(ctx context.Context, input *GetProjectsInput) (*db.ProjectsResult, error)
	CreateProject(ctx context.Context, input *CreateProjectInput) (*models.Project, error)
	UpdateProject(ctx context.Context, input *UpdateProjectInput) (*models.Project, error)
	DeleteProject(ctx context.Context, input *DeleteProjectInput) error
}

Service implements all project related functionality

func NewService

func NewService(
	logger logger.Logger,
	dbClient *db.Client,
	activeService activityevent.Service,
) Service

NewService returns an instance of Service

type UpdateProjectInput

type UpdateProjectInput struct {
	Version     *int
	Description *string
	ID          string
}

UpdateProjectInput is the input for updating a project For now, a project cannot move between orgs or into or out of an org.

Jump to

Keyboard shortcuts

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