39 lines
516 B
Go
39 lines
516 B
Go
// 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 Info interface {
|
|
ReadStat() error
|
|
}
|
|
|
|
type Crudder interface {
|
|
Creator
|
|
Reader
|
|
Updater
|
|
Deleter
|
|
}
|