summaryrefslogtreecommitdiff
path: root/internal/model/mutations.go
diff options
context:
space:
mode:
authorNeonXP <i@neonxp.dev>2023-01-04 18:44:58 +0300
committerNeonXP <i@neonxp.dev>2023-01-04 18:44:58 +0300
commit8716ac3e650075525cab7fb5caf1aa62b3efe55b (patch)
treef34dcb33400ef6bfd7f01b55a04f59784505c506 /internal/model/mutations.go
parente91712e388c530dd5bdfb46f028157a62a60b1e3 (diff)
rewriteHEADmaster
Diffstat (limited to 'internal/model/mutations.go')
-rw-r--r--internal/model/mutations.go36
1 files changed, 0 insertions, 36 deletions
diff --git a/internal/model/mutations.go b/internal/model/mutations.go
deleted file mode 100644
index 6463823..0000000
--- a/internal/model/mutations.go
+++ /dev/null
@@ -1,36 +0,0 @@
-package model
-
-import (
- "fmt"
- "strings"
- "time"
-
- "go.neonxp.dev/json/model"
-)
-
-type Mutation struct {
- Date time.Time
- Type CommandType
- Path []string
- Body model.Node
-}
-
-func (m *Mutation) String() string {
- body, _ := m.Body.MarshalJSON()
- return fmt.Sprintf(
- "Date=%s Type=%s Path='%s' Body=%s",
- m.Date.Format(time.RFC3339),
- m.Type,
- strings.Join(m.Path, "/"),
- string(body),
- )
-}
-
-//go:generate stringer -type=CommandType
-type CommandType int
-
-const (
- Create CommandType = iota
- Merge
- Remove
-)