storage

package
v0.0.0-...-ec0a98d Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BoltStorage

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

BoltTransport implements the TransportInterface using the Bolt database.

func NewBoltStorage

func NewBoltStorage() (*BoltStorage, error)

NewBoltTransport create a new BoltStorage instange.

func (*BoltStorage) Count

func (b *BoltStorage) Count() (int64, error)

func (*BoltStorage) Get

func (b *BoltStorage) Get(id string) (string, error)

func (*BoltStorage) GetAllRecords

func (b *BoltStorage) GetAllRecords() (resp string, err error)

func (*BoltStorage) Put

func (b *BoltStorage) Put(id string, url string) error

type StorageService

type StorageService interface {
	Put(id string, url string) error
	Get(id string) (string, error)
	Count() (int64, error)
	GetAllRecords() (string, error)
}

Storage fuctions Interface

func NewStrorageService

func NewStrorageService() (StorageService, error)

Jump to

Keyboard shortcuts

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