protobuf
This commit is contained in:
@@ -0,0 +1,189 @@
|
||||
package wrapperspb
|
||||
|
||||
import (
|
||||
"encoding/base64"
|
||||
"errors"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
func Double(value float64) *DoubleValue {
|
||||
return &DoubleValue{Value: value}
|
||||
}
|
||||
|
||||
func Float(value float32) *FloatValue {
|
||||
return &FloatValue{Value: value}
|
||||
}
|
||||
|
||||
func Int64(value int64) *Int64Value {
|
||||
return &Int64Value{Value: value}
|
||||
}
|
||||
|
||||
func UInt64(value uint64) *UInt64Value {
|
||||
return &UInt64Value{Value: value}
|
||||
}
|
||||
|
||||
func Int32(value int32) *Int32Value {
|
||||
return &Int32Value{Value: value}
|
||||
}
|
||||
|
||||
func UInt32(value uint32) *UInt32Value {
|
||||
return &UInt32Value{Value: value}
|
||||
}
|
||||
|
||||
func Bool(value bool) *BoolValue {
|
||||
return &BoolValue{Value: value}
|
||||
}
|
||||
|
||||
func String(value string) *StringValue {
|
||||
return &StringValue{Value: value}
|
||||
}
|
||||
|
||||
func Bytes(value []byte) *BytesValue {
|
||||
return &BytesValue{Value: value}
|
||||
}
|
||||
|
||||
func (m *DoubleValue) UnmarshalJSON(p []byte) error {
|
||||
value, err := strconv.ParseFloat(string(p), 64)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
m.Value = value
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *DoubleValue) MarshalJSON() ([]byte, error) {
|
||||
if m == nil {
|
||||
return []byte("null"), nil
|
||||
}
|
||||
return []byte(strconv.FormatFloat(m.Value, 'f', -1, 64)), nil
|
||||
}
|
||||
|
||||
func (m *FloatValue) UnmarshalJSON(p []byte) error {
|
||||
value, err := strconv.ParseFloat(string(p), 64)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
m.Value = float32(value)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *FloatValue) MarshalJSON() ([]byte, error) {
|
||||
if m == nil {
|
||||
return []byte("null"), nil
|
||||
}
|
||||
return []byte(strconv.FormatFloat(float64(m.Value), 'f', -1, 32)), nil
|
||||
}
|
||||
|
||||
func (m *Int64Value) UnmarshalJSON(p []byte) error {
|
||||
value, err := strconv.ParseInt(string(p), 10, 64)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
m.Value = value
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Int64Value) MarshalJSON() ([]byte, error) {
|
||||
if m == nil {
|
||||
return []byte("null"), nil
|
||||
}
|
||||
return []byte(strconv.FormatInt(m.Value, 10)), nil
|
||||
}
|
||||
|
||||
func (m *UInt64Value) UnmarshalJSON(p []byte) error {
|
||||
value, err := strconv.ParseUint(string(p), 10, 64)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
m.Value = value
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *UInt64Value) MarshalJSON() ([]byte, error) {
|
||||
if m == nil {
|
||||
return []byte("null"), nil
|
||||
}
|
||||
return []byte(strconv.FormatUint(m.Value, 10)), nil
|
||||
}
|
||||
|
||||
func (m *Int32Value) UnmarshalJSON(p []byte) error {
|
||||
value, err := strconv.ParseInt(string(p), 10, 32)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
m.Value = int32(value)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Int32Value) MarshalJSON() ([]byte, error) {
|
||||
if m == nil {
|
||||
return []byte("null"), nil
|
||||
}
|
||||
return []byte(strconv.FormatInt(int64(m.Value), 10)), nil
|
||||
}
|
||||
|
||||
func (m *UInt32Value) UnmarshalJSON(p []byte) error {
|
||||
value, err := strconv.ParseUint(string(p), 10, 32)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
m.Value = uint32(value)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *UInt32Value) MarshalJSON() ([]byte, error) {
|
||||
if m == nil {
|
||||
return []byte("null"), nil
|
||||
}
|
||||
return []byte(strconv.FormatUint(uint64(m.Value), 10)), nil
|
||||
}
|
||||
|
||||
func (m *BoolValue) UnmarshalJSON(p []byte) error {
|
||||
value, err := strconv.ParseBool(string(p))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
m.Value = value
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *BoolValue) MarshalJSON() ([]byte, error) {
|
||||
if m == nil {
|
||||
return []byte("null"), nil
|
||||
}
|
||||
return []byte(strconv.FormatBool(m.Value)), nil
|
||||
}
|
||||
|
||||
func (m *StringValue) UnmarshalJSON(p []byte) error {
|
||||
if len(p) < 2 || p[0] != '"' || p[len(p)-1] != '"' {
|
||||
return errors.New("invalid string value")
|
||||
}
|
||||
m.Value = string(p[1 : len(p)-1])
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *StringValue) MarshalJSON() ([]byte, error) {
|
||||
if m == nil {
|
||||
return []byte("null"), nil
|
||||
}
|
||||
return []byte(`"` + m.Value + `"`), nil
|
||||
}
|
||||
|
||||
func (m *BytesValue) UnmarshalJSON(p []byte) error {
|
||||
if len(p) < 2 || p[0] != '"' || p[len(p)-1] != '"' {
|
||||
return errors.New("invalid bytes value")
|
||||
}
|
||||
value, err := base64.StdEncoding.DecodeString(string(p[1 : len(p)-1]))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
m.Value = value
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *BytesValue) MarshalJSON() ([]byte, error) {
|
||||
if m == nil {
|
||||
return []byte("null"), nil
|
||||
}
|
||||
return []byte(`"` + base64.StdEncoding.EncodeToString(m.Value) + `"`), nil
|
||||
}
|
||||
@@ -0,0 +1,430 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: wrapperspb/wrapperspb.proto
|
||||
|
||||
package wrapperspb // import "OpenIM/pkg/proto/wrapperspb"
|
||||
|
||||
import proto "github.com/golang/protobuf/proto"
|
||||
import fmt "fmt"
|
||||
import math "math"
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
|
||||
|
||||
// Wrapper message for `double`.
|
||||
//
|
||||
// The JSON representation for `DoubleValue` is JSON number.
|
||||
type DoubleValue struct {
|
||||
// The double value.
|
||||
Value float64 `protobuf:"fixed64,1,opt,name=value" json:"value,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *DoubleValue) Reset() { *m = DoubleValue{} }
|
||||
func (m *DoubleValue) String() string { return proto.CompactTextString(m) }
|
||||
func (*DoubleValue) ProtoMessage() {}
|
||||
func (*DoubleValue) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_wrapperspb_a03431133ed99282, []int{0}
|
||||
}
|
||||
func (m *DoubleValue) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_DoubleValue.Unmarshal(m, b)
|
||||
}
|
||||
func (m *DoubleValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_DoubleValue.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (dst *DoubleValue) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_DoubleValue.Merge(dst, src)
|
||||
}
|
||||
func (m *DoubleValue) XXX_Size() int {
|
||||
return xxx_messageInfo_DoubleValue.Size(m)
|
||||
}
|
||||
func (m *DoubleValue) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_DoubleValue.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_DoubleValue proto.InternalMessageInfo
|
||||
|
||||
func (m *DoubleValue) GetValue() float64 {
|
||||
if m != nil {
|
||||
return m.Value
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// Wrapper message for `float`.
|
||||
//
|
||||
// The JSON representation for `FloatValue` is JSON number.
|
||||
type FloatValue struct {
|
||||
// The float value.
|
||||
Value float32 `protobuf:"fixed32,1,opt,name=value" json:"value,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *FloatValue) Reset() { *m = FloatValue{} }
|
||||
func (m *FloatValue) String() string { return proto.CompactTextString(m) }
|
||||
func (*FloatValue) ProtoMessage() {}
|
||||
func (*FloatValue) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_wrapperspb_a03431133ed99282, []int{1}
|
||||
}
|
||||
func (m *FloatValue) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_FloatValue.Unmarshal(m, b)
|
||||
}
|
||||
func (m *FloatValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_FloatValue.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (dst *FloatValue) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_FloatValue.Merge(dst, src)
|
||||
}
|
||||
func (m *FloatValue) XXX_Size() int {
|
||||
return xxx_messageInfo_FloatValue.Size(m)
|
||||
}
|
||||
func (m *FloatValue) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_FloatValue.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_FloatValue proto.InternalMessageInfo
|
||||
|
||||
func (m *FloatValue) GetValue() float32 {
|
||||
if m != nil {
|
||||
return m.Value
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// Wrapper message for `int64`.
|
||||
//
|
||||
// The JSON representation for `Int64Value` is JSON string.
|
||||
type Int64Value struct {
|
||||
// The int64 value.
|
||||
Value int64 `protobuf:"varint,1,opt,name=value" json:"value,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Int64Value) Reset() { *m = Int64Value{} }
|
||||
func (m *Int64Value) String() string { return proto.CompactTextString(m) }
|
||||
func (*Int64Value) ProtoMessage() {}
|
||||
func (*Int64Value) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_wrapperspb_a03431133ed99282, []int{2}
|
||||
}
|
||||
func (m *Int64Value) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Int64Value.Unmarshal(m, b)
|
||||
}
|
||||
func (m *Int64Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Int64Value.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (dst *Int64Value) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Int64Value.Merge(dst, src)
|
||||
}
|
||||
func (m *Int64Value) XXX_Size() int {
|
||||
return xxx_messageInfo_Int64Value.Size(m)
|
||||
}
|
||||
func (m *Int64Value) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Int64Value.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Int64Value proto.InternalMessageInfo
|
||||
|
||||
func (m *Int64Value) GetValue() int64 {
|
||||
if m != nil {
|
||||
return m.Value
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// Wrapper message for `uint64`.
|
||||
//
|
||||
// The JSON representation for `UInt64Value` is JSON string.
|
||||
type UInt64Value struct {
|
||||
// The uint64 value.
|
||||
Value uint64 `protobuf:"varint,1,opt,name=value" json:"value,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *UInt64Value) Reset() { *m = UInt64Value{} }
|
||||
func (m *UInt64Value) String() string { return proto.CompactTextString(m) }
|
||||
func (*UInt64Value) ProtoMessage() {}
|
||||
func (*UInt64Value) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_wrapperspb_a03431133ed99282, []int{3}
|
||||
}
|
||||
func (m *UInt64Value) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_UInt64Value.Unmarshal(m, b)
|
||||
}
|
||||
func (m *UInt64Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_UInt64Value.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (dst *UInt64Value) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_UInt64Value.Merge(dst, src)
|
||||
}
|
||||
func (m *UInt64Value) XXX_Size() int {
|
||||
return xxx_messageInfo_UInt64Value.Size(m)
|
||||
}
|
||||
func (m *UInt64Value) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_UInt64Value.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_UInt64Value proto.InternalMessageInfo
|
||||
|
||||
func (m *UInt64Value) GetValue() uint64 {
|
||||
if m != nil {
|
||||
return m.Value
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// Wrapper message for `int32`.
|
||||
//
|
||||
// The JSON representation for `Int32Value` is JSON number.
|
||||
type Int32Value struct {
|
||||
// The int32 value.
|
||||
Value int32 `protobuf:"varint,1,opt,name=value" json:"value,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Int32Value) Reset() { *m = Int32Value{} }
|
||||
func (m *Int32Value) String() string { return proto.CompactTextString(m) }
|
||||
func (*Int32Value) ProtoMessage() {}
|
||||
func (*Int32Value) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_wrapperspb_a03431133ed99282, []int{4}
|
||||
}
|
||||
func (m *Int32Value) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Int32Value.Unmarshal(m, b)
|
||||
}
|
||||
func (m *Int32Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Int32Value.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (dst *Int32Value) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Int32Value.Merge(dst, src)
|
||||
}
|
||||
func (m *Int32Value) XXX_Size() int {
|
||||
return xxx_messageInfo_Int32Value.Size(m)
|
||||
}
|
||||
func (m *Int32Value) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Int32Value.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Int32Value proto.InternalMessageInfo
|
||||
|
||||
func (m *Int32Value) GetValue() int32 {
|
||||
if m != nil {
|
||||
return m.Value
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// Wrapper message for `uint32`.
|
||||
//
|
||||
// The JSON representation for `UInt32Value` is JSON number.
|
||||
type UInt32Value struct {
|
||||
// The uint32 value.
|
||||
Value uint32 `protobuf:"varint,1,opt,name=value" json:"value,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *UInt32Value) Reset() { *m = UInt32Value{} }
|
||||
func (m *UInt32Value) String() string { return proto.CompactTextString(m) }
|
||||
func (*UInt32Value) ProtoMessage() {}
|
||||
func (*UInt32Value) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_wrapperspb_a03431133ed99282, []int{5}
|
||||
}
|
||||
func (m *UInt32Value) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_UInt32Value.Unmarshal(m, b)
|
||||
}
|
||||
func (m *UInt32Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_UInt32Value.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (dst *UInt32Value) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_UInt32Value.Merge(dst, src)
|
||||
}
|
||||
func (m *UInt32Value) XXX_Size() int {
|
||||
return xxx_messageInfo_UInt32Value.Size(m)
|
||||
}
|
||||
func (m *UInt32Value) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_UInt32Value.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_UInt32Value proto.InternalMessageInfo
|
||||
|
||||
func (m *UInt32Value) GetValue() uint32 {
|
||||
if m != nil {
|
||||
return m.Value
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// Wrapper message for `bool`.
|
||||
//
|
||||
// The JSON representation for `BoolValue` is JSON `true` and `false`.
|
||||
type BoolValue struct {
|
||||
// The bool value.
|
||||
Value bool `protobuf:"varint,1,opt,name=value" json:"value,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *BoolValue) Reset() { *m = BoolValue{} }
|
||||
func (m *BoolValue) String() string { return proto.CompactTextString(m) }
|
||||
func (*BoolValue) ProtoMessage() {}
|
||||
func (*BoolValue) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_wrapperspb_a03431133ed99282, []int{6}
|
||||
}
|
||||
func (m *BoolValue) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_BoolValue.Unmarshal(m, b)
|
||||
}
|
||||
func (m *BoolValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_BoolValue.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (dst *BoolValue) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_BoolValue.Merge(dst, src)
|
||||
}
|
||||
func (m *BoolValue) XXX_Size() int {
|
||||
return xxx_messageInfo_BoolValue.Size(m)
|
||||
}
|
||||
func (m *BoolValue) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_BoolValue.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_BoolValue proto.InternalMessageInfo
|
||||
|
||||
func (m *BoolValue) GetValue() bool {
|
||||
if m != nil {
|
||||
return m.Value
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// Wrapper message for `string`.
|
||||
//
|
||||
// The JSON representation for `StringValue` is JSON string.
|
||||
type StringValue struct {
|
||||
// The string value.
|
||||
Value string `protobuf:"bytes,1,opt,name=value" json:"value,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *StringValue) Reset() { *m = StringValue{} }
|
||||
func (m *StringValue) String() string { return proto.CompactTextString(m) }
|
||||
func (*StringValue) ProtoMessage() {}
|
||||
func (*StringValue) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_wrapperspb_a03431133ed99282, []int{7}
|
||||
}
|
||||
func (m *StringValue) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_StringValue.Unmarshal(m, b)
|
||||
}
|
||||
func (m *StringValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_StringValue.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (dst *StringValue) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_StringValue.Merge(dst, src)
|
||||
}
|
||||
func (m *StringValue) XXX_Size() int {
|
||||
return xxx_messageInfo_StringValue.Size(m)
|
||||
}
|
||||
func (m *StringValue) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_StringValue.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_StringValue proto.InternalMessageInfo
|
||||
|
||||
func (m *StringValue) GetValue() string {
|
||||
if m != nil {
|
||||
return m.Value
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// Wrapper message for `bytes`.
|
||||
//
|
||||
// The JSON representation for `BytesValue` is JSON string.
|
||||
type BytesValue struct {
|
||||
// The bytes value.
|
||||
Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *BytesValue) Reset() { *m = BytesValue{} }
|
||||
func (m *BytesValue) String() string { return proto.CompactTextString(m) }
|
||||
func (*BytesValue) ProtoMessage() {}
|
||||
func (*BytesValue) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_wrapperspb_a03431133ed99282, []int{8}
|
||||
}
|
||||
func (m *BytesValue) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_BytesValue.Unmarshal(m, b)
|
||||
}
|
||||
func (m *BytesValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_BytesValue.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (dst *BytesValue) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_BytesValue.Merge(dst, src)
|
||||
}
|
||||
func (m *BytesValue) XXX_Size() int {
|
||||
return xxx_messageInfo_BytesValue.Size(m)
|
||||
}
|
||||
func (m *BytesValue) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_BytesValue.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_BytesValue proto.InternalMessageInfo
|
||||
|
||||
func (m *BytesValue) GetValue() []byte {
|
||||
if m != nil {
|
||||
return m.Value
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*DoubleValue)(nil), "OpenIMServer.protobuf.DoubleValue")
|
||||
proto.RegisterType((*FloatValue)(nil), "OpenIMServer.protobuf.FloatValue")
|
||||
proto.RegisterType((*Int64Value)(nil), "OpenIMServer.protobuf.Int64Value")
|
||||
proto.RegisterType((*UInt64Value)(nil), "OpenIMServer.protobuf.UInt64Value")
|
||||
proto.RegisterType((*Int32Value)(nil), "OpenIMServer.protobuf.Int32Value")
|
||||
proto.RegisterType((*UInt32Value)(nil), "OpenIMServer.protobuf.UInt32Value")
|
||||
proto.RegisterType((*BoolValue)(nil), "OpenIMServer.protobuf.BoolValue")
|
||||
proto.RegisterType((*StringValue)(nil), "OpenIMServer.protobuf.StringValue")
|
||||
proto.RegisterType((*BytesValue)(nil), "OpenIMServer.protobuf.BytesValue")
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterFile("wrapperspb/wrapperspb.proto", fileDescriptor_wrapperspb_a03431133ed99282)
|
||||
}
|
||||
|
||||
var fileDescriptor_wrapperspb_a03431133ed99282 = []byte{
|
||||
// 199 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2e, 0x2f, 0x4a, 0x2c,
|
||||
0x28, 0x48, 0x2d, 0x2a, 0x2e, 0x48, 0xd2, 0x47, 0x30, 0xf5, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, 0x85,
|
||||
0x44, 0xfd, 0x0b, 0x52, 0xf3, 0x3c, 0x7d, 0x83, 0x53, 0x8b, 0xca, 0x52, 0x8b, 0x20, 0x62, 0x49,
|
||||
0xa5, 0x69, 0x4a, 0xca, 0x5c, 0xdc, 0x2e, 0xf9, 0xa5, 0x49, 0x39, 0xa9, 0x61, 0x89, 0x39, 0xa5,
|
||||
0xa9, 0x42, 0x22, 0x5c, 0xac, 0x65, 0x20, 0x86, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x63, 0x10, 0x84,
|
||||
0xa3, 0xa4, 0xc4, 0xc5, 0xe5, 0x96, 0x93, 0x9f, 0x58, 0x82, 0x45, 0x0d, 0x13, 0x92, 0x1a, 0xcf,
|
||||
0xbc, 0x12, 0x33, 0x13, 0x2c, 0x6a, 0x98, 0x61, 0x6a, 0x94, 0xb9, 0xb8, 0x43, 0x71, 0x29, 0x62,
|
||||
0x41, 0x35, 0xc8, 0xd8, 0x08, 0x8b, 0x1a, 0x56, 0x34, 0x83, 0xb0, 0x2a, 0xe2, 0x85, 0x29, 0x52,
|
||||
0xe4, 0xe2, 0x74, 0xca, 0xcf, 0xcf, 0xc1, 0xa2, 0x84, 0x03, 0xc9, 0x9c, 0xe0, 0x92, 0xa2, 0xcc,
|
||||
0xbc, 0x74, 0x2c, 0x8a, 0x38, 0x91, 0x1c, 0xe4, 0x54, 0x59, 0x92, 0x5a, 0x8c, 0x45, 0x0d, 0x0f,
|
||||
0x54, 0x8d, 0x93, 0x46, 0x94, 0x1a, 0x24, 0x7c, 0xf5, 0x0b, 0xb2, 0xd3, 0xf5, 0xc1, 0xa1, 0x8b,
|
||||
0x14, 0x05, 0xd6, 0x08, 0x66, 0x12, 0x1b, 0x58, 0xd2, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x1b,
|
||||
0x5d, 0x1c, 0xe2, 0xad, 0x01, 0x00, 0x00,
|
||||
}
|
||||
Reference in New Issue
Block a user