summaryrefslogtreecommitdiff
path: root/auto.marshal.pb.go
diff options
context:
space:
mode:
Diffstat (limited to 'auto.marshal.pb.go')
-rw-r--r--auto.marshal.pb.go93
1 files changed, 93 insertions, 0 deletions
diff --git a/auto.marshal.pb.go b/auto.marshal.pb.go
new file mode 100644
index 0000000..3a3d8ca
--- /dev/null
+++ b/auto.marshal.pb.go
@@ -0,0 +1,93 @@
+// Code generated by go.wit.com/apps/autogenpb DO NOT EDIT.
+// This file was autogenerated with autogenpb v0.5.14 2025-09-28_00:11:07_UTC
+// 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 prep
+
+import (
+ "google.golang.org/protobuf/encoding/protojson"
+ "google.golang.org/protobuf/encoding/prototext"
+ "google.golang.org/protobuf/proto"
+)
+
+// human readable JSON
+func (v *Autos) FormatJSON() string {
+ return protojson.Format(v)
+}
+
+// marshal json
+func (v *Autos) MarshalJSON() ([]byte, error) {
+ return protojson.Marshal(v)
+}
+
+// unmarshal json
+func (v *Autos) 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 *Autos) FormatTEXT() string {
+ v.fixUuid()
+ return prototext.Format(v)
+}
+
+// unmarshalTEXT. This reads the .text config file back in after the user edits it
+func (v *Autos) UnmarshalTEXT(data []byte) error {
+ return prototext.Unmarshal(data, v)
+}
+
+// marshal to wire. This is called winning.
+func (v *Autos) Marshal() ([]byte, error) {
+ v.fixUuid()
+ return proto.Marshal(v)
+}
+
+// unmarshal from wire. You have won.
+func (v *Autos) Unmarshal(data []byte) error {
+ return proto.Unmarshal(data, v)
+}
+
+// human readable JSON
+func (v *Auto) FormatJSON() string {
+ return protojson.Format(v)
+}
+
+// marshal json
+func (v *Auto) MarshalJSON() ([]byte, error) {
+ return protojson.Marshal(v)
+}
+
+// unmarshal json
+func (v *Auto) 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 *Auto) FormatTEXT() string {
+ return prototext.Format(v)
+}
+
+// unmarshalTEXT. This reads the .text config file back in after the user edits it
+func (v *Auto) UnmarshalTEXT(data []byte) error {
+ return prototext.Unmarshal(data, v)
+}
+
+// marshal to wire. This is called winning.
+func (v *Auto) Marshal() ([]byte, error) {
+ return proto.Marshal(v)
+}
+
+// unmarshal from wire. You have won.
+func (v *Auto) Unmarshal(data []byte) error {
+ return proto.Unmarshal(data, v)
+}