Mostly finish docs
Actually start to parse things
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
package darkstorm
|
||||
|
||||
import "errors"
|
||||
|
||||
var (
|
||||
ErrIDNotFound = errors.New("id not found in table")
|
||||
)
|
||||
|
||||
type IDStruct interface {
|
||||
GetID() string
|
||||
}
|
||||
|
||||
type Table[T IDStruct] interface {
|
||||
Get(ID string) (data T, err error)
|
||||
Insert(data T) error
|
||||
Update(data T) error
|
||||
Remove(ID string)
|
||||
}
|
||||
|
||||
type CrashTable interface {
|
||||
Table[CrashReport]
|
||||
InsertCrash(report IndividualCrash) error
|
||||
}
|
||||
Reference in New Issue
Block a user