converters

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 24, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AnEnum_name = map[int32]string{
		0: "AN_ENUM_UNSPECIFIED",
		1: "AN_ENUM_VALUE",
	}
	AnEnum_value = map[string]int32{
		"AN_ENUM_UNSPECIFIED": 0,
		"AN_ENUM_VALUE":       1,
	}
)

Enum value maps for AnEnum.

View Source
var (
	Enum_ANestedEnum_name = map[int32]string{
		0: "A_NESTED_ENUM_UNSPECIFIED",
		1: "A_NESTED_ENUM_VALUE",
	}
	Enum_ANestedEnum_value = map[string]int32{
		"A_NESTED_ENUM_UNSPECIFIED": 0,
		"A_NESTED_ENUM_VALUE":       1,
	}
)

Enum value maps for Enum_ANestedEnum.

View Source
var File_converters_converters_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type AnEnum

type AnEnum int32
const (
	AnEnum_AN_ENUM_UNSPECIFIED AnEnum = 0
	AnEnum_AN_ENUM_VALUE       AnEnum = 1
)

func (AnEnum) Descriptor

func (AnEnum) Descriptor() protoreflect.EnumDescriptor

func (AnEnum) Enum

func (x AnEnum) Enum() *AnEnum

func (AnEnum) EnumDescriptor deprecated

func (AnEnum) EnumDescriptor() ([]byte, []int)

Deprecated: Use AnEnum.Descriptor instead.

func (AnEnum) Number

func (x AnEnum) Number() protoreflect.EnumNumber

func (AnEnum) String

func (x AnEnum) String() string

func (AnEnum) Type

func (AnEnum) Type() protoreflect.EnumType

type Enum

type Enum struct {
	EnumField       AnEnum           `protobuf:"varint,1,opt,name=enum_field,json=enumField,proto3,enum=converters.AnEnum" json:"enum_field,omitempty"`
	NestedEnumField Enum_ANestedEnum `` /* 142-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Enum) AsModel

func (x *Enum) AsModel() (*EnumModel, error)

AsModel converts a Enum to its GORM model.

func (*Enum) Descriptor deprecated

func (*Enum) Descriptor() ([]byte, []int)

Deprecated: Use Enum.ProtoReflect.Descriptor instead.

func (*Enum) GetEnumField

func (x *Enum) GetEnumField() AnEnum

func (*Enum) GetNestedEnumField

func (x *Enum) GetNestedEnumField() Enum_ANestedEnum

func (*Enum) ProtoMessage

func (*Enum) ProtoMessage()

func (*Enum) ProtoReflect

func (x *Enum) ProtoReflect() protoreflect.Message

func (*Enum) Reset

func (x *Enum) Reset()

func (*Enum) String

func (x *Enum) String() string

type EnumModel

type EnumModel struct {
	EnumField       int32
	NestedEnumField int32
}

EnumModel is the GORM model for converters.Enum.

func (*EnumModel) AsProto

func (m *EnumModel) AsProto() (*Enum, error)

AsProto converts a EnumModel to its protobuf representation.

type Enum_ANestedEnum

type Enum_ANestedEnum int32
const (
	Enum_A_NESTED_ENUM_UNSPECIFIED Enum_ANestedEnum = 0
	Enum_A_NESTED_ENUM_VALUE       Enum_ANestedEnum = 1
)

func (Enum_ANestedEnum) Descriptor

func (Enum_ANestedEnum) Enum

func (Enum_ANestedEnum) EnumDescriptor deprecated

func (Enum_ANestedEnum) EnumDescriptor() ([]byte, []int)

Deprecated: Use Enum_ANestedEnum.Descriptor instead.

func (Enum_ANestedEnum) Number

func (Enum_ANestedEnum) String

func (x Enum_ANestedEnum) String() string

func (Enum_ANestedEnum) Type

type Json

type Json struct {
	MapField map[string]string `` /* 173-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Json) AsModel

func (x *Json) AsModel() (*JsonModel, error)

AsModel converts a Json to its GORM model.

func (*Json) Descriptor deprecated

func (*Json) Descriptor() ([]byte, []int)

Deprecated: Use Json.ProtoReflect.Descriptor instead.

func (*Json) GetMapField

func (x *Json) GetMapField() map[string]string

func (*Json) ProtoMessage

func (*Json) ProtoMessage()

func (*Json) ProtoReflect

func (x *Json) ProtoReflect() protoreflect.Message

func (*Json) Reset

func (x *Json) Reset()

func (*Json) String

func (x *Json) String() string

type JsonModel

type JsonModel struct {
	MapField []byte
}

JsonModel is the GORM model for converters.Json.

func (*JsonModel) AsProto

func (m *JsonModel) AsProto() (*Json, error)

AsProto converts a JsonModel to its protobuf representation.

type KnownTypes

type KnownTypes struct {
	TimestampField *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=timestamp_field,json=timestampField,proto3" json:"timestamp_field,omitempty"`
	// contains filtered or unexported fields
}

func (*KnownTypes) AsModel

func (x *KnownTypes) AsModel() (*KnownTypesModel, error)

AsModel converts a KnownTypes to its GORM model.

func (*KnownTypes) Descriptor deprecated

func (*KnownTypes) Descriptor() ([]byte, []int)

Deprecated: Use KnownTypes.ProtoReflect.Descriptor instead.

func (*KnownTypes) GetTimestampField

func (x *KnownTypes) GetTimestampField() *timestamppb.Timestamp

func (*KnownTypes) ProtoMessage

func (*KnownTypes) ProtoMessage()

func (*KnownTypes) ProtoReflect

func (x *KnownTypes) ProtoReflect() protoreflect.Message

func (*KnownTypes) Reset

func (x *KnownTypes) Reset()

func (*KnownTypes) String

func (x *KnownTypes) String() string

type KnownTypesModel

type KnownTypesModel struct {
	TimestampField time.Time
}

KnownTypesModel is the GORM model for converters.KnownTypes.

func (*KnownTypesModel) AsProto

func (m *KnownTypesModel) AsProto() (*KnownTypes, error)

AsProto converts a KnownTypesModel to its protobuf representation.

type Scalars

type Scalars struct {
	DoubleField   float64 `protobuf:"fixed64,1,opt,name=double_field,json=doubleField,proto3" json:"double_field,omitempty"`
	FloatField    float32 `protobuf:"fixed32,2,opt,name=float_field,json=floatField,proto3" json:"float_field,omitempty"`
	Int32Field    int32   `protobuf:"varint,3,opt,name=int32_field,json=int32Field,proto3" json:"int32_field,omitempty"`
	Int64Field    int64   `protobuf:"varint,4,opt,name=int64_field,json=int64Field,proto3" json:"int64_field,omitempty"`
	Uint32Field   uint32  `protobuf:"varint,5,opt,name=uint32_field,json=uint32Field,proto3" json:"uint32_field,omitempty"`
	Uint64Field   uint64  `protobuf:"varint,6,opt,name=uint64_field,json=uint64Field,proto3" json:"uint64_field,omitempty"`
	Sint32Field   int32   `protobuf:"zigzag32,7,opt,name=sint32_field,json=sint32Field,proto3" json:"sint32_field,omitempty"`
	Sint64Field   int64   `protobuf:"zigzag64,8,opt,name=sint64_field,json=sint64Field,proto3" json:"sint64_field,omitempty"`
	Fixed32Field  uint32  `protobuf:"fixed32,9,opt,name=fixed32_field,json=fixed32Field,proto3" json:"fixed32_field,omitempty"`
	Fixed64Field  uint64  `protobuf:"fixed64,10,opt,name=fixed64_field,json=fixed64Field,proto3" json:"fixed64_field,omitempty"`
	Sfixed32Field int32   `protobuf:"fixed32,11,opt,name=sfixed32_field,json=sfixed32Field,proto3" json:"sfixed32_field,omitempty"`
	Sfixed64Field int64   `protobuf:"fixed64,12,opt,name=sfixed64_field,json=sfixed64Field,proto3" json:"sfixed64_field,omitempty"`
	BoolField     bool    `protobuf:"varint,13,opt,name=bool_field,json=boolField,proto3" json:"bool_field,omitempty"`
	StringField   string  `protobuf:"bytes,14,opt,name=string_field,json=stringField,proto3" json:"string_field,omitempty"`
	BytesField    []byte  `protobuf:"bytes,15,opt,name=bytes_field,json=bytesField,proto3" json:"bytes_field,omitempty"`
	// contains filtered or unexported fields
}

func (*Scalars) AsModel

func (x *Scalars) AsModel() (*ScalarsModel, error)

AsModel converts a Scalars to its GORM model.

func (*Scalars) Descriptor deprecated

func (*Scalars) Descriptor() ([]byte, []int)

Deprecated: Use Scalars.ProtoReflect.Descriptor instead.

func (*Scalars) GetBoolField

func (x *Scalars) GetBoolField() bool

func (*Scalars) GetBytesField

func (x *Scalars) GetBytesField() []byte

func (*Scalars) GetDoubleField

func (x *Scalars) GetDoubleField() float64

func (*Scalars) GetFixed32Field

func (x *Scalars) GetFixed32Field() uint32

func (*Scalars) GetFixed64Field

func (x *Scalars) GetFixed64Field() uint64

func (*Scalars) GetFloatField

func (x *Scalars) GetFloatField() float32

func (*Scalars) GetInt32Field

func (x *Scalars) GetInt32Field() int32

func (*Scalars) GetInt64Field

func (x *Scalars) GetInt64Field() int64

func (*Scalars) GetSfixed32Field

func (x *Scalars) GetSfixed32Field() int32

func (*Scalars) GetSfixed64Field

func (x *Scalars) GetSfixed64Field() int64

func (*Scalars) GetSint32Field

func (x *Scalars) GetSint32Field() int32

func (*Scalars) GetSint64Field

func (x *Scalars) GetSint64Field() int64

func (*Scalars) GetStringField

func (x *Scalars) GetStringField() string

func (*Scalars) GetUint32Field

func (x *Scalars) GetUint32Field() uint32

func (*Scalars) GetUint64Field

func (x *Scalars) GetUint64Field() uint64

func (*Scalars) ProtoMessage

func (*Scalars) ProtoMessage()

func (*Scalars) ProtoReflect

func (x *Scalars) ProtoReflect() protoreflect.Message

func (*Scalars) Reset

func (x *Scalars) Reset()

func (*Scalars) String

func (x *Scalars) String() string

type ScalarsModel

type ScalarsModel struct {
	DoubleField   float64
	FloatField    float32
	Int32Field    int32
	Int64Field    int64
	Uint32Field   uint32
	Uint64Field   uint64
	Sint32Field   int32
	Sint64Field   int64
	Fixed32Field  uint32
	Fixed64Field  uint64
	Sfixed32Field int32
	Sfixed64Field int64
	BoolField     bool
	StringField   string
	BytesField    []byte
}

ScalarsModel is the GORM model for converters.Scalars.

func (*ScalarsModel) AsProto

func (m *ScalarsModel) AsProto() (*Scalars, error)

AsProto converts a ScalarsModel to its protobuf representation.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL