Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB interface { // GetProjects returns a list of projects. GetProjects() []model.Project // GetProject returns a project by its ID. GetProject(uint) *model.Project // GetVersionsForProjects returns the available version for a given project. GetVersionsForProjects(uint) []model.ProjectVersion // GetConnector returns the connector for a project. // TODO: result should be an enum GetConnector(string) string }
DB is the interface to implement to access the projects and other entites.
type GormDB ¶
type GormDB struct {
// contains filtered or unexported fields
}
GormDB is one database implementation
func (*GormDB) GetConnector ¶
GetConnector returns the connector for a project.
func (*GormDB) GetProjects ¶
func (*GormDB) GetVersionsForProjects ¶
func (g *GormDB) GetVersionsForProjects(id uint) []model.ProjectVersion
type MockDB ¶
type MockDB struct{}
MockDB used for testing purposes.
func (*MockDB) GetConnector ¶
GetConnector returns the connector for a project.
func (*MockDB) GetProjects ¶
func (*MockDB) GetVersionsForProjects ¶
func (m *MockDB) GetVersionsForProjects(id uint) []model.ProjectVersion
GetVersionsForProjects returns the available version for a given project.
Click to show internal directories.
Click to hide internal directories.