Initial commit
This commit is contained in:
7
hw12_13_14_15_calendar/internal/storage/event.go
Normal file
7
hw12_13_14_15_calendar/internal/storage/event.go
Normal file
@@ -0,0 +1,7 @@
|
||||
package storage
|
||||
|
||||
type Event struct {
|
||||
ID string
|
||||
Title string
|
||||
// TODO
|
||||
}
|
||||
14
hw12_13_14_15_calendar/internal/storage/memory/storage.go
Normal file
14
hw12_13_14_15_calendar/internal/storage/memory/storage.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package memorystorage
|
||||
|
||||
import "sync"
|
||||
|
||||
type Storage struct {
|
||||
// TODO
|
||||
mu sync.RWMutex //nolint:unused
|
||||
}
|
||||
|
||||
func New() *Storage {
|
||||
return &Storage{}
|
||||
}
|
||||
|
||||
// TODO
|
||||
@@ -0,0 +1,7 @@
|
||||
package memorystorage
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestStorage(t *testing.T) {
|
||||
// TODO
|
||||
}
|
||||
20
hw12_13_14_15_calendar/internal/storage/sql/storage.go
Normal file
20
hw12_13_14_15_calendar/internal/storage/sql/storage.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package sqlstorage
|
||||
|
||||
import "context"
|
||||
|
||||
type Storage struct { // TODO
|
||||
}
|
||||
|
||||
func New() *Storage {
|
||||
return &Storage{}
|
||||
}
|
||||
|
||||
func (s *Storage) Connect(ctx context.Context) error {
|
||||
// TODO
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *Storage) Close(ctx context.Context) error {
|
||||
// TODO
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user