From a4c8020d109055261a488c67245bd85bd9506863 Mon Sep 17 00:00:00 2001 From: Justin Cichra <1342149+jrcichra@users.noreply.github.com> Date: Sun, 24 Jul 2022 10:33:39 -0400 Subject: [PATCH] json types --- internal/types/types.go | 62 ++++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/internal/types/types.go b/internal/types/types.go index 8da1f67..a9cbe90 100644 --- a/internal/types/types.go +++ b/internal/types/types.go @@ -21,62 +21,62 @@ type MidiCSVRecord struct { // } type NoteOn struct { - Time time.Time - Channel uint8 - Key uint8 - Velocity uint8 + Time time.Time `json:"time"` + Channel uint8 `json:"channel"` + Key uint8 `json:"key"` + Velocity uint8 `json:"velocity"` } type NoteOff struct { - Time time.Time - Channel uint8 - Key uint8 + Time time.Time `json:"time"` + Channel uint8 `json:"channel"` + Key uint8 `json:"key"` } type ProgramChange struct { - Time time.Time - Channel uint8 - Program uint8 + Time time.Time `json:"time"` + Channel uint8 `json:"channel"` + Program uint8 `json:"program"` } type Aftertouch struct { - Time time.Time - Channel uint8 - Pressure uint8 + Time time.Time `json:"time"` + Channel uint8 `json:"channel"` + Pressure uint8 `json:"pressure"` } type ControlChange struct { - Time time.Time - Channel uint8 - Controller uint8 - Value uint8 + Time time.Time `json:"time"` + Channel uint8 `json:"channel"` + Controller uint8 `json:"controller"` + Value uint8 `json:"value"` } type NoteOffVelocity struct { - Time time.Time - Channel uint8 - Key uint8 - Velocity uint8 + Time time.Time `json:"time"` + Channel uint8 `json:"channel"` + Key uint8 `json:"key"` + Velocity uint8 `json:"velocity"` } type Pitchbend struct { - Time time.Time - Channel uint8 - Value int16 - AbsValue uint16 + Time time.Time `json:"time"` + Channel uint8 `json:"channel"` + Value int16 `json:"value"` + AbsValue uint16 `json:"absvalue"` } type PolyAftertouch struct { - Time time.Time - Channel uint8 - Key uint8 - Pressure uint8 + Time time.Time `json:"time"` + Channel uint8 `json:"channel"` + Key uint8 `json:"key"` + Pressure uint8 `json:"pressure"` } // Raw sends raw bytes to the server type Raw struct { - Time time.Time - Data []byte + Time time.Time `json:"time"` + Data []byte `json:"data"` } // Get around gob types