Documentation
¶
Index ¶
- Constants
- type ProjectHandler
- func (p *ProjectHandler) CreateProject(c *gin.Context)
- func (s *ProjectHandler) DeleteProjectById(c *gin.Context)
- func (p *ProjectHandler) GetProjectById(c *gin.Context)
- func (p *ProjectHandler) GetProjects(c *gin.Context)
- func (p *ProjectHandler) RegisterRoutes(r *gin.Engine)
- func (p *ProjectHandler) UpdateProjectById(c *gin.Context)
- type ProjectStore
- func (p *ProjectStore) AddProject(project types.Project) (string, error)
- func (p *ProjectStore) DeleteById(idParam string, duration int) (int64, error)
- func (p *ProjectStore) DeleteByIds(idParams []string, duration int) (int64, error)
- func (p *ProjectStore) GetByName(name string, duration int) ([]types.Project, error)
- func (p *ProjectStore) GetProjectById(idParam string, duration int) ([]types.Project, error)
- func (p *ProjectStore) GetTotalCount(filter interface{}) (int64, error)
- func (p *ProjectStore) GetUsingFilter(filter interface{}, page, limit, duration int) ([]types.Project, error)
- func (p *ProjectStore) UpdateById(payload types.Project, duration int) error
- func (c *ProjectStore) ValidateIds(ids []string) error
Constants ¶
View Source
const PROJECT_COLLECTION = "project"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProjectHandler ¶
type ProjectHandler struct {
// contains filtered or unexported fields
}
func NewProjectHandler ¶
func NewProjectHandler(store types.ProjectStore, sbomStore types.SbomStore, componentStore types.ComponentStore) *ProjectHandler
func (*ProjectHandler) CreateProject ¶
func (p *ProjectHandler) CreateProject(c *gin.Context)
func (*ProjectHandler) DeleteProjectById ¶
func (s *ProjectHandler) DeleteProjectById(c *gin.Context)
func (*ProjectHandler) GetProjectById ¶
func (p *ProjectHandler) GetProjectById(c *gin.Context)
func (*ProjectHandler) GetProjects ¶
func (p *ProjectHandler) GetProjects(c *gin.Context)
func (*ProjectHandler) RegisterRoutes ¶
func (p *ProjectHandler) RegisterRoutes(r *gin.Engine)
func (*ProjectHandler) UpdateProjectById ¶
func (p *ProjectHandler) UpdateProjectById(c *gin.Context)
type ProjectStore ¶
type ProjectStore struct {
// contains filtered or unexported fields
}
func NewProjectStore ¶
func NewProjectStore(db *mongo.Database) *ProjectStore
func (*ProjectStore) AddProject ¶
func (p *ProjectStore) AddProject(project types.Project) (string, error)
func (*ProjectStore) DeleteById ¶
func (p *ProjectStore) DeleteById(idParam string, duration int) (int64, error)
func (*ProjectStore) DeleteByIds ¶
func (p *ProjectStore) DeleteByIds(idParams []string, duration int) (int64, error)
func (*ProjectStore) GetProjectById ¶
Handler for getting paginated items
func (*ProjectStore) GetTotalCount ¶
func (p *ProjectStore) GetTotalCount(filter interface{}) (int64, error)
func (*ProjectStore) GetUsingFilter ¶
func (p *ProjectStore) GetUsingFilter(filter interface{}, page, limit, duration int) ([]types.Project, error)
func (*ProjectStore) UpdateById ¶
func (p *ProjectStore) UpdateById(payload types.Project, duration int) error
validates object id and updates object as per payload
func (*ProjectStore) ValidateIds ¶
func (c *ProjectStore) ValidateIds(ids []string) error
Click to show internal directories.
Click to hide internal directories.