repository

package
v1.0.8-dta Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LibraryDB

type LibraryDB struct {
	// contains filtered or unexported fields
}

LibraryDB defines the CRUD operations for storing projects in the db

func NewLibraryDB

func NewLibraryDB(log *utils.StandardLogger, db *gorm.DB) *LibraryDB

NewLibraryDB returns a LibraryDB object for handling CRUD operations

func (*LibraryDB) AddLibrary

func (l *LibraryDB) AddLibrary(library *domain.Library)

AddLibrary adds a library to the db

func (*LibraryDB) GetLibraryByIDAndCommit

func (l *LibraryDB) GetLibraryByIDAndCommit(id, commit string) []*domain.Library

GetLibraryByIDAndCommit returns all libraries for the given id and commit

type ProjectDB

type ProjectDB struct {
	// contains filtered or unexported fields
}

ProjectDB defines the CRUD operations for storing projects in the db

func NewProjectDB

func NewProjectDB(log *utils.StandardLogger, db *gorm.DB) *ProjectDB

NewProjectDB returns a ProjectDB object for handling CRUD operations

func (*ProjectDB) AddProject

func (p *ProjectDB) AddProject(project *domain.Project)

AddProject adds a project to the db

func (*ProjectDB) GetProjectByID

func (p *ProjectDB) GetProjectByID(id string) *domain.Project

GetProjectByID returns the project with the given id

func (*ProjectDB) GetProjectByIDAndCommit

func (p *ProjectDB) GetProjectByIDAndCommit(id, commit string) *domain.Project

GetProjectByIDAndCommit returns the project with the given id and commit

func (*ProjectDB) GetProjects

func (p *ProjectDB) GetProjects() ([]*domain.Project, error)

GetProjects returns all existing projects in the db

func (*ProjectDB) UpdateProject

func (p *ProjectDB) UpdateProject(project *domain.Project, status domain.Status)

UpdateProject updates the analysis status of the project

func (*ProjectDB) UpdateProjectBuildToolAndStatus

func (p *ProjectDB) UpdateProjectBuildToolAndStatus(project *domain.Project, status domain.Status, buildTool string)

UpdateProjectBuildToolAndStatus updates the build tool and status of project

func (*ProjectDB) UpdateProjectName

func (p *ProjectDB) UpdateProjectName(project *domain.Project, name string)

UpdateProjectName updates the name of a project

Jump to

Keyboard shortcuts

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