An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

Top 5.9% on proxy.golang.org

proxy.golang.org : github.com/c2fo/vfs/v7

Package vfs provides a pluggable, extensible, and opinionated set of file system functionality for Go across a number of file system types such as os, S3, and GCS. When building our platform, initially we wrote a library that was something to the effect of Not only was ugly but because the behaviors of each "file system" were different and we had to constantly alter the file locations and pass a bucket string (even if the fs didn't know what a bucket was). We found a handful of third-party libraries that were interesting but none of them had everything we needed/wanted. Of particular inspiration was https://github.com/spf13/afero in its composition of the super-powerful stdlib io.* interfaces. Unfortunately, it didn't support Google Cloud Storage and there was still a lot of passing around of strings and structs. Few, if any, of the vfs-like libraries provided interfaces to easily and confidently create new file system backends. What we needed/wanted was the following(and more): Pre 1.17: Post 1.17: Please review these changes and update your code accordingly to ensure compatibility with v7. The project now uses the aws-sdk-go-v2 library instead of the deprecated, EOL aws-sdk-go. This update necessitated a these to the S3 backend: The S3 backend's filesystem.Client() function now returns an `s3.Client` which is a subset of AWS's sdk v2 functionality. This change may require updates to your code if you were relying client functionality not directly required by the s3 vfs backend. The `Option.Retry` field is now an `aws.Retryer` instead of a `request.Retry`. Ensure that your Option logic is compatible with the new type. Scheme for Azure has been updated from `https` to `az`. Update your code to use the new scheme. Authority for Azure has been updated from `blob.core.windows.net` to `<blob-container-name>`, such that the full URI is `az://<blob-container-name>/path/to/file.txt` rather than `https://<storage-account-name>.core.windows.net/<blob-container-name>/path/to/file.txt`. Some methods in the Location and FileSystem interfaces have been deprecated because they use terminology that doesn't apply to all backends. They will be removed in a future release. Update your code to use the new methods. See https://github.com/C2FO/vfs/issues/235. location.Volume() method which returns the authority as a string has been deprecated in favor of the location.Authority() method which returns an authority.Authority struct. Update your code to use the Authority().String() method instead of Volume(). location.ChangeDir() method ash been deprecated in favor of the existing location.NewLocation() method. Update your code to use the NewLocation() method instead of ChangeDir(). vfs.Options struct has been deprecated in favor of using backend-specific structs. FileSystem.Retry() method has been deprecated in favor of using backend-specific functional options. Additionally, we have added functional option interface, `NewFileSystemOption`, to allow for more flexible configuration of backends. This interface allows for more complex configuration options to be passed to the via the `NewFileSystem` function. This will replace backend-specific chainable functions that require casting the filesystem to the backend type first. See https://github.com/C2FO/vfs/issues/238. With v6.0.0, sftp.Options struct changed to accept an array of Key Exchange algorithms rather than a string. To update, change the syntax of the auth commands. becomes We provide vfssimple as basic way of initializing file system backends (see each implementation's docs about authentication). vfssimple pulls in every c2fo/vfs backend. If you need to reduce the backend requirements (and app memory footprint) or add a third party backend, you'll need to implement your own "factory". See backend doc for more info. You can then use those file systems to initialize locations which you'll be referencing frequently, or initialize files directly You can perform a number of actions without any consideration for the underlying system's api or implementation details. File's io.* interfaces may be used directly: * none so far Feel free to send a pull request if you want to add your backend to the list. # Ideas See https://github.com/C2FO/vfs/discussions Contributing Distributed under the MIT license. See `http://github.com/c2fo/vfs/License.md for more information. * absolute path - A path is said to be absolute if it provides the entire context need to find a file, including the file system root. An absolute path must begin with a slash and may include . and .. directories. * file path - A file path ends with a filename and therefore may not end with a slash. It may be relative or absolute. * location path - A location/dir path must end with a slash. It may be relative or absolute. * relative path - A relative path is a way to locate a dir or file relative to another directory. A relative path may not begin with a slash but may include . and .. directories. * URI - A Uniform Resource Identifier (URI) is a string of characters that unambiguously identifies a particular resource. To guarantee uniformity, all URIs follow a predefined set of syntax rules, but also maintain extensibility through a separately defined hierarchical naming scheme (e.g. http://). * authority - The authority section of a URI is used to specify the authentication information for the server or service being accessed. It is separated from the rest of the URI by a double slash (//). The authority section is further broken down into userinfo, host, and port. * userinfo - The userinfo section may contain a username and password separated by a colon. The username and password are separated by a colon and followed by an @ symbol. The password may be omitted.

Registry - Source - Documentation - JSON - codemeta.json
purl: pkg:golang/github.com/c2fo/vfs/v7
License: MIT
Latest release: 30 days ago
First release: 8 months ago
Namespace: github.com/c2fo/vfs
Stars: 351 on GitHub
Forks: 35 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 1 day ago

    Loading...
    Readme
    Loading...