2020-04-05 13:24:48 +00:00
|
|
|
// +build !solution
|
|
|
|
|
2020-03-10 12:08:59 +00:00
|
|
|
package artifact
|
|
|
|
|
|
|
|
import (
|
|
|
|
"errors"
|
|
|
|
|
|
|
|
"gitlab.com/slon/shad-go/distbuild/pkg/build"
|
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
2020-03-29 20:35:58 +00:00
|
|
|
ErrNotFound = errors.New("artifact not found")
|
2020-04-04 18:45:29 +00:00
|
|
|
ErrExists = errors.New("artifact exists")
|
2020-03-29 20:35:58 +00:00
|
|
|
ErrWriteLocked = errors.New("artifact is locked for write")
|
|
|
|
ErrReadLocked = errors.New("artifact is locked for read")
|
2020-03-10 12:08:59 +00:00
|
|
|
)
|
|
|
|
|
2020-03-12 22:33:54 +00:00
|
|
|
type Cache struct {
|
|
|
|
}
|
2020-03-10 12:08:59 +00:00
|
|
|
|
|
|
|
func NewCache(root string) (*Cache, error) {
|
2020-04-05 13:24:48 +00:00
|
|
|
panic("implement me")
|
2020-03-12 22:33:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (c *Cache) Range(artifactFn func(artifact build.ID) error) error {
|
2020-04-05 13:24:48 +00:00
|
|
|
panic("implement me")
|
2020-03-10 12:08:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (c *Cache) Remove(artifact build.ID) error {
|
2020-04-05 13:24:48 +00:00
|
|
|
panic("implement me")
|
2020-03-10 12:08:59 +00:00
|
|
|
}
|
|
|
|
|
2020-03-12 22:33:54 +00:00
|
|
|
func (c *Cache) Create(artifact build.ID) (path string, commit, abort func() error, err error) {
|
2020-04-05 13:24:48 +00:00
|
|
|
panic("implement me")
|
2020-03-10 12:08:59 +00:00
|
|
|
}
|
|
|
|
|
2020-03-12 22:33:54 +00:00
|
|
|
func (c *Cache) Get(artifact build.ID) (path string, unlock func(), err error) {
|
2020-04-05 13:24:48 +00:00
|
|
|
panic("implement me")
|
2020-03-10 12:08:59 +00:00
|
|
|
}
|