Skip to content

Commit

Permalink
Add json.RawMessage to model DifferentialProperties (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
raynor85 authored Feb 7, 2024
1 parent ec62009 commit d58a851
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions entities/differential.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
package entities

import "github.com/thought-machine/gonduit/util"
import (
"encoding/json"

"github.com/thought-machine/gonduit/util"
)

// DifferentialRevision represents a revision in Differential.
type DifferentialRevision struct {
Expand Down Expand Up @@ -43,7 +47,7 @@ type DifferentialDiff struct {
UnitStatus string `json:"unitStatus"`
LintStatus string `json:"lintStatus"`
Changes []DifferentialChange `json:"changes"`
Properties interface{} `json:"properties"`
Properties json.RawMessage `json:"properties"`
AuthorName string `json:"authorName"`
AuthorEmail string `json:"authorEmail"`
}
Expand All @@ -70,6 +74,18 @@ type DifferentialHunk struct {
Corpus string `json:"corpus"`
}

// A DifferentialProperties contains dynamic metadata about the Diff.
type DifferentialProperties struct {
ArcOnto []DifferentialArcOnto `json:"arc:onto"`
}

// A DifferentialArcOnto contains a branch destination set with arc.
type DifferentialArcOnto struct {
Type string `json:"type"`
Name string `json:"name"`
Kind string `json:"kind"`
}

// A DifferentialRawDiff is a raw diff.
type DifferentialRawDiff struct {
Diff string `json:"diff"`
Expand Down

0 comments on commit d58a851

Please sign in to comment.