Skip to content

Commit

Permalink
decouple net from client.DB
Browse files Browse the repository at this point in the history
  • Loading branch information
fredcarle committed Jun 25, 2024
1 parent acdf356 commit d0dee58
Show file tree
Hide file tree
Showing 31 changed files with 2,019 additions and 1,830 deletions.
5 changes: 5 additions & 0 deletions client/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,11 @@ type Store interface {
// Backup holds the backup related methods that must be implemented by the database.
Backup

// P2P contains functions related to the P2P system.
//
// These functions are only useful if there is a configure network peer.
P2P

// AddSchema takes the provided GQL schema in SDL format, and applies it to the [Store],
// creating the necessary collections, request types, etc.
//
Expand Down
1 change: 1 addition & 0 deletions client/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ var (
ErrCanNotNormalizeValue = errors.New(errCanNotNormalizeValue)
ErrCanNotTurnNormalValueIntoArray = errors.New(errCanNotTurnNormalValueIntoArray)
ErrCanNotMakeNormalNilFromFieldKind = errors.New(errCanNotMakeNormalNilFromFieldKind)
ErrCollectionNotFound = errors.New(errCollectionNotFound)
)

// NewErrFieldNotExist returns an error indicating that the given field does not exist.
Expand Down
323 changes: 323 additions & 0 deletions client/mocks/db.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d0dee58

Please sign in to comment.