sqlite

package
v0.0.0-...-cf45389 Latest Latest
Warning

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

Go to latest
Published: May 18, 2021 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(dbPath string) (*Client, error)

func (*Client) AllFiles

func (c *Client) AllFiles() (records.FileIterator, error)

func (*Client) AllTags

func (c *Client) AllTags() (records.TagIterator, error)

func (*Client) CreateFile

func (c *Client) CreateFile(filename string, documentDate time.Time) (uuid.UUID, error)

func (*Client) CreateFileWithID

func (c *Client) CreateFileWithID(
	filename string,
	documentDate time.Time,
	fileID uuid.UUID,
) error

func (*Client) CreateFileWithIDAndTags

func (c *Client) CreateFileWithIDAndTags(
	filename string,
	documentDate time.Time,
	fileID uuid.UUID,
	tagNames []string,
) error

func (*Client) CreateFileWithTags

func (c *Client) CreateFileWithTags(
	filename string,
	documentDate time.Time,
	tagNames []string,
) (uuid.UUID, error)

func (*Client) CreateMetadataWithID

func (c *Client) CreateMetadataWithID(hash string, fileSize uint64, id uuid.UUID) error

func (*Client) CreateTags

func (c *Client) CreateTags(names []string) ([]uuid.UUID, error)

func (*Client) FindFilesWithDate

func (c *Client) FindFilesWithDate(documentDate time.Time) ([]*records.File, error)

func (*Client) FindFilesWithIdPrefix

func (c *Client) FindFilesWithIdPrefix(idPrefix string) ([]*records.File, error)

func (*Client) FindFilesWithTags

func (c *Client) FindFilesWithTags(tagNames []string) ([]*records.File, error)

func (*Client) FindMetadataByHash

func (c *Client) FindMetadataByHash(hash string) (*records.FileMetadata, error)

func (*Client) FindTagByName

func (c *Client) FindTagByName(name string) (*records.Tag, error)

func (*Client) GetFile

func (c *Client) GetFile(id uuid.UUID) (*records.File, error)

func (*Client) GetFileByHash

func (c *Client) GetFileByHash(hash string) (*records.File, error)

func (*Client) GetFileDays

func (c *Client) GetFileDays(year int, month int) ([]int, error)

func (*Client) GetFileMonths

func (c *Client) GetFileMonths(year int) ([]int, error)

func (*Client) GetFileWithDate

func (c *Client) GetFileWithDate(filename string, date time.Time) (*records.File, error)

func (*Client) GetFileYears

func (c *Client) GetFileYears() ([]int, error)

func (*Client) GetTags

func (c *Client) GetTags(names []string) ([]*records.Tag, error)

func (*Client) GetTagsForFile

func (c *Client) GetTagsForFile(id uuid.UUID) (records.TagIterator, error)

func (*Client) Migrate

func (c *Client) Migrate() error

func (*Client) RemoveFile

func (c *Client) RemoveFile(id uuid.UUID) error

func (*Client) UpdateFile

func (c *Client) UpdateFile(file *records.File) error

func (*Client) UpdateFileDate

func (c *Client) UpdateFileDate(id uuid.UUID, newFilename string, newDate time.Time) error

func (*Client) UpdateFileHash

func (c *Client) UpdateFileHash(id uuid.UUID, hash string) error

func (*Client) UpdateFileTags

func (c *Client) UpdateFileTags(id uuid.UUID, addedTags, removedTags []string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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