flattenproto

package module
v0.0.0-...-fda31fc Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

README

flattenproto

flatten protobuf into values

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	EE_name = map[int32]string{
		0: "EE_NONE",
		1: "EE_FIRST",
		2: "EE_SECOND",
	}
	EE_value = map[string]int32{
		"EE_NONE":   0,
		"EE_FIRST":  1,
		"EE_SECOND": 2,
	}
)

Enum value maps for EE.

View Source
var File_flattenproto_test_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Bar

type Bar struct {
	X2 string `protobuf:"bytes,2,opt,name=x2,proto3" json:"x2,omitempty"`
	X3 int32  `protobuf:"varint,3,opt,name=x3,proto3" json:"x3,omitempty"`
	// contains filtered or unexported fields
}

func (*Bar) Descriptor deprecated

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

Deprecated: Use Bar.ProtoReflect.Descriptor instead.

func (*Bar) GetX2

func (x *Bar) GetX2() string

func (*Bar) GetX3

func (x *Bar) GetX3() int32

func (*Bar) ProtoMessage

func (*Bar) ProtoMessage()

func (*Bar) ProtoReflect

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

func (*Bar) Reset

func (x *Bar) Reset()

func (*Bar) String

func (x *Bar) String() string

type EE

type EE int32
const (
	EE_EE_NONE   EE = 0
	EE_EE_FIRST  EE = 1
	EE_EE_SECOND EE = 2
)

func (EE) Descriptor

func (EE) Descriptor() protoreflect.EnumDescriptor

func (EE) Enum

func (x EE) Enum() *EE

func (EE) EnumDescriptor deprecated

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

Deprecated: Use EE.Descriptor instead.

func (EE) Number

func (x EE) Number() protoreflect.EnumNumber

func (EE) String

func (x EE) String() string

func (EE) Type

func (EE) Type() protoreflect.EnumType

type Field

type Field struct {
	Key   string
	Value interface{}
}

type Foo

type Foo struct {
	X1    []string          `protobuf:"bytes,1,rep,name=x1,proto3" json:"x1,omitempty"`
	X2    string            `protobuf:"bytes,2,opt,name=x2,proto3" json:"x2,omitempty"`
	X3    int32             `protobuf:"varint,3,opt,name=x3,proto3" json:"x3,omitempty"`
	X4    map[string]string `` /* 145-byte string literal not displayed */
	X5Xyz string            `protobuf:"bytes,5,opt,name=x5_xyz,json=x5Xyz,proto3" json:"x5_xyz,omitempty"`
	Ee    EE                `protobuf:"varint,6,opt,name=ee,proto3,enum=flattenproto.EE" json:"ee,omitempty"`
	// contains filtered or unexported fields
}

func (*Foo) Descriptor deprecated

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

Deprecated: Use Foo.ProtoReflect.Descriptor instead.

func (*Foo) GetEe

func (x *Foo) GetEe() EE

func (*Foo) GetX1

func (x *Foo) GetX1() []string

func (*Foo) GetX2

func (x *Foo) GetX2() string

func (*Foo) GetX3

func (x *Foo) GetX3() int32

func (*Foo) GetX4

func (x *Foo) GetX4() map[string]string

func (*Foo) GetX5Xyz

func (x *Foo) GetX5Xyz() string

func (*Foo) ProtoMessage

func (*Foo) ProtoMessage()

func (*Foo) ProtoReflect

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

func (*Foo) Reset

func (x *Foo) Reset()

func (*Foo) String

func (x *Foo) String() string

type Option

type Option interface {
	// contains filtered or unexported methods
}

func UseEnumNumbers

func UseEnumNumbers() Option

func UseProtoNames

func UseProtoNames() Option

func WithFieldJoinCharacter

func WithFieldJoinCharacter(b byte) Option

type Values

type Values []Field

func Flatten

func Flatten(m proto.Message, opts ...Option) Values

Jump to

Keyboard shortcuts

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