fieldmask

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: May 6, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MaskMode_name = map[int32]string{
		0: "Filter",
		1: "Prune",
	}
	MaskMode_value = map[string]int32{
		"Filter": 0,
		"Prune":  1,
	}
)

Enum value maps for MaskMode.

View Source
var (
	// The extension number was applied from https://github.com/protocolbuffers/protobuf/pull/9646.
	//
	// optional fieldmask.option.FieldMask Option = 1142;
	E_Option = &file_fieldmask_option_proto_extTypes[0]
)

Extension fields to descriptorpb.FieldOptions.

View Source
var File_fieldmask_option_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type FieldMask

type FieldMask struct {
	In  *InMessageOption  `protobuf:"bytes,1,opt,name=in,proto3" json:"in,omitempty"`
	Out *OutMessageOption `protobuf:"bytes,2,opt,name=out,proto3" json:"out,omitempty"`
	// contains filtered or unexported fields
}

FieldMask rules applied at the field level

func (*FieldMask) Descriptor deprecated

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

Deprecated: Use FieldMask.ProtoReflect.Descriptor instead.

func (*FieldMask) GetIn added in v0.2.0

func (x *FieldMask) GetIn() *InMessageOption

func (*FieldMask) GetOut added in v0.2.0

func (x *FieldMask) GetOut() *OutMessageOption

func (*FieldMask) ProtoMessage

func (*FieldMask) ProtoMessage()

func (*FieldMask) ProtoReflect

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

func (*FieldMask) Reset

func (x *FieldMask) Reset()

func (*FieldMask) String

func (x *FieldMask) String() string

type InMessageOption added in v0.2.0

type InMessageOption struct {

	// gen indicates the Message type that was used to apply FieldMask rules. If gen is
	// set, the fieldmask plugin will generates `MaskIn_FieldName` and `MaskIn_FieldName`
	// for in message.
	Gen bool `protobuf:"varint,1,opt,name=gen,proto3" json:"gen,omitempty"`
	// contains filtered or unexported fields
}

FieldMaskMode indicates the options help generate the field mask extension for in message.

func (*InMessageOption) Descriptor deprecated added in v0.2.0

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

Deprecated: Use InMessageOption.ProtoReflect.Descriptor instead.

func (*InMessageOption) GetGen added in v0.2.0

func (x *InMessageOption) GetGen() bool

func (*InMessageOption) ProtoMessage added in v0.2.0

func (*InMessageOption) ProtoMessage()

func (*InMessageOption) ProtoReflect added in v0.2.0

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

func (*InMessageOption) Reset added in v0.2.0

func (x *InMessageOption) Reset()

func (*InMessageOption) String added in v0.2.0

func (x *InMessageOption) String() string

type MaskMode

type MaskMode int32
const (
	// FiledMaskMode_Filter indicates that the only fields in fieldmask should be kept.
	MaskMode_Filter MaskMode = 0
	// FiledMaskMode_Prune indicates that the field in fieldmask should be removed.
	MaskMode_Prune MaskMode = 1
)

func (MaskMode) Descriptor

func (MaskMode) Descriptor() protoreflect.EnumDescriptor

func (MaskMode) Enum

func (x MaskMode) Enum() *MaskMode

func (MaskMode) EnumDescriptor deprecated

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

Deprecated: Use MaskMode.Descriptor instead.

func (MaskMode) Number

func (x MaskMode) Number() protoreflect.EnumNumber

func (MaskMode) String

func (x MaskMode) String() string

func (MaskMode) Type

type NestedFieldMask added in v0.3.0

type NestedFieldMask map[string]NestedFieldMask

NestedFieldMask helps to build a nested field mask.

func New added in v0.3.0

New returns a new NestedFieldMask with the given field mask.

func NewWithPaths added in v0.3.1

func NewWithPaths(paths ...string) NestedFieldMask

NewWithPaths returns a new NestedFieldMask with the given paths.

func (NestedFieldMask) Filter added in v0.3.0

func (mask NestedFieldMask) Filter(m proto.Message)

func (NestedFieldMask) Masked added in v0.3.0

func (mask NestedFieldMask) Masked(path string) bool

func (NestedFieldMask) Prune added in v0.3.0

func (mask NestedFieldMask) Prune(m proto.Message)

type OutMessageOption added in v0.2.0

type OutMessageOption struct {

	// gen indicates the Message type that was used to apply FieldMask rules, if gen is
	// set, the fieldmask plugin will generates `$outMessage_FieldMask` helper object
	// to help deal with $outMessage with $inMessage.FieldMask.
	Gen bool `protobuf:"varint,1,opt,name=gen,proto3" json:"gen,omitempty"`
	// message indicates the Message type that was used to apply FieldMask rules.
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

OutMessageOption indicates the options help generating the field mask extension for out message.

func (*OutMessageOption) Descriptor deprecated added in v0.2.0

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

Deprecated: Use OutMessageOption.ProtoReflect.Descriptor instead.

func (*OutMessageOption) GetGen added in v0.2.0

func (x *OutMessageOption) GetGen() bool

func (*OutMessageOption) GetMessage added in v0.2.0

func (x *OutMessageOption) GetMessage() string

func (*OutMessageOption) ProtoMessage added in v0.2.0

func (*OutMessageOption) ProtoMessage()

func (*OutMessageOption) ProtoReflect added in v0.2.0

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

func (*OutMessageOption) Reset added in v0.2.0

func (x *OutMessageOption) Reset()

func (*OutMessageOption) String added in v0.2.0

func (x *OutMessageOption) String() string

Jump to

Keyboard shortcuts

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