1
0
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:
Lukas SP
2020-08-22 23:24:38 +02:00
parent 9bd6044e39
commit ba0aebdb62
8 changed files with 132 additions and 20 deletions

View 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
}