github.com/esnet/gdg@v0.6.1-0.20240412190737-6b6eba9c14d8/internal/service/storage.go (about) 1 package service 2 3 import ( 4 _ "gocloud.dev/blob/azureblob" 5 _ "gocloud.dev/blob/gcsblob" 6 _ "gocloud.dev/blob/s3blob" 7 ) 8 9 type ContextStorage string 10 11 const StorageContext = ContextStorage("storage") 12 13 // TODO: pull all the cloud based interaction into a Plugin System 14 type Storage interface { 15 WriteFile(filename string, data []byte) error // WriteFile returns error or writes byte array to destination 16 ReadFile(filename string) ([]byte, error) // ReadFile returns byte array or error with data from file 17 FindAllFiles(folder string, fullPath bool) ([]string, error) // FindAllFiles recursively list all files for a given path 18 Name() string // Name of storage engine 19 }