Documentation ¶
Index ¶
- Constants
- Variables
- func NewS3namespace() *core.Namespace
- func S3Delete(ctx *core.Context, u core.URL, readable core.Readable) error
- func S3RemoveBucketPolicy(ctx *core.Context, u core.URL) error
- func S3SetBucketPolicy(ctx *core.Context, u core.URL, policy core.Value) error
- type Bucket
- func (b *Bucket) Close()
- func (bucket *Bucket) DeleteObject(ctx *core.Context, key string) error
- func (b *Bucket) Equal(ctx *core.Context, other core.Value, alreadyCompared map[uintptr]uintptr, ...) bool
- func (b *Bucket) GetObject(ctx *core.Context, key string) (*GetObjectResponse, error)
- func (b *Bucket) IsMutable() bool
- func (b *Bucket) ListObjects(ctx *core.Context, key string) ([]*ObjectInfo, error)
- func (b *Bucket) Name() string
- func (b *Bucket) PrettyPrint(w *bufio.Writer, config *core.PrettyPrintConfig, depth int, ...)
- func (bucket *Bucket) PutObject(ctx *core.Context, key string, body io.Reader) (*PutObjectResponse, error)
- func (b *Bucket) RemoveAllObjects(ctx *core.Context)
- func (b *Bucket) ToSymbolicValue(ctx *core.Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- type BucketMapItem
- type GetBucketPolicyResponse
- func (r *GetBucketPolicyResponse) Equal(ctx *core.Context, other core.Value, alreadyCompared map[uintptr]uintptr, ...) bool
- func (resp *GetBucketPolicyResponse) GetGoMethod(name string) (*core.GoFunction, bool)
- func (r *GetBucketPolicyResponse) IsMutable() bool
- func (r *GetBucketPolicyResponse) PrettyPrint(w *bufio.Writer, config *core.PrettyPrintConfig, depth int, ...)
- func (resp *GetBucketPolicyResponse) Prop(ctx *core.Context, name string) core.Value
- func (*GetBucketPolicyResponse) PropertyNames(ctx *core.Context) []string
- func (*GetBucketPolicyResponse) SetProp(ctx *core.Context, name string, value core.Value) error
- func (resp *GetBucketPolicyResponse) ToSymbolicValue(ctx *core.Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- type GetObjectResponse
- func (r *GetObjectResponse) Equal(ctx *core.Context, other core.Value, alreadyCompared map[uintptr]uintptr, ...) bool
- func (resp *GetObjectResponse) GetGoMethod(name string) (*core.GoFunction, bool)
- func (r *GetObjectResponse) IsMutable() bool
- func (r *GetObjectResponse) PrettyPrint(w *bufio.Writer, config *core.PrettyPrintConfig, depth int, ...)
- func (resp *GetObjectResponse) Prop(ctx *core.Context, name string) core.Value
- func (*GetObjectResponse) PropertyNames(ctx *core.Context) []string
- func (r *GetObjectResponse) ReadAll() ([]byte, error)
- func (*GetObjectResponse) SetProp(ctx *core.Context, name string, value core.Value) error
- func (resp *GetObjectResponse) ToSymbolicValue(ctx *core.Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- type ObjectInfo
- func (i *ObjectInfo) Equal(ctx *core.Context, other core.Value, alreadyCompared map[uintptr]uintptr, ...) bool
- func (i *ObjectInfo) IsMutable() bool
- func (i *ObjectInfo) PrettyPrint(w *bufio.Writer, config *core.PrettyPrintConfig, depth int, ...)
- func (i *ObjectInfo) ToSymbolicValue(ctx *core.Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- type OpenBucketOptions
- type OpenBucketWithCredentialsInput
- type PutObjectResponse
- func (r *PutObjectResponse) Equal(ctx *core.Context, other core.Value, alreadyCompared map[uintptr]uintptr, ...) bool
- func (resp *PutObjectResponse) GetGoMethod(name string) (*core.GoFunction, bool)
- func (r *PutObjectResponse) IsMutable() bool
- func (r *PutObjectResponse) PrettyPrint(w *bufio.Writer, config *core.PrettyPrintConfig, depth int, ...)
- func (resp *PutObjectResponse) Prop(ctx *core.Context, name string) core.Value
- func (*PutObjectResponse) PropertyNames(ctx *core.Context) []string
- func (*PutObjectResponse) SetProp(ctx *core.Context, name string, value core.Value) error
- func (resp *PutObjectResponse) ToSymbolicValue(ctx *core.Context, encountered map[uintptr]symbolic.Value) (symbolic.Value, error)
- type S3Client
- func (c *S3Client) CopyObject(ctx *core.Context, dst minio.CopyDestOptions, src minio.CopySrcOptions) (minio.UploadInfo, error)
- func (c *S3Client) GetBucketPolicy(ctx *core.Context, bucketName string) (string, error)
- func (c *S3Client) GetObject(ctx *core.Context, bucketName, objectName string, opts minio.GetObjectOptions) (*minio.Object, error)
- func (c *S3Client) ListObjects(ctx *core.Context, bucketName string, opts minio.ListObjectsOptions) ([]*ObjectInfo, error)
- func (c *S3Client) ListObjectsLive(ctx *core.Context, bucketName string, opts minio.ListObjectsOptions) <-chan minio.ObjectInfo
- func (c *S3Client) PutObject(ctx *core.Context, bucketName, objectName string, reader io.Reader, ...) (minio.UploadInfo, error)
- func (c *S3Client) PutObjectNoCtx(bucketName, objectName string, reader io.Reader, objectSize int64, ...) (minio.UploadInfo, error)
- func (c *S3Client) RemoveObject(ctx *core.Context, bucketName string, objectName string, ...) error
- func (c *S3Client) RemoveObjects(ctx *core.Context, bucketName string, objectChan <-chan minio.ObjectInfo, ...) <-chan minio.RemoveObjectError
- func (c *S3Client) SetBucketPolicy(ctx *core.Context, bucketName, content string) error
- type S3Filesystem
- func (fls *S3Filesystem) Create(filename string) (billy.File, error)
- func (fls *S3Filesystem) Join(elem ...string) string
- func (fls *S3Filesystem) Open(filename string) (billy.File, error)
- func (fls *S3Filesystem) OpenFile(filename string, flag int, perm os.FileMode) (billy.File, error)
- func (fls *S3Filesystem) Remove(filename string) error
- func (fls *S3Filesystem) RemoveAllObjects()
- func (fls *S3Filesystem) Rename(oldpath, newpath string) error
- func (fls *S3Filesystem) Stat(filename string) (os.FileInfo, error)
- func (fls *S3Filesystem) WithSecondaryContext(ctx *core.Context) any
- func (fls *S3Filesystem) WithoutSecondaryContext() any
Constants ¶
View Source
const ( DIR_FMODE = core.FileMode(0700 | fs.ModeDir) DEFAULT_MAX_STORAGE_SIZE = 100_000_000 SUPPORTED_OPEN_FLAGS = os.O_RDONLY | os.O_WRONLY | os.O_RDWR | os.O_APPEND | os.O_EXCL | os.O_CREATE | os.O_TRUNC )
View Source
const ( MISSING_ACCESS_KEY_IN_RESOL_DATA = "missing .access-key in resolution data" MISSING_SECRET_KEY_IN_RESOL_DATA = "missing .secret-key in resolution data" MISSING_ACCESS_KEY_SECRET_KEY_HOST_IN_RESOL_DATA_NO_PROJ_FOUND = "missing .access-key, .secret-key and .host in resolution data (no project found to provide credentials)" MISSING_ACCESS_KEY_SECRET_KEY_HOST_IN_RESOL_DATA_PROJ_CANNOT_PROVIDE_CREDS = "" /* 126-byte string literal not displayed */ MISSING_HOST_IN_RESOL_DATA = "missing .host in resolution data" HOST_SHOULD_NOT_BE_IN_RESOL_DATA_SINCE_CREDS_NOT_PROVIDED = ".host should not be in resolution data since it is provided by the project" MISSING_BUCKET_IN_RESOL_DATA = "missing .bucket in resolution data" MISSING_PROVIDER_IN_RESOL_DATA = "missing .provider in resolution data" )
View Source
const (
NAMESPACE_NAME = "s3"
)
View Source
const (
OBJECT_STORAGE_REQUEST_RATE_LIMIT_NAME = "object-storage/request"
)
View Source
const (
PERM_METADATA_KEY = "Perm" //a user metadata key seems to require
)
Variables ¶
View Source
var ( ErrLockNotSupported = errors.New("lock not supported by s3 filesystem") ErrCannotWriteToReadOnly = errors.New("cannot write to read-only file") ErrCannotTruncateReadOnly = errors.New("cannot truncate a read-only file") ErrCannotReadFromWriteOnly = errors.New("cannot read from write-only file") )
View Source
var (
ErrCannotResolveBucket = errors.New("cannot resolve bucket")
)
View Source
var (
ErrOnlyS3httpsURLsSupported = errors.New("only s3:// & https:// urls are supported")
)
View Source
var (
ErrOpenFlagNotSupported = errors.New("open flag not supported by S3 filesystem")
)
Functions ¶
func NewS3namespace ¶
Types ¶
type Bucket ¶
type Bucket struct {
// contains filtered or unexported fields
}
func OpenBucket ¶
func OpenBucketWithCredentials ¶
func OpenBucketWithCredentials(ctx *core.Context, input OpenBucketWithCredentialsInput) (*Bucket, error)
func (*Bucket) DeleteObject ¶
func (*Bucket) ListObjects ¶
func (*Bucket) PrettyPrint ¶
func (*Bucket) RemoveAllObjects ¶
type BucketMapItem ¶
type BucketMapItem = struct {
WithCredentials, Public *Bucket
}
type GetBucketPolicyResponse ¶
type GetBucketPolicyResponse struct {
// contains filtered or unexported fields
}
func S3GetBucketPolicy ¶
func (*GetBucketPolicyResponse) GetGoMethod ¶
func (resp *GetBucketPolicyResponse) GetGoMethod(name string) (*core.GoFunction, bool)
func (*GetBucketPolicyResponse) IsMutable ¶
func (r *GetBucketPolicyResponse) IsMutable() bool
func (*GetBucketPolicyResponse) PrettyPrint ¶
func (r *GetBucketPolicyResponse) PrettyPrint(w *bufio.Writer, config *core.PrettyPrintConfig, depth int, parentIndentCount int)
func (*GetBucketPolicyResponse) PropertyNames ¶
func (*GetBucketPolicyResponse) PropertyNames(ctx *core.Context) []string
type GetObjectResponse ¶
type GetObjectResponse struct {
// contains filtered or unexported fields
}
func (*GetObjectResponse) GetGoMethod ¶
func (resp *GetObjectResponse) GetGoMethod(name string) (*core.GoFunction, bool)
func (*GetObjectResponse) IsMutable ¶
func (r *GetObjectResponse) IsMutable() bool
func (*GetObjectResponse) PrettyPrint ¶
func (r *GetObjectResponse) PrettyPrint(w *bufio.Writer, config *core.PrettyPrintConfig, depth int, parentIndentCount int)
func (*GetObjectResponse) PropertyNames ¶
func (*GetObjectResponse) PropertyNames(ctx *core.Context) []string
func (*GetObjectResponse) ReadAll ¶
func (r *GetObjectResponse) ReadAll() ([]byte, error)
type ObjectInfo ¶
type ObjectInfo struct {
minio.ObjectInfo
}
func (*ObjectInfo) IsMutable ¶
func (i *ObjectInfo) IsMutable() bool
func (*ObjectInfo) PrettyPrint ¶
func (i *ObjectInfo) PrettyPrint(w *bufio.Writer, config *core.PrettyPrintConfig, depth int, parentIndentCount int)
type OpenBucketOptions ¶
type OpenBucketOptions struct { //if true and the host definition data of s3Host is an object without the .access-key & .secret-key properties //calls .Project.GetS3CredentialsForBucket. // The project is not retrieved from the main state because the context might not have // an associated state or the state could be temporary. AllowGettingCredentialsFromProject bool Project core.Project }
type PutObjectResponse ¶
type PutObjectResponse struct {
// contains filtered or unexported fields
}
func (*PutObjectResponse) GetGoMethod ¶
func (resp *PutObjectResponse) GetGoMethod(name string) (*core.GoFunction, bool)
func (*PutObjectResponse) IsMutable ¶
func (r *PutObjectResponse) IsMutable() bool
func (*PutObjectResponse) PrettyPrint ¶
func (r *PutObjectResponse) PrettyPrint(w *bufio.Writer, config *core.PrettyPrintConfig, depth int, parentIndentCount int)
func (*PutObjectResponse) PropertyNames ¶
func (*PutObjectResponse) PropertyNames(ctx *core.Context) []string
type S3Client ¶
type S3Client struct {
// contains filtered or unexported fields
}
func (*S3Client) CopyObject ¶
func (*S3Client) GetBucketPolicy ¶
func (*S3Client) ListObjects ¶
func (*S3Client) ListObjectsLive ¶
func (*S3Client) PutObjectNoCtx ¶
func (*S3Client) RemoveObject ¶
func (*S3Client) RemoveObjects ¶
type S3Filesystem ¶
type S3Filesystem struct {
// contains filtered or unexported fields
}
func NewS3Filesystem ¶
func NewS3Filesystem(ctx *core.Context, bucket *Bucket) *S3Filesystem
func (*S3Filesystem) Create ¶
func (fls *S3Filesystem) Create(filename string) (billy.File, error)
func (*S3Filesystem) Join ¶
func (fls *S3Filesystem) Join(elem ...string) string
func (*S3Filesystem) Open ¶
func (fls *S3Filesystem) Open(filename string) (billy.File, error)
func (*S3Filesystem) Remove ¶
func (fls *S3Filesystem) Remove(filename string) error
func (*S3Filesystem) RemoveAllObjects ¶
func (fls *S3Filesystem) RemoveAllObjects()
func (*S3Filesystem) Rename ¶
func (fls *S3Filesystem) Rename(oldpath, newpath string) error
func (*S3Filesystem) WithSecondaryContext ¶
func (fls *S3Filesystem) WithSecondaryContext(ctx *core.Context) any
func (*S3Filesystem) WithoutSecondaryContext ¶
func (fls *S3Filesystem) WithoutSecondaryContext() any
Source Files ¶
Click to show internal directories.
Click to hide internal directories.