jsonstore

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

jsonstore implements a JSON file based store for resumable uploads via github.com/eventials/go-tus

Locking is used to ensure concurrent access within the same JsonStore is safe, however using the same underlying JSON file for more than one JsonStore may cause data loss or corruption.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewJsonStore

func NewJsonStore(file string) (tus.Store, error)

NewJsonStore creates a new *JsonStore using the provided file path

Types

type JsonStore

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

The JsonStore type satisfies the tus.Store interface

func (*JsonStore) Close

func (s *JsonStore) Close()

func (*JsonStore) Delete

func (s *JsonStore) Delete(fingerprint string)

func (*JsonStore) Get

func (s *JsonStore) Get(fingerprint string) (string, bool)

func (*JsonStore) Set

func (s *JsonStore) Set(fingerprint, url string)

Jump to

Keyboard shortcuts

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