murphy/store/store.go
gari 3a82bf1776
All checks were successful
continuous-integration/drone/push Build is passing
#1 scan all projects for last modified
2021-11-30 23:09:34 +01:00

34 lines
597 B
Go

package store
import (
"github.com/mehdioa/nlog"
"sync"
"time"
)
type Store struct {
TargetPath []string
SourcePath []string
GracePeriod time.Duration
Projects map[string]*Project
Logger *nlog.Logger
lock sync.RWMutex
}
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
}