store

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(name string, driver storeDriver)

Register makes a store driver available by the provided name.

Types

type Store

type Store struct {
	AuthToken string
	// contains filtered or unexported fields
}

Store is the database storage driver.

func Default added in v0.4.0

func Default() (*Store, error)

Default ...

func New

func New(driverName string) (*Store, error)

New creates a new instance of Store object

func (*Store) Auth

func (s *Store) Auth(token string) bool

Auth check for valid authentication token

func (*Store) Close

func (s *Store) Close()

Close cleanup driver connection

func (*Store) Get

func (s *Store) Get(hash string) (string, error)

Get item from datastore

func (*Store) Set added in v0.4.0

func (s *Store) Set(url string) (string, error)

Set adds URL to datastore

Jump to

Keyboard shortcuts

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