github.com/Benchkram/bob@v0.0.0-20220321080157-7c8f3876e225/pkg/store/store.go (about)

     1  package store
     2  
     3  import (
     4  	"context"
     5  	"io"
     6  )
     7  
     8  // get inspiration from https://github.com/tus/tusd/blob/48ffebec56fcf3221461b3f8cbe000e5367e2d48/pkg/handler/datastore.go#L50
     9  
    10  type Artifact interface {
    11  	io.ReadWriteCloser
    12  }
    13  
    14  type Store interface {
    15  	NewArtifact(_ context.Context, id string) (Artifact, error)
    16  	GetArtifact(_ context.Context, id string) (Artifact, error)
    17  
    18  	List(context.Context) ([]string, error)
    19  
    20  	Clean(context.Context) error
    21  }