storages

package
v0.0.0-...-5b75bdc Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MemoryStorage

type MemoryStorage struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewMemoryStorage

func NewMemoryStorage() *MemoryStorage

func (*MemoryStorage) Create

func (s *MemoryStorage) Create(content string, expiration time.Duration) (string, time.Time, error)

func (*MemoryStorage) Delete

func (s *MemoryStorage) Delete(id string) error

func (*MemoryStorage) View

func (s *MemoryStorage) View(id string) (*Secret, error)

type Secret

type Secret struct {
	Content   string
	ExpiresAt time.Time
}

Jump to

Keyboard shortcuts

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