server.garden privileged automation agent (mirror of https://git.sequentialread.com/forest/rootsystem)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

44 lines
900 B

package objectStorage
import (
"time"
"git.sequentialread.com/forest/rootsystem/configuration"
)
type ObjectStoragerMeta struct {
Client ObjectStorager
Initializing bool
Description string
Err error
}
type ObjectStorageFileInfo struct {
Name string
LastModified time.Time
IsDirectory bool
}
type ObjectStorageFile struct {
Name string
LastModified time.Time
Content []byte
}
type ObjectStorageKey struct {
Name string
PathPrefix string
Read bool
Write bool
Delete bool
List bool
}
type ObjectStorager interface {
CreateIfNotExists() error
CreateAccessKeyIfNotExists(key ObjectStorageKey) ([]configuration.Credential, error)
List(key string) ([]ObjectStorageFileInfo, error)
Get(key string) (file ObjectStorageFile, notFound bool, err error)
Put(key string, value []byte) error
Delete(key string) error
}