Skip to content

Commit

Permalink
formatted buf files
Browse files Browse the repository at this point in the history
  • Loading branch information
tomvodi committed Sep 11, 2024
1 parent f161630 commit 7885bcc
Show file tree
Hide file tree
Showing 21 changed files with 64 additions and 44 deletions.
3 changes: 2 additions & 1 deletion proto/musicmodel/v1/barline/barline.proto
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
syntax = "proto3";
package musicmodel.v1.barline;

option go_package = "barline";

enum Type {
Expand All @@ -16,7 +17,7 @@ enum Time {
Dalsegno = 2;
Fine = 3;
DacapoAlFine = 4;
Repeat = 5;// a normal |: ... :| repeat lines
Repeat = 5; // a normal |: ... :| repeat lines
}

message Barline {
Expand Down
3 changes: 2 additions & 1 deletion proto/musicmodel/v1/boundary/boundary.proto
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
syntax = "proto3";
package musicmodel.v1.boundary;

option go_package = "boundary";

enum Boundary {
NoBoundary = 0;
Start = 1;
End = 2;
}
}
3 changes: 2 additions & 1 deletion proto/musicmodel/v1/length/length.proto
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
syntax = "proto3";
package musicmodel.v1.length;

option go_package = "length";

enum Length {
Expand All @@ -10,4 +11,4 @@ enum Length {
Eighth = 4;
Sixteenth = 5;
Thirtysecond = 6;
}
}
3 changes: 2 additions & 1 deletion proto/musicmodel/v1/measure/import_message.proto
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
syntax = "proto3";
package musicmodel.v1.measure;

option go_package = "measure";

enum Severity {
Expand All @@ -19,4 +20,4 @@ message ImportMessage {
Severity severity = 2;
string text = 3;
Fix fix = 4;
}
}
7 changes: 4 additions & 3 deletions proto/musicmodel/v1/measure/measure.proto
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
syntax = "proto3";
package musicmodel.v1.measure;
option go_package = "measure";

import "musicmodel/v1/barline/barline.proto";
import "musicmodel/v1/measure/time_signature.proto";
import "musicmodel/v1/measure/import_message.proto";
import "musicmodel/v1/measure/time_signature.proto";
import "musicmodel/v1/symbols/symbol.proto";

option go_package = "measure";

message Measure {
barline.Barline left_barline = 1;
barline.Barline right_barline = 2;
Expand All @@ -15,4 +16,4 @@ message Measure {
repeated string comments = 5;
repeated string inline_text = 6;
repeated measure.ImportMessage import_messages = 7;
}
}
1 change: 1 addition & 0 deletions proto/musicmodel/v1/measure/time_signature.proto
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
syntax = "proto3";
package musicmodel.v1.measure;

option go_package = "measure";

message TimeSignature {
Expand Down
3 changes: 2 additions & 1 deletion proto/musicmodel/v1/pitch/pitch.proto
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
syntax = "proto3";
package musicmodel.v1.pitch;

option go_package = "pitch";

enum Pitch {
Expand All @@ -13,4 +14,4 @@ enum Pitch {
F = 7;
HighG = 8;
HighA = 9;
}
}
3 changes: 2 additions & 1 deletion proto/musicmodel/v1/symbols/accidental/accidental.proto
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
syntax = "proto3";
package musicmodel.v1.symbols.accidental;

option go_package = "accidental";

enum Accidental {
NoAccidental = 0;
Sharp = 1;
Flat = 2;
Natural = 3;
}
}
5 changes: 3 additions & 2 deletions proto/musicmodel/v1/symbols/embellishment/embellishment.proto
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
syntax = "proto3";
package musicmodel.v1.symbols.embellishment;
option go_package = "embellishment";

import "musicmodel/v1/pitch/pitch.proto";

option go_package = "embellishment";

enum Type {
NoEmbellishment = 0;
SingleGrace = 1;
Expand Down Expand Up @@ -48,4 +49,4 @@ message Embellishment {
pitch.Pitch pitch = 2;
Variant variant = 3;
Weight weight = 4;
}
}
5 changes: 3 additions & 2 deletions proto/musicmodel/v1/symbols/movement/movement.proto
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
syntax = "proto3";
package musicmodel.v1.symbols.movement;
option go_package = "movement";

import "musicmodel/v1/pitch/pitch.proto";

option go_package = "movement";

enum Type {
NoMovement = 0;
Cadence = 1;
Expand Down Expand Up @@ -61,4 +62,4 @@ message Movement {

bool breabach = 9;
bool a_mach = 10;
}
}
9 changes: 5 additions & 4 deletions proto/musicmodel/v1/symbols/note.proto
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
syntax = "proto3";
package musicmodel.v1.symbols;
option go_package = "symbols";

import "musicmodel/v1/pitch/pitch.proto";
import "musicmodel/v1/length/length.proto";
import "musicmodel/v1/pitch/pitch.proto";
import "musicmodel/v1/symbols/accidental/accidental.proto";
import "musicmodel/v1/symbols/tie/tie.proto";
import "musicmodel/v1/symbols/embellishment/embellishment.proto";
import "musicmodel/v1/symbols/movement/movement.proto";
import "musicmodel/v1/symbols/tie/tie.proto";

option go_package = "symbols";

message Note {
pitch.Pitch pitch = 1;
Expand All @@ -19,4 +20,4 @@ message Note {
embellishment.Embellishment embellishment = 7;
movement.Movement movement = 8;
string comment = 9;
}
}
5 changes: 3 additions & 2 deletions proto/musicmodel/v1/symbols/rest.proto
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
syntax = "proto3";
package musicmodel.v1.symbols;
option go_package = "symbols";

import "musicmodel/v1/length/length.proto";

option go_package = "symbols";

message Rest {
length.Length length = 1;
}
}
11 changes: 6 additions & 5 deletions proto/musicmodel/v1/symbols/symbol.proto
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
syntax = "proto3";
package musicmodel.v1.symbols;
option go_package = "symbols";

import "musicmodel/v1/symbols/note.proto";
import "musicmodel/v1/symbols/rest.proto";
import "musicmodel/v1/symbols/tuplet/tuplet.proto";
import "musicmodel/v1/symbols/timeline/timeline.proto";
import "musicmodel/v1/symbols/tuplet/tuplet.proto";

option go_package = "symbols";

/* A Symbol represents a musical symbol.
* It can be a Note or a Rest.
* Symbol doesn't use the oneof pattern because it is not makes the resulting structs
* in Go too nested.
* It can be a Note or a Rest.
* Symbol doesn't use the oneof pattern because it is not makes the resulting structs
* in Go too nested.
*/
message Symbol {
optional symbols.Note note = 1;
Expand Down
3 changes: 2 additions & 1 deletion proto/musicmodel/v1/symbols/tie/tie.proto
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
syntax = "proto3";
package musicmodel.v1.symbols.tie;

option go_package = "tie";

enum Tie {
NoTie = 0;
Start = 1;
End = 2;
}
}
5 changes: 3 additions & 2 deletions proto/musicmodel/v1/symbols/timeline/timeline.proto
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
syntax = "proto3";
package musicmodel.v1.symbols.timeline;
option go_package = "timeline";

import "musicmodel/v1/boundary/boundary.proto";

option go_package = "timeline";

enum Type {
NoType = 0;
First = 1;
Expand All @@ -25,4 +26,4 @@ enum Type {
message TimeLine {
Type type = 1;
boundary.Boundary boundary_type = 2;
}
}
5 changes: 3 additions & 2 deletions proto/musicmodel/v1/symbols/tuplet/tuplet.proto
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
syntax = "proto3";
package musicmodel.v1.symbols.tuplet;
option go_package = "tuplet";

import "musicmodel/v1/boundary/boundary.proto";

option go_package = "tuplet";

message Tuplet {
boundary.Boundary boundary_type = 1;
uint32 visible_notes = 2;
uint32 played_notes = 3;
}
}
3 changes: 2 additions & 1 deletion proto/musicmodel/v1/tune/tune.proto
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
syntax = "proto3";
package musicmodel.v1.tune;
option go_package = "tune";

import "musicmodel/v1/measure/measure.proto";

option go_package = "tune";

message Tune {
string title = 1;
string type = 2;
Expand Down
3 changes: 2 additions & 1 deletion proto/plugin/v1/fileformat/fileformat.proto
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
syntax = "proto3";
package plugin.v1.fileformat;

option go_package = "fileformat";

// Format of the file.
Expand All @@ -20,4 +21,4 @@ enum Format {

// ABC format
ABC = 4;
}
}
9 changes: 5 additions & 4 deletions proto/plugin/v1/messages/import.proto
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
syntax = "proto3";
package plugin.v1.messages;
option go_package = "messages";

import "musicmodel/v1/tune/tune.proto";

option go_package = "messages";

message ImportedTune {
// The tune that was imported.
musicmodel.v1.tune.Tune tune = 1;
Expand All @@ -16,8 +17,8 @@ message ImportedTune {

message ImportFileRequest {
oneof import_file {
string file_path = 1; // Import a local file
bytes file_data = 2; // Import a file from data
string file_path = 1; // Import a local file
bytes file_data = 2; // Import a file from data
}
}

Expand All @@ -26,4 +27,4 @@ message ImportFileResponse {
// In multi tune file formats like bww, this will contain all the tunes in the file.
// For single tune file formats like MusicXML, this will contain a single tune.
repeated ImportedTune imported_tunes = 1;
}
}
8 changes: 4 additions & 4 deletions proto/plugin/v1/messages/info.proto
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
syntax = "proto3";
package plugin.v1.messages;
option go_package = "messages";

import "plugin/v1/fileformat/fileformat.proto";

option go_package = "messages";

enum PluginType {
Unknown = 0;
IN = 1;
OUT = 2;
INOUT = 3;
}

message PluginInfoRequest {
}
message PluginInfoRequest {}

message PluginInfoResponse {
string name = 1; // Name of the plugin
Expand All @@ -26,4 +26,4 @@ message PluginInfoResponse {

// File extension names that the plugin can parse and/or write (e.g. ".bww", ".ly")
repeated string file_extensions = 5;
}
}
11 changes: 6 additions & 5 deletions proto/plugin/v1/plugin.proto
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
syntax = "proto3";
package plugin.v1;
option go_package = "plugin";

import "plugin/v1/messages/info.proto";
import "plugin/v1/messages/import.proto";
import "plugin/v1/messages/info.proto";

option go_package = "plugin";

service PluginService {
rpc PluginInfo (v1.messages.PluginInfoRequest) returns (v1.messages.PluginInfoResponse) {}
rpc PluginInfo(v1.messages.PluginInfoRequest) returns (v1.messages.PluginInfoResponse) {}

// ImportFile imports a file into the plugin
// When the filetype is not supported by the plugin it returns an UNIMPLEMENTED error
rpc ImportFile (v1.messages.ImportFileRequest) returns (v1.messages.ImportFileResponse) {}
}
rpc ImportFile(v1.messages.ImportFileRequest) returns (v1.messages.ImportFileResponse) {}
}

0 comments on commit 7885bcc

Please sign in to comment.