Documentation ¶
Index ¶
- Constants
- type FSStore
- func (s *FSStore) All() ([]*task.Task, error)
- func (s *FSStore) Delete(id string) error
- func (s *FSStore) EnsureVolumesDir(t *task.Task) error
- func (s *FSStore) Filter(filterFn func(*task.Task) bool) ([]*task.Task, error)
- func (s *FSStore) Get(id string) (*task.Task, error)
- func (s *FSStore) GetByCommit(service, project, branch, commit string, latest bool) (*task.Task, error)
- func (s *FSStore) GetLatest(service, project, branch string) (*task.Task, error)
- func (s *FSStore) GetVolumePath(t *task.Task) string
- func (s *FSStore) SetLatest(t *task.Task) error
- func (s *FSStore) Upsert(t *task.Task) error
- type Storage
Constants ¶
View Source
const DirMode fs.FileMode = 0755
DirMode is the default dirmode for volumes
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FSStore ¶
type FSStore struct {
// contains filtered or unexported fields
}
FSStore contains all storage data and primitives directly on the FS
func NewFSStore ¶
NewFSStore inits a new filesystem store
func (*FSStore) EnsureVolumesDir ¶
EnsureVolumesDir is used to create required volume dirs
func (*FSStore) Filter ¶
Filter return all the tasks matching the required predicates from the filter function
func (*FSStore) GetByCommit ¶
func (s *FSStore) GetByCommit(service, project, branch, commit string, latest bool) (*task.Task, error)
GetByCommit gets the task using the full path from service to commit
func (*FSStore) GetVolumePath ¶
GetVolumePath is used to get the root volume path of a task
type Storage ¶
type Storage interface { Upsert(*task.Task) error Get(id string) (*task.Task, error) GetByCommit(service, project, branch, commit string, latest bool) (*task.Task, error) All() ([]*task.Task, error) Filter(func(*task.Task) bool) ([]*task.Task, error) Delete(id string) error SetLatest(*task.Task) error GetLatest(service, project, branch string) (*task.Task, error) GetVolumePath(*task.Task) string EnsureVolumesDir(*task.Task) error }
Storage describe all storage primitives
Click to show internal directories.
Click to hide internal directories.