Skip to content

reiver/go-digestfs

Repository files navigation

go-digestfs

Package digestfs provides a content-addressable virtual file system (VFS) by providing a common interface to one or more content-addressable storage (CAS).

Documention

Online documentation, which includes examples, can be found at: http://godoc.org/github.com/reiver/go-digestfs

GoDoc

Example

Here is an example of how to use an already mounted digestfs.MountPoint to get content:

content, err := mountpoint.Open("SHA-256.hexadecimal", "c0535e4be2b79ffd93291305436bf889314e4a3faec05ecffcbb7df31ad9e51a")
if nil != err {
	return err
}
defer content.Close()

Note that if you had the digest encoded as binary, then you could encode it as hexadecimal using: As in:

digest := fmt.Sprintf("%x", binaryDigest)

Content Addressing

A content-addressable file system, or content-addressable storage (CAS) may be used with content addressing.

Some examples of content addressing include:

See Also

About

Package digestfs provides a content-addressable virtual file system (VFS) by providing a common interface to one or more content-addressable storage (CAS).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages