schema

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2018 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateTempPath

func GenerateTempPath() string

GenerateTempPath returns a string path representing the location where it is okay to store temporary data. No structure or created or deleted as part of this operation.

func NewCustomSchemaManager

func NewCustomSchemaManager(ctx Context) (*textileSchemaManager, error)

NewCustomSchemaManger allows a custom Context to be provided to change

func NewSchemaManager

func NewSchemaManager() (*textileSchemaManager, error)

NewSchemaManager returns a service that handles the data storage directory required during runtime. This service also ensures no errors can be produced at runtime after initial creation. An error may be produced if the SchemaManager is unable to verify the availability of the data storage directory.

func TextilePathTransform

func TextilePathTransform(basePath string) (path string, err error)

DefaultPathTransform accepts a string path representing the location where application data can be stored and returns a string representing the location where we prefer to store the schema on the filesystem relative to that path. If the path cannot be transformed, an error will be returned

Types

type Context

type Context struct {
	DataPath string
	OS       string
}

Context are the parameters which the SchemaManager derive its source of truth. When their zero values are provided, a reasonable default will be assumed during runtime.

Jump to

Keyboard shortcuts

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