add data interfaces
Some checks failed
Lint / golangci-lint (push) Successful in 9m54s
Declarative Tests / test (push) Failing after 5s
Declarative Tests / build-fedora (push) Successful in 2m20s
Declarative Tests / build-ubuntu-focal (push) Successful in 1m15s

This commit is contained in:
Matthew Rich 2024-07-01 14:55:23 -07:00
parent 1460d2285b
commit 9b82a2c4e2

34
internal/data/data.go Normal file
View File

@ -0,0 +1,34 @@
// Copyright 2024 Matthew Rich <matthewrich.conf@gmail.com>. All rights reserved.
package data
import (
"context"
)
type Validator interface {
Validate() error
}
type Creator interface {
Create(context.Context) error
}
type Reader interface {
Read(context.Context) ([]byte, error)
}
type Updater interface {
Update(context.Context) error
}
type Deleter interface {
Delete(context.Context) error
}
type Crudder struct {
Creator
Reader
Updater
Deleter
}