#1 scan all projects for last modified
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
2fc606beae
commit
3a82bf1776
3 changed files with 63 additions and 41 deletions
|
@ -2,18 +2,33 @@ package store
|
|||
|
||||
import (
|
||||
"github.com/mehdioa/nlog"
|
||||
"sync"
|
||||
"time"
|
||||
)
|
||||
|
||||
type Store struct {
|
||||
TargetPath []string
|
||||
SourcePath []string
|
||||
TargetPath []string
|
||||
SourcePath []string
|
||||
GracePeriod time.Duration
|
||||
Logger *nlog.Logger
|
||||
Projects map[string]*Project
|
||||
Logger *nlog.Logger
|
||||
lock sync.RWMutex
|
||||
}
|
||||
|
||||
func NewStore(Logger *nlog.Logger) *Store{
|
||||
store := &Store{Logger: Logger}
|
||||
type Project struct {
|
||||
TargetPath string
|
||||
LastChange time.Time
|
||||
Created time.Time
|
||||
ProjectName string
|
||||
Logger *nlog.Node
|
||||
}
|
||||
|
||||
func NewStore(Logger *nlog.Logger) *Store {
|
||||
store := &Store{Logger: Logger, Projects: make(map[string]*Project)}
|
||||
|
||||
return store
|
||||
}
|
||||
|
||||
func (store *Store) GetProjects() map[string]*Project {
|
||||
return store.Projects
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue