summaryrefslogtreecommitdiff
path: root/file.marshal.pb.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-01-13 08:20:51 -0600
committerJeff Carr <[email protected]>2025-01-13 08:20:51 -0600
commit3b61fef227b3c88495e7f2c4367b5df62a761502 (patch)
treefe6e4a247b2d3b42c8b586b7ce0d30c671acf338 /file.marshal.pb.go
parent81d6cd6b74fa4b4c94ec13bf02c5b9ac768d36d6 (diff)
mutex testingv0.0.43
Diffstat (limited to 'file.marshal.pb.go')
-rw-r--r--file.marshal.pb.go91
1 files changed, 91 insertions, 0 deletions
diff --git a/file.marshal.pb.go b/file.marshal.pb.go
new file mode 100644
index 0000000..fd6d505
--- /dev/null
+++ b/file.marshal.pb.go
@@ -0,0 +1,91 @@
+// Code generated by go.wit.com/apps/autogenpb DO NOT EDIT.
+// This file was autogenerated with autogenpb v0.0.42-1-gf74f364 2025.01.13_0345
+// go install go.wit.com/apps/autogenpb@latest
+//
+// define which structs (messages) you want to use in the .proto file
+// Then sort.pb.go and marshal.pb.go files are autogenerated
+//
+// autogenpb uses it and has an example .proto file with instructions
+//
+
+package main
+
+import (
+ "google.golang.org/protobuf/encoding/protojson"
+ "google.golang.org/protobuf/encoding/prototext"
+ "google.golang.org/protobuf/proto"
+)
+
+// human readable JSON
+func (v *Files) FormatJSON() string {
+ return protojson.Format(v)
+}
+
+// marshal json
+func (v *Files) MarshalJSON() ([]byte, error) {
+ return protojson.Marshal(v)
+}
+
+// unmarshal json
+func (v *Files) UnmarshalJSON(data []byte) error {
+ return protojson.Unmarshal(data, v)
+}
+
+// apparently this isn't stable, but it's awesomely better
+// https://protobuf.dev/reference/go/faq/#unstable-text
+// it's brilliant for config files!
+func (v *Files) FormatTEXT() string {
+ return prototext.Format(v)
+}
+
+// unmarshalTEXT. This reads the .text config file back in after the user edits it
+func (v *Files) UnmarshalTEXT(data []byte) error {
+ return prototext.Unmarshal(data, v)
+}
+
+// marshal to wire. This is called winning.
+func (v *Files) Marshal() ([]byte, error) {
+ return proto.Marshal(v)
+}
+
+// unmarshal from wire. You have won.
+func (v *Files) Unmarshal(data []byte) error {
+ return proto.Unmarshal(data, v)
+}
+
+// human readable JSON
+func (v *Identify) FormatJSON() string {
+ return protojson.Format(v)
+}
+
+// marshal json
+func (v *Identify) MarshalJSON() ([]byte, error) {
+ return protojson.Marshal(v)
+}
+
+// unmarshal json
+func (v *Identify) UnmarshalJSON(data []byte) error {
+ return protojson.Unmarshal(data, v)
+}
+
+// apparently this isn't stable, but it's awesomely better
+// https://protobuf.dev/reference/go/faq/#unstable-text
+// it's brilliant for config files!
+func (v *Identify) FormatTEXT() string {
+ return prototext.Format(v)
+}
+
+// unmarshalTEXT. This reads the .text config file back in after the user edits it
+func (v *Identify) UnmarshalTEXT(data []byte) error {
+ return prototext.Unmarshal(data, v)
+}
+
+// marshal to wire. This is called winning.
+func (v *Identify) Marshal() ([]byte, error) {
+ return proto.Marshal(v)
+}
+
+// unmarshal from wire. You have won.
+func (v *Identify) Unmarshal(data []byte) error {
+ return proto.Unmarshal(data, v)
+}