#1 scan all projects for last modified
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
gari 2021-11-30 23:09:34 +01:00
parent 2fc606beae
commit 3a82bf1776
3 changed files with 63 additions and 41 deletions

View file

@ -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
}