mirror of https://github.com/hashicorp/consul
56 lines
1.6 KiB
Go
56 lines
1.6 KiB
Go
|
// Code generated by protoc-json-shim. DO NOT EDIT.
|
||
|
package catalogv2beta1
|
||
|
|
||
|
import (
|
||
|
protojson "google.golang.org/protobuf/encoding/protojson"
|
||
|
)
|
||
|
|
||
|
// MarshalJSON is a custom marshaler for Workload
|
||
|
func (this *Workload) MarshalJSON() ([]byte, error) {
|
||
|
str, err := WorkloadMarshaler.Marshal(this)
|
||
|
return []byte(str), err
|
||
|
}
|
||
|
|
||
|
// UnmarshalJSON is a custom unmarshaler for Workload
|
||
|
func (this *Workload) UnmarshalJSON(b []byte) error {
|
||
|
return WorkloadUnmarshaler.Unmarshal(b, this)
|
||
|
}
|
||
|
|
||
|
// MarshalJSON is a custom marshaler for WorkloadAddress
|
||
|
func (this *WorkloadAddress) MarshalJSON() ([]byte, error) {
|
||
|
str, err := WorkloadMarshaler.Marshal(this)
|
||
|
return []byte(str), err
|
||
|
}
|
||
|
|
||
|
// UnmarshalJSON is a custom unmarshaler for WorkloadAddress
|
||
|
func (this *WorkloadAddress) UnmarshalJSON(b []byte) error {
|
||
|
return WorkloadUnmarshaler.Unmarshal(b, this)
|
||
|
}
|
||
|
|
||
|
// MarshalJSON is a custom marshaler for WorkloadPort
|
||
|
func (this *WorkloadPort) MarshalJSON() ([]byte, error) {
|
||
|
str, err := WorkloadMarshaler.Marshal(this)
|
||
|
return []byte(str), err
|
||
|
}
|
||
|
|
||
|
// UnmarshalJSON is a custom unmarshaler for WorkloadPort
|
||
|
func (this *WorkloadPort) UnmarshalJSON(b []byte) error {
|
||
|
return WorkloadUnmarshaler.Unmarshal(b, this)
|
||
|
}
|
||
|
|
||
|
// MarshalJSON is a custom marshaler for Locality
|
||
|
func (this *Locality) MarshalJSON() ([]byte, error) {
|
||
|
str, err := WorkloadMarshaler.Marshal(this)
|
||
|
return []byte(str), err
|
||
|
}
|
||
|
|
||
|
// UnmarshalJSON is a custom unmarshaler for Locality
|
||
|
func (this *Locality) UnmarshalJSON(b []byte) error {
|
||
|
return WorkloadUnmarshaler.Unmarshal(b, this)
|
||
|
}
|
||
|
|
||
|
var (
|
||
|
WorkloadMarshaler = &protojson.MarshalOptions{}
|
||
|
WorkloadUnmarshaler = &protojson.UnmarshalOptions{DiscardUnknown: false}
|
||
|
)
|