dir

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package dir implements an on-disk reference storage adapter.

To use it, add a anonymous import to your main package:

import (
	_ "github.com/digineo/texd/refstore/dir"
)

For configuration, use a DSN with the following shape:

dsn := "dir:///path/for/persistent/files?options"
dir, _ := refstore.NewStore(dsn)

Note the triple-slash: the scheme is "dir://", and the directory itself is /path/for/persistent/files. See New() for valid options.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(config *url.URL) (refstore.Adapter, error)

New returns a new storage adapter.

The following options (config.Query()) are understood: - none yet

The config.Path must point to an existing directory, and it must be writable.

func NewMemory

func NewMemory(config *url.URL) (refstore.Adapter, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL