Documentation
¶
Overview ¶
Package pkg provides the implementation of the storage interface.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Storage ¶
type Storage interface {
// Insert adds a new TinyURL record to the storage.
Insert(ctx context.Context, short uint64, longURL []byte) error
// GetTinyURLByID retrieves a TinyURL record by its ID.
GetTinyURLByID(ctx context.Context, short uint64) (*TinyURL, error)
// Close closes the storage.
Close() error
}
Storage is an interface that defines the methods that a storage system must implement.
Click to show internal directories.
Click to hide internal directories.