proto

package
v0.8.0-nightly.20230811 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SchemaType = "proto"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ArrayDescriptor

type ArrayDescriptor struct {
	// contains filtered or unexported fields
}

func (ArrayDescriptor) DescriptorType

func (d ArrayDescriptor) DescriptorType(schema.ArrayDescriptor)

func (ArrayDescriptor) Parameters

func (d ArrayDescriptor) Parameters() map[string]interface{}

func (ArrayDescriptor) ValueDescriptor

func (d ArrayDescriptor) ValueDescriptor() schema.Descriptor

type EnumDescriptor

type EnumDescriptor struct {
	// contains filtered or unexported fields
}

func (EnumDescriptor) DescriptorType

func (d EnumDescriptor) DescriptorType(schema.EnumDescriptor)

func (EnumDescriptor) Name

func (d EnumDescriptor) Name() string

func (EnumDescriptor) Parameters

func (d EnumDescriptor) Parameters() map[string]interface{}

func (EnumDescriptor) ValueDescriptors

func (d EnumDescriptor) ValueDescriptors() []schema.EnumValueDescriptor

type EnumValueDescriptor

type EnumValueDescriptor struct {
	// contains filtered or unexported fields
}

func (EnumValueDescriptor) DescriptorType

func (EnumValueDescriptor) Name

func (d EnumValueDescriptor) Name() string

func (EnumValueDescriptor) Parameters

func (d EnumValueDescriptor) Parameters() map[string]interface{}

func (EnumValueDescriptor) Value

func (d EnumValueDescriptor) Value() string

type Field

type Field struct {
	// contains filtered or unexported fields
}

func (Field) Descriptor

func (f Field) Descriptor() schema.Descriptor

func (Field) DescriptorType

func (f Field) DescriptorType(schema.Field)

func (Field) Index

func (f Field) Index() int

func (Field) Name

func (f Field) Name() string

type MapDescriptor

type MapDescriptor struct {
	// contains filtered or unexported fields
}

func (MapDescriptor) DescriptorType

func (d MapDescriptor) DescriptorType(schema.MapDescriptor)

func (MapDescriptor) KeyDescriptor

func (d MapDescriptor) KeyDescriptor() schema.Descriptor

func (MapDescriptor) Parameters

func (d MapDescriptor) Parameters() map[string]interface{}

func (MapDescriptor) ValueDescriptor

func (d MapDescriptor) ValueDescriptor() schema.Descriptor

type MutableArrayDescriptor

type MutableArrayDescriptor struct {
	// contains filtered or unexported fields
}

func NewMutableArrayDescriptor

func NewMutableArrayDescriptor(schema *MutableSchema, descriptor schema.MutableDescriptor) *MutableArrayDescriptor

func (*MutableArrayDescriptor) DescriptorType

func (d *MutableArrayDescriptor) DescriptorType(schema.ArrayDescriptor)

func (*MutableArrayDescriptor) Parameters

func (d *MutableArrayDescriptor) Parameters() map[string]interface{}

func (*MutableArrayDescriptor) SetParameters

func (d *MutableArrayDescriptor) SetParameters(_ map[string]interface{})

func (*MutableArrayDescriptor) SetValueDescriptor

func (d *MutableArrayDescriptor) SetValueDescriptor(descriptor schema.MutableDescriptor)

func (*MutableArrayDescriptor) ValueDescriptor

func (d *MutableArrayDescriptor) ValueDescriptor() schema.Descriptor

type MutableEnumDescriptor

type MutableEnumDescriptor struct {
	// contains filtered or unexported fields
}

func (*MutableEnumDescriptor) DescriptorType

func (d *MutableEnumDescriptor) DescriptorType(schema.EnumDescriptor)

func (*MutableEnumDescriptor) Name

func (d *MutableEnumDescriptor) Name() string

func (*MutableEnumDescriptor) Parameters

func (d *MutableEnumDescriptor) Parameters() map[string]interface{}

func (*MutableEnumDescriptor) SetName

func (d *MutableEnumDescriptor) SetName(name string)

func (*MutableEnumDescriptor) SetParameters

func (d *MutableEnumDescriptor) SetParameters(_ map[string]interface{})

func (*MutableEnumDescriptor) SetValueDescriptors

func (d *MutableEnumDescriptor) SetValueDescriptors(descriptors []schema.MutableEnumValueDescriptor)

func (*MutableEnumDescriptor) ValueDescriptors

func (d *MutableEnumDescriptor) ValueDescriptors() []schema.EnumValueDescriptor

type MutableEnumValueDescriptor

type MutableEnumValueDescriptor struct {
	// contains filtered or unexported fields
}

func NewMutableEnumValueDescriptor

func NewMutableEnumValueDescriptor(s *MutableSchema, name string, value int) *MutableEnumValueDescriptor

func (*MutableEnumValueDescriptor) DescriptorType

func (*MutableEnumValueDescriptor) Name

func (*MutableEnumValueDescriptor) Parameters

func (d *MutableEnumValueDescriptor) Parameters() map[string]interface{}

func (*MutableEnumValueDescriptor) SetName

func (d *MutableEnumValueDescriptor) SetName(name string)

func (*MutableEnumValueDescriptor) SetParameters

func (d *MutableEnumValueDescriptor) SetParameters(_ map[string]interface{})

func (*MutableEnumValueDescriptor) SetValue

func (d *MutableEnumValueDescriptor) SetValue(value string)

func (*MutableEnumValueDescriptor) Value

type MutableField

type MutableField struct {
	// contains filtered or unexported fields
}

func NewMutableField

func NewMutableField(schema *MutableSchema, name string, index int, descriptor schema.MutableDescriptor) *MutableField

func (*MutableField) Descriptor

func (f *MutableField) Descriptor() schema.Descriptor

func (*MutableField) DescriptorType

func (f *MutableField) DescriptorType(schema.Field)

func (*MutableField) Index

func (f *MutableField) Index() int

func (*MutableField) Name

func (f *MutableField) Name() string

func (*MutableField) SetDescriptor

func (f *MutableField) SetDescriptor(descriptor schema.MutableDescriptor)

func (*MutableField) SetIndex

func (f *MutableField) SetIndex(i int)

func (*MutableField) SetName

func (f *MutableField) SetName(s string)

type MutableMapDescriptor

type MutableMapDescriptor struct {
	// contains filtered or unexported fields
}

func (*MutableMapDescriptor) DescriptorType

func (d *MutableMapDescriptor) DescriptorType(schema.MapDescriptor)

func (*MutableMapDescriptor) KeyDescriptor

func (d *MutableMapDescriptor) KeyDescriptor() schema.Descriptor

func (*MutableMapDescriptor) Parameters

func (d *MutableMapDescriptor) Parameters() map[string]interface{}

func (*MutableMapDescriptor) SetKeyDescriptor

func (d *MutableMapDescriptor) SetKeyDescriptor(descriptor schema.MutableDescriptor)

func (*MutableMapDescriptor) SetParameters

func (d *MutableMapDescriptor) SetParameters(_ map[string]interface{})

func (*MutableMapDescriptor) SetValueDescriptor

func (d *MutableMapDescriptor) SetValueDescriptor(descriptor schema.MutableDescriptor)

func (*MutableMapDescriptor) ValueDescriptor

func (d *MutableMapDescriptor) ValueDescriptor() schema.Descriptor

type MutablePrimitiveDescriptor

type MutablePrimitiveDescriptor struct {
	// contains filtered or unexported fields
}

func NewMutablePrimitiveDescriptor

func NewMutablePrimitiveDescriptor(schema *MutableSchema, descriptorType schema.PrimitiveDescriptorType) *MutablePrimitiveDescriptor

func (*MutablePrimitiveDescriptor) DescriptorType

func (*MutablePrimitiveDescriptor) Parameters

func (d *MutablePrimitiveDescriptor) Parameters() map[string]interface{}

func (*MutablePrimitiveDescriptor) SetParameters

func (d *MutablePrimitiveDescriptor) SetParameters(_ map[string]interface{})

func (*MutablePrimitiveDescriptor) SetType

func (d *MutablePrimitiveDescriptor) SetType(descriptorType schema.PrimitiveDescriptorType)

func (*MutablePrimitiveDescriptor) String

func (d *MutablePrimitiveDescriptor) String() string

func (*MutablePrimitiveDescriptor) Type

type MutableSchema

type MutableSchema struct {
	// contains filtered or unexported fields
}

func NewMutableSchema

func NewMutableSchema(base Schema) *MutableSchema

func (*MutableSchema) Build

func (s *MutableSchema) Build() (schema.Schema, error)

func (*MutableSchema) Descriptors

func (s *MutableSchema) Descriptors() []schema.Descriptor

func (*MutableSchema) SetDescriptors

func (s *MutableSchema) SetDescriptors(descriptors []schema.MutableDescriptor)

func (*MutableSchema) SetVersion

func (s *MutableSchema) SetVersion(v int)

func (*MutableSchema) Type

func (s *MutableSchema) Type() string

func (*MutableSchema) Version

func (s *MutableSchema) Version() int

type MutableStructDescriptor

type MutableStructDescriptor struct {
	// contains filtered or unexported fields
}

func (*MutableStructDescriptor) DescriptorType

func (d *MutableStructDescriptor) DescriptorType(schema.StructDescriptor)

func (*MutableStructDescriptor) Fields

func (d *MutableStructDescriptor) Fields() []schema.Field

func (*MutableStructDescriptor) Name

func (d *MutableStructDescriptor) Name() string

func (*MutableStructDescriptor) Parameters

func (d *MutableStructDescriptor) Parameters() map[string]interface{}

func (*MutableStructDescriptor) SetFields

func (d *MutableStructDescriptor) SetFields(fields []schema.MutableField)

func (*MutableStructDescriptor) SetName

func (d *MutableStructDescriptor) SetName(s2 string)

func (*MutableStructDescriptor) SetParameters

func (d *MutableStructDescriptor) SetParameters(_ map[string]interface{})

type PrimitiveDescriptor

type PrimitiveDescriptor struct {
	// contains filtered or unexported fields
}

func (PrimitiveDescriptor) DescriptorType

func (PrimitiveDescriptor) Parameters

func (d PrimitiveDescriptor) Parameters() map[string]interface{}

func (PrimitiveDescriptor) String

func (d PrimitiveDescriptor) String() string

func (PrimitiveDescriptor) Type

type Schema

type Schema struct {
	// contains filtered or unexported fields
}

func NewSchema

func NewSchema(
	fileSet *descriptorpb.FileDescriptorSet,
	mainDescriptorPath string,
	version int,
) (Schema, error)

NewSchema creates a Schema and uses the provided file descriptor as the main file descriptor. Any files that contain imported types should be included in the provided file descriptor set (including the main descriptor).

func (Schema) Descriptors

func (s Schema) Descriptors() []schema.Descriptor

func (Schema) FileDescriptorSet

func (s Schema) FileDescriptorSet() *descriptorpb.FileDescriptorSet

func (Schema) ToMutable

func (s Schema) ToMutable() schema.MutableSchema

func (Schema) Type

func (s Schema) Type() string

func (Schema) Version

func (s Schema) Version() int

type StructDescriptor

type StructDescriptor struct {
	// contains filtered or unexported fields
}

func (StructDescriptor) DescriptorType

func (d StructDescriptor) DescriptorType(schema.StructDescriptor)

func (StructDescriptor) Fields

func (d StructDescriptor) Fields() []schema.Field

func (StructDescriptor) Name

func (d StructDescriptor) Name() string

func (StructDescriptor) Parameters

func (d StructDescriptor) Parameters() map[string]interface{}

Directories

Path Synopsis
This folder contains protobuf definitions used in tests.
This folder contains protobuf definitions used in tests.

Jump to

Keyboard shortcuts

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