preprocess

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2022 License: Apache-2.0 Imports: 5 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PreprocessString_Methods_name = map[int32]string{
		0: "none",
		1: "trim",
		2: "upper",
		3: "lower",
		4: "clear",
	}
	PreprocessString_Methods_value = map[string]int32{
		"none":  0,
		"trim":  1,
		"upper": 2,
		"lower": 3,
		"clear": 4,
	}
)

Enum value maps for PreprocessString_Methods.

View Source
var (
	// custom_functions allow the user to specify message receiver functions which will be invoked during preprocessing
	// example:
	//
	// example.proto:
	// message MyMessage {
	//   option (preprocess.function) = {
	//     pre: "beforeFieldProcessing"
	//     post: "afterFieldProcessing"
	//   };
	//   string test = 1;
	// }
	//
	// example.pb.preprocess_custom.go:
	// package proto
	//
	// // beforeFieldProcessing is a custom function added to MyMessage
	// //   and invoked by generated PreProcess before field processing
	// func (m *MyMessage) beforeFieldProcessing() error { return nil }
	//
	// // afterFieldProcessing is a custom function added to MyMessage
	// //   and invoked by generated PreProcess after field processing
	// func (m *MyMessage) afterFieldProcessing() error { return nil }
	//
	//
	// optional preprocess.PreprocessFunction function = 11110;
	E_Function = &file_github_com_infobloxopen_protoc_gen_preprocess_options_preprocess_proto_extTypes[0]
	// each allows field options to be applied to all strings within a message
	//
	// optional preprocess.PreprocessFieldOptions each = 11111;
	E_Each = &file_github_com_infobloxopen_protoc_gen_preprocess_options_preprocess_proto_extTypes[1]
)

Extension fields to descriptorpb.MessageOptions.

View Source
var (
	// optional preprocess.PreprocessFieldOptions field = 11112;
	E_Field = &file_github_com_infobloxopen_protoc_gen_preprocess_options_preprocess_proto_extTypes[2]
)

Extension fields to descriptorpb.FieldOptions.

View Source
var File_github_com_infobloxopen_protoc_gen_preprocess_options_preprocess_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type PreprocessFieldOptions

type PreprocessFieldOptions struct {
	String_ *PreprocessString `protobuf:"bytes,1,opt,name=string,proto3" json:"string,omitempty"`
	// contains filtered or unexported fields
}

PreprocessFieldOptions is available on individual fields and at the message level using the 'each' option

func (*PreprocessFieldOptions) Descriptor deprecated

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

Deprecated: Use PreprocessFieldOptions.ProtoReflect.Descriptor instead.

func (*PreprocessFieldOptions) GetString_

func (x *PreprocessFieldOptions) GetString_() *PreprocessString

func (*PreprocessFieldOptions) ProtoMessage

func (*PreprocessFieldOptions) ProtoMessage()

func (*PreprocessFieldOptions) ProtoReflect added in v1.0.0

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

func (*PreprocessFieldOptions) Reset

func (x *PreprocessFieldOptions) Reset()

func (*PreprocessFieldOptions) String

func (x *PreprocessFieldOptions) String() string

type PreprocessFunction added in v1.0.1

type PreprocessFunction struct {

	// pre specifies a function name which will be invoked before field processing
	Pre string `protobuf:"bytes,1,opt,name=pre,proto3" json:"pre,omitempty"`
	// post specifies a function name which will be invoked after field processing
	Post string `protobuf:"bytes,2,opt,name=post,proto3" json:"post,omitempty"`
	// contains filtered or unexported fields
}

func (*PreprocessFunction) Descriptor deprecated added in v1.0.1

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

Deprecated: Use PreprocessFunction.ProtoReflect.Descriptor instead.

func (*PreprocessFunction) GetPost added in v1.0.1

func (x *PreprocessFunction) GetPost() string

func (*PreprocessFunction) GetPre added in v1.0.1

func (x *PreprocessFunction) GetPre() string

func (*PreprocessFunction) ProtoMessage added in v1.0.1

func (*PreprocessFunction) ProtoMessage()

func (*PreprocessFunction) ProtoReflect added in v1.0.1

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

func (*PreprocessFunction) Reset added in v1.0.1

func (x *PreprocessFunction) Reset()

func (*PreprocessFunction) String added in v1.0.1

func (x *PreprocessFunction) String() string

type PreprocessString

type PreprocessString struct {
	Methods []PreprocessString_Methods `protobuf:"varint,1,rep,packed,name=methods,proto3,enum=preprocess.PreprocessString_Methods" json:"methods,omitempty"`
	// contains filtered or unexported fields
}

func (*PreprocessString) Descriptor deprecated

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

Deprecated: Use PreprocessString.ProtoReflect.Descriptor instead.

func (*PreprocessString) GetMethods added in v0.2.0

func (x *PreprocessString) GetMethods() []PreprocessString_Methods

func (*PreprocessString) ProtoMessage

func (*PreprocessString) ProtoMessage()

func (*PreprocessString) ProtoReflect added in v1.0.0

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

func (*PreprocessString) Reset

func (x *PreprocessString) Reset()

func (*PreprocessString) String

func (x *PreprocessString) String() string

type PreprocessString_Methods added in v0.2.0

type PreprocessString_Methods int32
const (
	PreprocessString_none  PreprocessString_Methods = 0
	PreprocessString_trim  PreprocessString_Methods = 1
	PreprocessString_upper PreprocessString_Methods = 2
	PreprocessString_lower PreprocessString_Methods = 3
	PreprocessString_clear PreprocessString_Methods = 4
)

func (PreprocessString_Methods) Descriptor added in v1.0.0

func (PreprocessString_Methods) Enum added in v1.0.0

func (PreprocessString_Methods) EnumDescriptor deprecated added in v0.2.0

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

Deprecated: Use PreprocessString_Methods.Descriptor instead.

func (PreprocessString_Methods) Number added in v1.0.0

func (PreprocessString_Methods) String added in v0.2.0

func (x PreprocessString_Methods) String() string

func (PreprocessString_Methods) Type added in v1.0.0

Jump to

Keyboard shortcuts

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