mirror of
https://github.com/lus/pasty.git
synced 2023-08-10 21:13:09 +03:00
Implement basic configuration and storage structure
This commit is contained in:
14
internal/storage/storage.go
Normal file
14
internal/storage/storage.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package storage
|
||||
|
||||
import (
|
||||
"github.com/Lukaesebrot/pasty/internal/pastes"
|
||||
"github.com/bwmarrin/snowflake"
|
||||
)
|
||||
|
||||
// Storage represents a storage type
|
||||
type Storage interface {
|
||||
initialize() error
|
||||
get(id snowflake.ID) (*pastes.Paste, error)
|
||||
save(paste *pastes.Paste) error
|
||||
delete(id snowflake.ID) error
|
||||
}
|
||||
Reference in New Issue
Block a user