mirror of
https://github.com/hanzoai/ca.git
synced 2026-11-03 18:08:27 +00:00
71 lines
1.8 KiB
Go
71 lines
1.8 KiB
Go
// Code generated by protoc-gen-go-json. DO NOT EDIT.
|
|
// source: admin.proto
|
|
|
|
package privpb
|
|
|
|
import (
|
|
"encoding/json"
|
|
|
|
"google.golang.org/protobuf/encoding/protojson"
|
|
)
|
|
|
|
var JsonMarshalOptions = protojson.MarshalOptions{
|
|
UseEnumNumbers: true,
|
|
EmitUnpopulated: false,
|
|
UseProtoNames: true,
|
|
AllowPartial: true,
|
|
}
|
|
|
|
var JsonUnmarshalOptions = protojson.UnmarshalOptions{
|
|
AllowPartial: true,
|
|
DiscardUnknown: true,
|
|
}
|
|
|
|
// MarshalJSON implements json.Marshaler
|
|
func MarshalJSON(v any) ([]byte, error) {
|
|
if JsonMarshalOptions.Multiline {
|
|
return json.MarshalIndent(v, "", JsonMarshalOptions.Indent)
|
|
}
|
|
return json.Marshal(v)
|
|
}
|
|
|
|
// MarshalJSON implements json.Marshaler
|
|
func (msg *ListOrgsRequest) MarshalJSON() ([]byte, error) {
|
|
return JsonMarshalOptions.Marshal(msg)
|
|
}
|
|
|
|
// UnmarshalJSON implements json.Unmarshaler
|
|
func (msg *ListOrgsRequest) UnmarshalJSON(b []byte) error {
|
|
return JsonUnmarshalOptions.Unmarshal(b, msg)
|
|
}
|
|
|
|
// MarshalJSON implements json.Marshaler
|
|
func (msg *ListProjectsRequest) MarshalJSON() ([]byte, error) {
|
|
return JsonMarshalOptions.Marshal(msg)
|
|
}
|
|
|
|
// UnmarshalJSON implements json.Unmarshaler
|
|
func (msg *ListProjectsRequest) UnmarshalJSON(b []byte) error {
|
|
return JsonUnmarshalOptions.Unmarshal(b, msg)
|
|
}
|
|
|
|
// MarshalJSON implements json.Marshaler
|
|
func (msg *ListAllIssuersRequest) MarshalJSON() ([]byte, error) {
|
|
return JsonMarshalOptions.Marshal(msg)
|
|
}
|
|
|
|
// UnmarshalJSON implements json.Unmarshaler
|
|
func (msg *ListAllIssuersRequest) UnmarshalJSON(b []byte) error {
|
|
return JsonUnmarshalOptions.Unmarshal(b, msg)
|
|
}
|
|
|
|
// MarshalJSON implements json.Marshaler
|
|
func (msg *ListAllCertificatesRequest) MarshalJSON() ([]byte, error) {
|
|
return JsonMarshalOptions.Marshal(msg)
|
|
}
|
|
|
|
// UnmarshalJSON implements json.Unmarshaler
|
|
func (msg *ListAllCertificatesRequest) UnmarshalJSON(b []byte) error {
|
|
return JsonUnmarshalOptions.Unmarshal(b, msg)
|
|
}
|