db

package
v0.0.0-...-7354109 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ProviderSet = wire.NewSet(
		NewConfig,
		NewDB,
		wire.Bind(new(Store), new(*dbStore)),
	)
)

Functions

func NewDB

func NewDB(cache *store.FolderCache) (*dbStore, error)

Types

type Config

type Config struct {
	DSN  string `yaml:"dsn"`
	Type string `yaml:"type"`
}

func NewConfig

func NewConfig(provider config.Provider) (config Config, err error)

type Store

type Store interface {
	SaveContent(contentType genapi.ContentType, data string, metadata json.RawMessage) (uuid.UUID, error)
	SaveNormalizedContent(contentID uuid.UUID, data string) (uuid.UUID, error)
	SaveLocatedContent(contentID uuid.UUID, data string) (uuid.UUID, error)
	GetStoredContent() ([]model.Content, error)
}

Jump to

Keyboard shortcuts

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