Documentation ¶
Index ¶
- Variables
- func FilterTimelineByDate(db *gorm.DB, start_date string, end_date string) *gorm.DB
- func OpenPostgresDB(cfg *config.Config) (*sql.DB, error)
- type DBConnector
- type DBConnectorImpl
- func (conn *DBConnectorImpl) BulkCreateCommitEntry(t []models.Timelines) error
- func (conn *DBConnectorImpl) CreateCommitEntry(t models.Timelines) error
- func (conn *DBConnectorImpl) CreateDeployEntry(deploy models.Timelines) error
- func (conn *DBConnectorImpl) CreateProjectTableEntry(p *models.Projects) error
- func (conn *DBConnectorImpl) CreateServiceTableEntry(s *models.Services) error
- func (conn *DBConnectorImpl) DeleteServiceTableEntry(name string) (models.Services, error)
- func (conn *DBConnectorImpl) DeleteTimelinesByService(service models.Services) error
- func (conn *DBConnectorImpl) Exec(sql string) error
- func (conn *DBConnectorImpl) GetCommitByRef(ref string) (models.Timelines, int64, error)
- func (conn *DBConnectorImpl) GetCommitsAll(offset int, limit int, q structs.Query) ([]models.Timelines, int64, error)
- func (conn *DBConnectorImpl) GetCommitsByProject(project models.Projects, offset int, limit int, q structs.Query) ([]models.Timelines, int64, error)
- func (conn *DBConnectorImpl) GetCommitsByService(service models.Services, offset int, limit int, q structs.Query) ([]models.Timelines, int64, error)
- func (conn *DBConnectorImpl) GetDeployByRef(ref string) (models.Timelines, int64, error)
- func (conn *DBConnectorImpl) GetDeploysAll(offset int, limit int, q structs.Query) ([]models.Timelines, int64, error)
- func (conn *DBConnectorImpl) GetDeploysByProject(project models.Projects, offset int, limit int, q structs.Query) ([]models.Timelines, int64, error)
- func (conn *DBConnectorImpl) GetDeploysByService(service models.Services, offset int, limit int, q structs.Query) ([]models.Timelines, int64, error)
- func (conn *DBConnectorImpl) GetLatest(service structs.ExpandedServicesData) (structs.ExpandedServicesData, error, error)
- func (conn *DBConnectorImpl) GetProjectByID(id int) (models.Projects, int64, error)
- func (conn *DBConnectorImpl) GetProjectByName(name string) (models.Projects, int64, error)
- func (conn *DBConnectorImpl) GetProjectByRepo(repo string) (models.Projects, error)
- func (conn *DBConnectorImpl) GetProjectsAll(offset int, limit int, q structs.Query) ([]models.Projects, int64, error)
- func (conn *DBConnectorImpl) GetProjectsByService(service models.Services, offset int, limit int, q structs.Query) ([]models.Projects, int64, error)
- func (conn *DBConnectorImpl) GetServiceByID(id int) (models.Services, int64, error)
- func (conn *DBConnectorImpl) GetServiceByName(name string) (models.Services, int64, error)
- func (conn *DBConnectorImpl) GetServiceByRepo(repo string) (models.Services, error)
- func (conn *DBConnectorImpl) GetServiceNames() ([]string, error)
- func (conn *DBConnectorImpl) GetServicesAll(offset int, limit int, q structs.Query) ([]structs.ExpandedServicesData, int64, error)
- func (conn *DBConnectorImpl) GetTimelineByRef(ref string) (models.Timelines, int64, error)
- func (conn *DBConnectorImpl) GetTimelinesAll(offset int, limit int, q structs.Query) ([]models.Timelines, int64, error)
- func (conn *DBConnectorImpl) GetTimelinesByProject(project models.Projects, offset int, limit int, q structs.Query) ([]models.Timelines, int64, error)
- func (conn *DBConnectorImpl) GetTimelinesByService(service models.Services, offset int, limit int, q structs.Query) ([]models.Timelines, int64, error)
- func (conn *DBConnectorImpl) UpdateProjectTableEntry(p *models.Projects) error
- func (conn *DBConnectorImpl) UpdateServiceTableEntry(name string, s config.Service) (service models.Services, err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("not found")
Functions ¶
func FilterTimelineByDate ¶
Types ¶
type DBConnector ¶
type DBConnector interface { CreateServiceTableEntry(s *models.Services) error UpdateServiceTableEntry(name string, s config.Service) (service models.Services, err error) DeleteServiceTableEntry(name string) (models.Services, error) GetServicesAll(offset int, limit int, q structs.Query) ([]structs.ExpandedServicesData, int64, error) GetLatest(service structs.ExpandedServicesData) (structs.ExpandedServicesData, error, error) GetServiceByID(id int) (models.Services, int64, error) GetServiceByName(name string) (models.Services, int64, error) GetServiceByRepo(repo string) (models.Services, error) CreateProjectTableEntry(p *models.Projects) error UpdateProjectTableEntry(p *models.Projects) error GetProjectsAll(offset int, limit int, q structs.Query) ([]models.Projects, int64, error) GetProjectsByService(service models.Services, offset int, limit int, q structs.Query) ([]models.Projects, int64, error) GetProjectByID(id int) (models.Projects, int64, error) GetProjectByName(name string) (models.Projects, int64, error) GetProjectByRepo(repo string) (models.Projects, error) GetTimelinesAll(offset int, limit int, q structs.Query) ([]models.Timelines, int64, error) GetTimelinesByService(service models.Services, offset int, limit int, q structs.Query) ([]models.Timelines, int64, error) GetTimelinesByProject(project models.Projects, offset int, limit int, q structs.Query) ([]models.Timelines, int64, error) GetTimelineByRef(ref string) (models.Timelines, int64, error) DeleteTimelinesByService(service models.Services) error CreateCommitEntry(timeline models.Timelines) error BulkCreateCommitEntry(timeline []models.Timelines) error GetCommitsAll(offset int, limit int, q structs.Query) ([]models.Timelines, int64, error) GetCommitsByService(service models.Services, offset int, limit int, q structs.Query) ([]models.Timelines, int64, error) GetCommitsByProject(project models.Projects, offset int, limit int, q structs.Query) ([]models.Timelines, int64, error) GetCommitByRef(ref string) (models.Timelines, int64, error) CreateDeployEntry(timeline models.Timelines) error GetDeploysAll(offset int, limit int, q structs.Query) ([]models.Timelines, int64, error) GetDeploysByService(service models.Services, offset int, limit int, q structs.Query) ([]models.Timelines, int64, error) GetDeploysByProject(project models.Projects, offset int, limit int, q structs.Query) ([]models.Timelines, int64, error) GetDeployByRef(ref string) (models.Timelines, int64, error) }
type DBConnectorImpl ¶
type DBConnectorImpl struct {
// contains filtered or unexported fields
}
func NewDBConnector ¶
func NewDBConnector(cfg *config.Config) *DBConnectorImpl
func SetDBConnector ¶
func SetDBConnector(db *gorm.DB) *DBConnectorImpl
func (*DBConnectorImpl) BulkCreateCommitEntry ¶
func (conn *DBConnectorImpl) BulkCreateCommitEntry(t []models.Timelines) error
func (*DBConnectorImpl) CreateCommitEntry ¶
func (conn *DBConnectorImpl) CreateCommitEntry(t models.Timelines) error
func (*DBConnectorImpl) CreateDeployEntry ¶
func (conn *DBConnectorImpl) CreateDeployEntry(deploy models.Timelines) error
func (*DBConnectorImpl) CreateProjectTableEntry ¶
func (conn *DBConnectorImpl) CreateProjectTableEntry(p *models.Projects) error
func (*DBConnectorImpl) CreateServiceTableEntry ¶
func (conn *DBConnectorImpl) CreateServiceTableEntry(s *models.Services) error
func (*DBConnectorImpl) DeleteServiceTableEntry ¶
func (conn *DBConnectorImpl) DeleteServiceTableEntry(name string) (models.Services, error)
func (*DBConnectorImpl) DeleteTimelinesByService ¶
func (conn *DBConnectorImpl) DeleteTimelinesByService(service models.Services) error
func (*DBConnectorImpl) Exec ¶
func (conn *DBConnectorImpl) Exec(sql string) error
func (*DBConnectorImpl) GetCommitByRef ¶
func (*DBConnectorImpl) GetCommitsAll ¶
func (*DBConnectorImpl) GetCommitsByProject ¶
func (*DBConnectorImpl) GetCommitsByService ¶
func (*DBConnectorImpl) GetDeployByRef ¶
func (*DBConnectorImpl) GetDeploysAll ¶
func (*DBConnectorImpl) GetDeploysByProject ¶
func (*DBConnectorImpl) GetDeploysByService ¶
func (*DBConnectorImpl) GetLatest ¶
func (conn *DBConnectorImpl) GetLatest(service structs.ExpandedServicesData) (structs.ExpandedServicesData, error, error)
func (*DBConnectorImpl) GetProjectByID ¶
func (*DBConnectorImpl) GetProjectByName ¶
func (*DBConnectorImpl) GetProjectByRepo ¶
func (conn *DBConnectorImpl) GetProjectByRepo(repo string) (models.Projects, error)
func (*DBConnectorImpl) GetProjectsAll ¶
func (*DBConnectorImpl) GetProjectsByService ¶
func (*DBConnectorImpl) GetServiceByID ¶
func (*DBConnectorImpl) GetServiceByName ¶
func (*DBConnectorImpl) GetServiceByRepo ¶
func (conn *DBConnectorImpl) GetServiceByRepo(repo string) (models.Services, error)
func (*DBConnectorImpl) GetServiceNames ¶
func (conn *DBConnectorImpl) GetServiceNames() ([]string, error)
func (*DBConnectorImpl) GetServicesAll ¶
func (conn *DBConnectorImpl) GetServicesAll(offset int, limit int, q structs.Query) ([]structs.ExpandedServicesData, int64, error)
func (*DBConnectorImpl) GetTimelineByRef ¶
func (*DBConnectorImpl) GetTimelinesAll ¶
func (conn *DBConnectorImpl) GetTimelinesAll(offset int, limit int, q structs.Query) ([]models.Timelines, int64, error)
*
- GetTimeline returns a timeline of commits and deploys for a service
func (*DBConnectorImpl) GetTimelinesByProject ¶
func (*DBConnectorImpl) GetTimelinesByService ¶
func (*DBConnectorImpl) UpdateProjectTableEntry ¶
func (conn *DBConnectorImpl) UpdateProjectTableEntry(p *models.Projects) error
func (*DBConnectorImpl) UpdateServiceTableEntry ¶
Click to show internal directories.
Click to hide internal directories.