test

package
v0.7.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Test_Type_name = map[int32]string{
		0: "NONE",
		1: "ONE",
		2: "TWO",
	}
	Test_Type_value = map[string]int32{
		"NONE": 0,
		"ONE":  1,
		"TWO":  2,
	}
)

Enum value maps for Test_Type.

View Source
var (
	ErrInvalidLength        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflow          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group")
)
View Source
var File_tests_pb_test_proto protoreflect.FileDescriptor
View Source
var SchemaLessFields = struct {
	Data string
}{
	Data: "data",
}
View Source
var TestFields = struct {
	StringField          string
	NumberField          string
	BoolField            string
	EnumField            string
	MessageField         string
	RepeatedStringField  string
	RepeatedMessageField string
	NumberValueField     string
	StringValueField     string
	BoolValueField       string
	TimeValueField       string
	DurationValueField   string
	OptionalStringField  string
	OptionalNumberField  string
	OptionalBoolField    string
	OptionalEnumField    string
}{
	StringField:          "string_field",
	NumberField:          "number_field",
	BoolField:            "bool_field",
	EnumField:            "enum_field",
	MessageField:         "message_field",
	RepeatedStringField:  "repeated_string_field",
	RepeatedMessageField: "repeated_message_field",
	NumberValueField:     "number_value_field",
	StringValueField:     "string_value_field",
	BoolValueField:       "bool_value_field",
	TimeValueField:       "time_value_field",
	DurationValueField:   "duration_value_field",
	OptionalStringField:  "optional_string_field",
	OptionalNumberField:  "optional_number_field",
	OptionalBoolField:    "optional_bool_field",
	OptionalEnumField:    "optional_enum_field",
}
View Source
var TestFilters = TestFilter{
	StringField:         filters.StringField(TestFields.StringField),
	NumberField:         filters.NumberField(TestFields.NumberField),
	BoolField:           filters.BoolField(TestFields.BoolField),
	NumberValueField:    filters.NullableNumberField(TestFields.NumberValueField),
	StringValueField:    filters.NullableStringField(TestFields.StringValueField),
	BoolValueField:      filters.NullableBoolField(TestFields.BoolValueField),
	TimeValueField:      filters.TimeField(TestFields.TimeValueField),
	DurationValueField:  filters.DurationField(TestFields.DurationValueField),
	OptionalStringField: filters.NullableStringField(TestFields.OptionalStringField),
	OptionalNumberField: filters.NullableNumberField(TestFields.OptionalNumberField),
	OptionalBoolField:   filters.NullableBoolField(TestFields.OptionalBoolField),
}

Functions

func TestWhere added in v0.5.0

func TestWhere(fn func(f TestFilter) *filters.Expression) *filters.Expression

Types

type Test

type Test struct {
	StringField          string                  `protobuf:"bytes,1,opt,name=string_field,json=stringField,proto3" json:"string_field,omitempty"`
	NumberField          int64                   `protobuf:"varint,2,opt,name=number_field,json=numberField,proto3" json:"number_field,omitempty"`
	BoolField            bool                    `protobuf:"varint,3,opt,name=bool_field,json=boolField,proto3" json:"bool_field,omitempty"`
	EnumField            Test_Type               `protobuf:"varint,4,opt,name=enum_field,json=enumField,proto3,enum=linka.cloud.test.Test_Type" json:"enum_field,omitempty"`
	MessageField         *Test                   `protobuf:"bytes,5,opt,name=message_field,json=messageField,proto3" json:"message_field,omitempty"`
	RepeatedStringField  []string                `protobuf:"bytes,6,rep,name=repeated_string_field,json=repeatedStringField,proto3" json:"repeated_string_field,omitempty"`
	RepeatedMessageField []*Test                 `protobuf:"bytes,7,rep,name=repeated_message_field,json=repeatedMessageField,proto3" json:"repeated_message_field,omitempty"`
	NumberValueField     *wrapperspb.Int64Value  `protobuf:"bytes,8,opt,name=number_value_field,json=numberValueField,proto3" json:"number_value_field,omitempty"`
	StringValueField     *wrapperspb.StringValue `protobuf:"bytes,9,opt,name=string_value_field,json=stringValueField,proto3" json:"string_value_field,omitempty"`
	BoolValueField       *wrapperspb.BoolValue   `protobuf:"bytes,10,opt,name=bool_value_field,json=boolValueField,proto3" json:"bool_value_field,omitempty"`
	TimeValueField       *timestamppb.Timestamp  `protobuf:"bytes,11,opt,name=time_value_field,json=timeValueField,proto3" json:"time_value_field,omitempty"`
	DurationValueField   *durationpb.Duration    `protobuf:"bytes,12,opt,name=duration_value_field,json=durationValueField,proto3" json:"duration_value_field,omitempty"`
	OptionalStringField  *string                 `` /* 127-byte string literal not displayed */
	OptionalNumberField  *int64                  `` /* 128-byte string literal not displayed */
	OptionalBoolField    *bool                   `protobuf:"varint,15,opt,name=optional_bool_field,json=optionalBoolField,proto3,oneof" json:"optional_bool_field,omitempty"`
	OptionalEnumField    *Test_Type              `` /* 154-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Test) Descriptor deprecated

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

Deprecated: Use Test.ProtoReflect.Descriptor instead.

func (*Test) GetBoolField

func (x *Test) GetBoolField() bool

func (*Test) GetBoolValueField

func (x *Test) GetBoolValueField() *wrapperspb.BoolValue

func (*Test) GetDurationValueField

func (x *Test) GetDurationValueField() *durationpb.Duration

func (*Test) GetEnumField

func (x *Test) GetEnumField() Test_Type

func (*Test) GetMessageField

func (x *Test) GetMessageField() *Test

func (*Test) GetNumberField

func (x *Test) GetNumberField() int64

func (*Test) GetNumberValueField

func (x *Test) GetNumberValueField() *wrapperspb.Int64Value

func (*Test) GetOptionalBoolField added in v0.3.0

func (x *Test) GetOptionalBoolField() bool

func (*Test) GetOptionalEnumField added in v0.3.0

func (x *Test) GetOptionalEnumField() Test_Type

func (*Test) GetOptionalNumberField added in v0.3.0

func (x *Test) GetOptionalNumberField() int64

func (*Test) GetOptionalStringField added in v0.3.0

func (x *Test) GetOptionalStringField() string

func (*Test) GetRepeatedMessageField

func (x *Test) GetRepeatedMessageField() []*Test

func (*Test) GetRepeatedStringField

func (x *Test) GetRepeatedStringField() []string

func (*Test) GetStringField

func (x *Test) GetStringField() string

func (*Test) GetStringValueField

func (x *Test) GetStringValueField() *wrapperspb.StringValue

func (*Test) GetTimeValueField

func (x *Test) GetTimeValueField() *timestamppb.Timestamp

func (*Test) MarshalToSizedBufferVT added in v0.2.2

func (m *Test) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Test) MarshalToVT added in v0.2.2

func (m *Test) MarshalToVT(dAtA []byte) (int, error)

func (*Test) MarshalVT added in v0.2.2

func (m *Test) MarshalVT() (dAtA []byte, err error)

func (*Test) ProtoMessage

func (*Test) ProtoMessage()

func (*Test) ProtoReflect

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

func (*Test) Reset

func (x *Test) Reset()

func (*Test) SizeVT added in v0.2.2

func (m *Test) SizeVT() (n int)

func (*Test) String

func (x *Test) String() string

func (*Test) UnmarshalVT added in v0.2.2

func (m *Test) UnmarshalVT(dAtA []byte) error

type TestFilter added in v0.5.0

type TestFilter struct {
	StringField filters.StringFilterer
	NumberField filters.NumberFilterer
	BoolField   filters.BoolFilterer
	// EnumField
	// MessageField
	// RepeatedStringField
	// RepeatedMessageField
	NumberValueField    filters.NullableNumberFilterer
	StringValueField    filters.NullableStringFilterer
	BoolValueField      filters.NullableBoolFilterer
	TimeValueField      filters.TimeFilterer
	DurationValueField  filters.DurationFilterer
	OptionalStringField filters.StringFilterer
	OptionalNumberField filters.NumberFilterer
	OptionalBoolField   filters.BoolFilterer
}

type Test_Type

type Test_Type int32
const (
	Test_NONE Test_Type = 0
	Test_ONE  Test_Type = 1
	Test_TWO  Test_Type = 2
)

func (Test_Type) Descriptor

func (Test_Type) Descriptor() protoreflect.EnumDescriptor

func (Test_Type) Enum

func (x Test_Type) Enum() *Test_Type

func (Test_Type) EnumDescriptor deprecated

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

Deprecated: Use Test_Type.Descriptor instead.

func (Test_Type) Number

func (x Test_Type) Number() protoreflect.EnumNumber

func (Test_Type) String

func (x Test_Type) String() string

func (Test_Type) Type

Jump to

Keyboard shortcuts

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