Documentation ¶
Index ¶
- Variables
- type Beta
- type BetaBuilder
- type Bit
- type BitBuilder
- type BitmaskEnum
- type BitmaskEnumBuilder
- type Box
- type BoxBuilder
- type Deprecated
- func (p *Deprecated) GetMessage() string
- func (p *Deprecated) Read(iprot thrift.Protocol) error
- func (p *Deprecated) ReadField1(iprot thrift.Protocol) error
- func (d *Deprecated) SetMessage(message string) *Deprecated
- func (p *Deprecated) String() string
- func (p *Deprecated) Write(oprot thrift.Protocol) error
- type DeprecatedBuilder
- type ExceptionMessage
- func (p *ExceptionMessage) GetField() string
- func (p *ExceptionMessage) Read(iprot thrift.Protocol) error
- func (p *ExceptionMessage) ReadField1(iprot thrift.Protocol) error
- func (e *ExceptionMessage) SetField(field string) *ExceptionMessage
- func (p *ExceptionMessage) String() string
- func (p *ExceptionMessage) Write(oprot thrift.Protocol) error
- type ExceptionMessageBuilder
- type Experimental
- type ExperimentalBuilder
- type GenDefaultEnumValue
- func (p *GenDefaultEnumValue) GetName() string
- func (p *GenDefaultEnumValue) Read(iprot thrift.Protocol) error
- func (p *GenDefaultEnumValue) ReadField1(iprot thrift.Protocol) error
- func (g *GenDefaultEnumValue) SetName(name string) *GenDefaultEnumValue
- func (p *GenDefaultEnumValue) String() string
- func (p *GenDefaultEnumValue) Write(oprot thrift.Protocol) error
- type GenDefaultEnumValueBuilder
- type GenEnumSet
- func (p *GenEnumSet) GetName() string
- func (p *GenEnumSet) Read(iprot thrift.Protocol) error
- func (p *GenEnumSet) ReadField1(iprot thrift.Protocol) error
- func (g *GenEnumSet) SetName(name string) *GenEnumSet
- func (p *GenEnumSet) String() string
- func (p *GenEnumSet) Write(oprot thrift.Protocol) error
- type GenEnumSetBuilder
- type GenerateRuntimeSchema
- func (p *GenerateRuntimeSchema) GetName() string
- func (p *GenerateRuntimeSchema) Read(iprot thrift.Protocol) error
- func (p *GenerateRuntimeSchema) ReadField1(iprot thrift.Protocol) error
- func (g *GenerateRuntimeSchema) SetName(name string) *GenerateRuntimeSchema
- func (p *GenerateRuntimeSchema) String() string
- func (p *GenerateRuntimeSchema) Write(oprot thrift.Protocol) error
- type GenerateRuntimeSchemaBuilder
- type InternBox
- type InternBoxBuilder
- type Legacy
- type LegacyBuilder
- type Mixin
- type MixinBuilder
- type NoBeta
- type NoBetaBuilder
- type NoDeprecated
- type NoDeprecatedBuilder
- type NoExperimental
- type NoExperimentalBuilder
- type NoLegacy
- type NoLegacyBuilder
- type NoTesting
- type NoTestingBuilder
- type Released
- type ReleasedBuilder
- type RequiresBackwardCompatibility
- func (p *RequiresBackwardCompatibility) GetFieldName() bool
- func (p *RequiresBackwardCompatibility) Read(iprot thrift.Protocol) error
- func (p *RequiresBackwardCompatibility) ReadField1(iprot thrift.Protocol) error
- func (r *RequiresBackwardCompatibility) SetFieldName(fieldName bool) *RequiresBackwardCompatibility
- func (p *RequiresBackwardCompatibility) String() string
- func (p *RequiresBackwardCompatibility) Write(oprot thrift.Protocol) error
- type RequiresBackwardCompatibilityBuilder
- type ReserveIds
- func (p *ReserveIds) GetIdRanges() map[int32]int32
- func (p *ReserveIds) GetIds() []int32
- func (p *ReserveIds) Read(iprot thrift.Protocol) error
- func (p *ReserveIds) ReadField1(iprot thrift.Protocol) error
- func (p *ReserveIds) ReadField2(iprot thrift.Protocol) error
- func (r *ReserveIds) SetIdRanges(idRanges map[int32]int32) *ReserveIds
- func (r *ReserveIds) SetIds(ids []int32) *ReserveIds
- func (p *ReserveIds) String() string
- func (p *ReserveIds) Write(oprot thrift.Protocol) error
- type ReserveIdsBuilder
- type SerializeInFieldIdOrder
- type SerializeInFieldIdOrderBuilder
- type TerseWrite
- type TerseWriteBuilder
- type Testing
- type TestingBuilder
- type V1
- type V1Builder
- type V1alpha
- type V1alphaBuilder
- type V1beta
- type V1betaBuilder
- type V1test
- type V1testBuilder
Constants ¶
This section is empty.
Variables ¶
var GoUnusedProtection__ int
Functions ¶
This section is empty.
Types ¶
type BetaBuilder ¶
type BetaBuilder struct {
// contains filtered or unexported fields
}
func NewBetaBuilder ¶
func NewBetaBuilder() *BetaBuilder
func (BetaBuilder) Emit ¶
func (p BetaBuilder) Emit() *Beta
type Bit ¶
type Bit struct { }
Indicates that a boolean type **may** be 'packed' in memory.
This allows an implementation to not allocate a full native 'bool' type, and instead use a single 'isset' bit to store the value.
All fields that use such a type **must** be 'terse'.
type BitBuilder ¶
type BitBuilder struct {
// contains filtered or unexported fields
}
func NewBitBuilder ¶
func NewBitBuilder() *BitBuilder
func (BitBuilder) Emit ¶
func (p BitBuilder) Emit() *Bit
type BitmaskEnum ¶
type BitmaskEnum struct { }
Indicates an enum is a bitmask and should support bit-wise operators.
func NewBitmaskEnum ¶
func NewBitmaskEnum() *BitmaskEnum
func (*BitmaskEnum) String ¶
func (p *BitmaskEnum) String() string
type BitmaskEnumBuilder ¶
type BitmaskEnumBuilder struct {
// contains filtered or unexported fields
}
func NewBitmaskEnumBuilder ¶
func NewBitmaskEnumBuilder() *BitmaskEnumBuilder
func (BitmaskEnumBuilder) Emit ¶
func (p BitmaskEnumBuilder) Emit() *BitmaskEnum
type BoxBuilder ¶
type BoxBuilder struct {
// contains filtered or unexported fields
}
func NewBoxBuilder ¶
func NewBoxBuilder() *BoxBuilder
func (BoxBuilder) Emit ¶
func (p BoxBuilder) Emit() *Box
type Deprecated ¶
type Deprecated struct {
Message string `thrift:"message,1" db:"message" json:"message"`
}
Indicates a definition/feature should no longer be used.
Attributes:
- Message
func NewDeprecated ¶
func NewDeprecated() *Deprecated
func (*Deprecated) GetMessage ¶
func (p *Deprecated) GetMessage() string
func (*Deprecated) ReadField1 ¶
func (p *Deprecated) ReadField1(iprot thrift.Protocol) error
func (*Deprecated) SetMessage ¶
func (d *Deprecated) SetMessage(message string) *Deprecated
func (*Deprecated) String ¶
func (p *Deprecated) String() string
type DeprecatedBuilder ¶
type DeprecatedBuilder struct {
// contains filtered or unexported fields
}
func NewDeprecatedBuilder ¶
func NewDeprecatedBuilder() *DeprecatedBuilder
func (DeprecatedBuilder) Emit ¶
func (p DeprecatedBuilder) Emit() *Deprecated
func (*DeprecatedBuilder) Message ¶
func (d *DeprecatedBuilder) Message(message string) *DeprecatedBuilder
type ExceptionMessage ¶
type ExceptionMessage struct {
Field string `thrift:"field,1" db:"field" json:"field"`
}
Specifies the field where the exception message is stored. The field is used to generate an additional method to get it.
Attributes:
- Field
func NewExceptionMessage ¶
func NewExceptionMessage() *ExceptionMessage
func (*ExceptionMessage) GetField ¶
func (p *ExceptionMessage) GetField() string
func (*ExceptionMessage) ReadField1 ¶
func (p *ExceptionMessage) ReadField1(iprot thrift.Protocol) error
func (*ExceptionMessage) SetField ¶
func (e *ExceptionMessage) SetField(field string) *ExceptionMessage
func (*ExceptionMessage) String ¶
func (p *ExceptionMessage) String() string
type ExceptionMessageBuilder ¶
type ExceptionMessageBuilder struct {
// contains filtered or unexported fields
}
func NewExceptionMessageBuilder ¶
func NewExceptionMessageBuilder() *ExceptionMessageBuilder
func (ExceptionMessageBuilder) Emit ¶
func (p ExceptionMessageBuilder) Emit() *ExceptionMessage
func (*ExceptionMessageBuilder) Field ¶
func (e *ExceptionMessageBuilder) Field(field string) *ExceptionMessageBuilder
type Experimental ¶
type Experimental struct { }
Indicates a definition/feature should only be used with permission, may only work in specific contexts, and may change in incompatible ways without notice.
func NewExperimental ¶
func NewExperimental() *Experimental
func (*Experimental) String ¶
func (p *Experimental) String() string
type ExperimentalBuilder ¶
type ExperimentalBuilder struct {
// contains filtered or unexported fields
}
func NewExperimentalBuilder ¶
func NewExperimentalBuilder() *ExperimentalBuilder
func (ExperimentalBuilder) Emit ¶
func (p ExperimentalBuilder) Emit() *Experimental
type GenDefaultEnumValue ¶
type GenDefaultEnumValue struct {
Name string `thrift:"name,1" db:"name" json:"name"`
}
Adds a default enum value (0), with the given name, if one is not already defined.
All v1+ enums must have an explicitly defined default value (0). This annotation automatically adds such a value if not already present.
Attributes:
- Name: The name to use for the generated enum value.
This intentionally does **not** use the most common 'zero' enum value name, 'Default', by default; as, defining a `Default = 0` enum value explicitly is a useful means of self-documenting that setting an explicit value is never required. In which case, it is part of the API, and should not be removed in favor of an implicitly generated value.
On the other hand, 'Unspecified' clearly indicates that the requirements are not intrinsic to the enum. In which case, the relevant documentation should be consulted (e.g. the doc strings on the function or field).
func NewGenDefaultEnumValue ¶
func NewGenDefaultEnumValue() *GenDefaultEnumValue
func (*GenDefaultEnumValue) GetName ¶
func (p *GenDefaultEnumValue) GetName() string
func (*GenDefaultEnumValue) ReadField1 ¶
func (p *GenDefaultEnumValue) ReadField1(iprot thrift.Protocol) error
func (*GenDefaultEnumValue) SetName ¶
func (g *GenDefaultEnumValue) SetName(name string) *GenDefaultEnumValue
func (*GenDefaultEnumValue) String ¶
func (p *GenDefaultEnumValue) String() string
type GenDefaultEnumValueBuilder ¶
type GenDefaultEnumValueBuilder struct {
// contains filtered or unexported fields
}
func NewGenDefaultEnumValueBuilder ¶
func NewGenDefaultEnumValueBuilder() *GenDefaultEnumValueBuilder
func (GenDefaultEnumValueBuilder) Emit ¶
func (p GenDefaultEnumValueBuilder) Emit() *GenDefaultEnumValue
func (*GenDefaultEnumValueBuilder) Name ¶
func (g *GenDefaultEnumValueBuilder) Name(name string) *GenDefaultEnumValueBuilder
type GenEnumSet ¶
type GenEnumSet struct {
Name string `thrift:"name,1" db:"name" json:"name"`
}
Adds a typedef of {enum}Set that is sutable for storing a `packed` set of values for the annotated enum.
Any enum with this annotation must only have values between 1 and 32 inclusive.
For example:
@thrift.GenEnumSet enum Flag { Option1 = 1, ... }
Generates the equivalent of:
@cpp.Adapter("::apache::thrift::EnumSetAdapter<::ns::Flag>") ... typedef i32 FlagSet
`FlagSet` can then be used like a normal typedef.
Attributes:
- Name: If a custom name is not provided, `{EnumName}Set` is used.
func NewGenEnumSet ¶
func NewGenEnumSet() *GenEnumSet
func (*GenEnumSet) GetName ¶
func (p *GenEnumSet) GetName() string
func (*GenEnumSet) ReadField1 ¶
func (p *GenEnumSet) ReadField1(iprot thrift.Protocol) error
func (*GenEnumSet) SetName ¶
func (g *GenEnumSet) SetName(name string) *GenEnumSet
func (*GenEnumSet) String ¶
func (p *GenEnumSet) String() string
type GenEnumSetBuilder ¶
type GenEnumSetBuilder struct {
// contains filtered or unexported fields
}
func NewGenEnumSetBuilder ¶
func NewGenEnumSetBuilder() *GenEnumSetBuilder
func (GenEnumSetBuilder) Emit ¶
func (p GenEnumSetBuilder) Emit() *GenEnumSet
func (*GenEnumSetBuilder) Name ¶
func (g *GenEnumSetBuilder) Name(name string) *GenEnumSetBuilder
type GenerateRuntimeSchema ¶
type GenerateRuntimeSchema struct {
Name string `thrift:"name,1" db:"name" json:"name"`
}
Generates a const of type schema. Struct containing the schema of the annotated type. Optionally specify name to override default schema<structName>.
Attributes:
- Name
func NewGenerateRuntimeSchema ¶
func NewGenerateRuntimeSchema() *GenerateRuntimeSchema
func (*GenerateRuntimeSchema) GetName ¶
func (p *GenerateRuntimeSchema) GetName() string
func (*GenerateRuntimeSchema) Read ¶
func (p *GenerateRuntimeSchema) Read(iprot thrift.Protocol) error
func (*GenerateRuntimeSchema) ReadField1 ¶
func (p *GenerateRuntimeSchema) ReadField1(iprot thrift.Protocol) error
func (*GenerateRuntimeSchema) SetName ¶
func (g *GenerateRuntimeSchema) SetName(name string) *GenerateRuntimeSchema
func (*GenerateRuntimeSchema) String ¶
func (p *GenerateRuntimeSchema) String() string
type GenerateRuntimeSchemaBuilder ¶
type GenerateRuntimeSchemaBuilder struct {
// contains filtered or unexported fields
}
func NewGenerateRuntimeSchemaBuilder ¶
func NewGenerateRuntimeSchemaBuilder() *GenerateRuntimeSchemaBuilder
func (GenerateRuntimeSchemaBuilder) Emit ¶
func (p GenerateRuntimeSchemaBuilder) Emit() *GenerateRuntimeSchema
func (*GenerateRuntimeSchemaBuilder) Name ¶
func (g *GenerateRuntimeSchemaBuilder) Name(name string) *GenerateRuntimeSchemaBuilder
type InternBox ¶
type InternBox struct { }
Indicates that a field's value should never be stored on the stack, and that identical values can be shared in immutable contexts.
func NewInternBox ¶
func NewInternBox() *InternBox
type InternBoxBuilder ¶
type InternBoxBuilder struct {
// contains filtered or unexported fields
}
func NewInternBoxBuilder ¶
func NewInternBoxBuilder() *InternBoxBuilder
func (InternBoxBuilder) Emit ¶
func (p InternBoxBuilder) Emit() *InternBox
type Legacy ¶
type Legacy struct {
Message string `thrift:"message,1" db:"message" json:"message"`
}
Indicates a definition/feature will be removed in the next release.
Pleased migrate off of all @Legacy as soon as possible.
Attributes:
- Message
func (*Legacy) GetMessage ¶
func (*Legacy) SetMessage ¶
type LegacyBuilder ¶
type LegacyBuilder struct {
// contains filtered or unexported fields
}
func NewLegacyBuilder ¶
func NewLegacyBuilder() *LegacyBuilder
func (LegacyBuilder) Emit ¶
func (p LegacyBuilder) Emit() *Legacy
func (*LegacyBuilder) Message ¶
func (l *LegacyBuilder) Message(message string) *LegacyBuilder
type MixinBuilder ¶
type MixinBuilder struct {
// contains filtered or unexported fields
}
func NewMixinBuilder ¶
func NewMixinBuilder() *MixinBuilder
func (MixinBuilder) Emit ¶
func (p MixinBuilder) Emit() *Mixin
type NoBetaBuilder ¶
type NoBetaBuilder struct {
// contains filtered or unexported fields
}
func NewNoBetaBuilder ¶
func NewNoBetaBuilder() *NoBetaBuilder
func (NoBetaBuilder) Emit ¶
func (p NoBetaBuilder) Emit() *NoBeta
type NoDeprecated ¶
type NoDeprecated struct { }
Disables @Deprecated features.
Should only be enabled in `test` versions, as deprecated implies removing the feature will break current usage (otherwise it would be @Legacy or deleted)
func NewNoDeprecated ¶
func NewNoDeprecated() *NoDeprecated
func (*NoDeprecated) String ¶
func (p *NoDeprecated) String() string
type NoDeprecatedBuilder ¶
type NoDeprecatedBuilder struct {
// contains filtered or unexported fields
}
func NewNoDeprecatedBuilder ¶
func NewNoDeprecatedBuilder() *NoDeprecatedBuilder
func (NoDeprecatedBuilder) Emit ¶
func (p NoDeprecatedBuilder) Emit() *NoDeprecated
type NoExperimental ¶
type NoExperimental struct { }
Disables experimental features.
func NewNoExperimental ¶
func NewNoExperimental() *NoExperimental
func (*NoExperimental) String ¶
func (p *NoExperimental) String() string
type NoExperimentalBuilder ¶
type NoExperimentalBuilder struct {
// contains filtered or unexported fields
}
func NewNoExperimentalBuilder ¶
func NewNoExperimentalBuilder() *NoExperimentalBuilder
func (NoExperimentalBuilder) Emit ¶
func (p NoExperimentalBuilder) Emit() *NoExperimental
type NoLegacy ¶
type NoLegacy struct { }
Disables @Legacy features.
func NewNoLegacy ¶
func NewNoLegacy() *NoLegacy
type NoLegacyBuilder ¶
type NoLegacyBuilder struct {
// contains filtered or unexported fields
}
func NewNoLegacyBuilder ¶
func NewNoLegacyBuilder() *NoLegacyBuilder
func (NoLegacyBuilder) Emit ¶
func (p NoLegacyBuilder) Emit() *NoLegacy
type NoTesting ¶
type NoTesting struct { }
Disables testing features.
func NewNoTesting ¶
func NewNoTesting() *NoTesting
type NoTestingBuilder ¶
type NoTestingBuilder struct {
// contains filtered or unexported fields
}
func NewNoTestingBuilder ¶
func NewNoTestingBuilder() *NoTestingBuilder
func (NoTestingBuilder) Emit ¶
func (p NoTestingBuilder) Emit() *NoTesting
type Released ¶
type Released struct { }
Indicates a definition/feature must not depend directly on an unreleased or testing definition/feature.
func NewReleased ¶
func NewReleased() *Released
type ReleasedBuilder ¶
type ReleasedBuilder struct {
// contains filtered or unexported fields
}
func NewReleasedBuilder ¶
func NewReleasedBuilder() *ReleasedBuilder
func (ReleasedBuilder) Emit ¶
func (p ReleasedBuilder) Emit() *Released
type RequiresBackwardCompatibility ¶
type RequiresBackwardCompatibility struct {
FieldName bool `thrift:"field_name,1" db:"field_name" json:"field_name"`
}
Indicates additional backward compatibility restrictions, beyond the standard Thrift required 'wire' compatibility.
Attributes:
- FieldName
func NewRequiresBackwardCompatibility ¶
func NewRequiresBackwardCompatibility() *RequiresBackwardCompatibility
func (*RequiresBackwardCompatibility) GetFieldName ¶
func (p *RequiresBackwardCompatibility) GetFieldName() bool
func (*RequiresBackwardCompatibility) Read ¶
func (p *RequiresBackwardCompatibility) Read(iprot thrift.Protocol) error
func (*RequiresBackwardCompatibility) ReadField1 ¶
func (p *RequiresBackwardCompatibility) ReadField1(iprot thrift.Protocol) error
func (*RequiresBackwardCompatibility) SetFieldName ¶
func (r *RequiresBackwardCompatibility) SetFieldName(fieldName bool) *RequiresBackwardCompatibility
func (*RequiresBackwardCompatibility) String ¶
func (p *RequiresBackwardCompatibility) String() string
type RequiresBackwardCompatibilityBuilder ¶
type RequiresBackwardCompatibilityBuilder struct {
// contains filtered or unexported fields
}
func NewRequiresBackwardCompatibilityBuilder ¶
func NewRequiresBackwardCompatibilityBuilder() *RequiresBackwardCompatibilityBuilder
func (RequiresBackwardCompatibilityBuilder) Emit ¶
func (p RequiresBackwardCompatibilityBuilder) Emit() *RequiresBackwardCompatibility
func (*RequiresBackwardCompatibilityBuilder) FieldName ¶
func (r *RequiresBackwardCompatibilityBuilder) FieldName(fieldName bool) *RequiresBackwardCompatibilityBuilder
type ReserveIds ¶
type ReserveIds struct { Ids []int32 `thrift:"ids,1" db:"ids" json:"ids"` IdRanges map[int32]int32 `thrift:"id_ranges,2" db:"id_ranges" json:"id_ranges"` }
Annotate a thrift structured or enum to indicate if ids or values should not be used.
For example, you may want to mark ids as deprecated, or these ids might be reserved for other use cases or annotations.
The resolved set of disallowed ids is the union of the values in `ids` and the range of values represented in `id_ranges`. Example:
// These ids are not allowed: 3, 8, half-open ranges [10, 15), [20, 30) @thrift.ReserveIds{ids = [3, 8], id_ranges = {10: 15, 20: 30}} struct Foo { ... 3: i64 f; // Build failure: 3 cannot be used }
Attributes:
- Ids: Individual ids that cannot be used.
- IdRanges: Represents ranges of ids that cannot be used.
Each (key: value) pair represents the half-open range `[key, value)`, where `key` is included and `value` is not. For example the map `{10: 15, 20: 30}` represents the union of id/value ranges `[10, 15)` and `[20, 30)`
func NewReserveIds ¶
func NewReserveIds() *ReserveIds
func (*ReserveIds) GetIdRanges ¶
func (p *ReserveIds) GetIdRanges() map[int32]int32
func (*ReserveIds) GetIds ¶
func (p *ReserveIds) GetIds() []int32
func (*ReserveIds) ReadField1 ¶
func (p *ReserveIds) ReadField1(iprot thrift.Protocol) error
func (*ReserveIds) ReadField2 ¶
func (p *ReserveIds) ReadField2(iprot thrift.Protocol) error
func (*ReserveIds) SetIdRanges ¶
func (r *ReserveIds) SetIdRanges(idRanges map[int32]int32) *ReserveIds
func (*ReserveIds) SetIds ¶
func (r *ReserveIds) SetIds(ids []int32) *ReserveIds
func (*ReserveIds) String ¶
func (p *ReserveIds) String() string
type ReserveIdsBuilder ¶
type ReserveIdsBuilder struct {
// contains filtered or unexported fields
}
func NewReserveIdsBuilder ¶
func NewReserveIdsBuilder() *ReserveIdsBuilder
func (ReserveIdsBuilder) Emit ¶
func (p ReserveIdsBuilder) Emit() *ReserveIds
func (*ReserveIdsBuilder) IdRanges ¶
func (r *ReserveIdsBuilder) IdRanges(idRanges map[int32]int32) *ReserveIdsBuilder
func (*ReserveIdsBuilder) Ids ¶
func (r *ReserveIdsBuilder) Ids(ids []int32) *ReserveIdsBuilder
type SerializeInFieldIdOrder ¶
type SerializeInFieldIdOrder struct { }
Option to serialize thrift struct in ascending field id order.
This can potentially make serialized data size smaller in compact protocol, since compact protocol can write deltas between subsequent field ids.
func NewSerializeInFieldIdOrder ¶
func NewSerializeInFieldIdOrder() *SerializeInFieldIdOrder
func (*SerializeInFieldIdOrder) Read ¶
func (p *SerializeInFieldIdOrder) Read(iprot thrift.Protocol) error
func (*SerializeInFieldIdOrder) String ¶
func (p *SerializeInFieldIdOrder) String() string
type SerializeInFieldIdOrderBuilder ¶
type SerializeInFieldIdOrderBuilder struct {
// contains filtered or unexported fields
}
func NewSerializeInFieldIdOrderBuilder ¶
func NewSerializeInFieldIdOrderBuilder() *SerializeInFieldIdOrderBuilder
func (SerializeInFieldIdOrderBuilder) Emit ¶
func (p SerializeInFieldIdOrderBuilder) Emit() *SerializeInFieldIdOrder
type TerseWrite ¶
type TerseWrite struct { }
An annotation that changes the field qualifier from 'none' to 'terse'. A terse field is eligible to skip serialization, when it equals to the intrinsic default value. It also clears to the intrinsic default value before deserialization to distinguish between if a terse field was skipped or missing during serialization. This is different from an unqualified field, as an unqualified field is always serialized regardless of its value, and it is not cleared before deserialization.
The annotation can be only used to annotate an unqualified field, and when it is annotating a struct or exception, it changes all unqualified fields to terse fields. Note, the annotation can not be used for union.
func NewTerseWrite ¶
func NewTerseWrite() *TerseWrite
func (*TerseWrite) String ¶
func (p *TerseWrite) String() string
type TerseWriteBuilder ¶
type TerseWriteBuilder struct {
// contains filtered or unexported fields
}
func NewTerseWriteBuilder ¶
func NewTerseWriteBuilder() *TerseWriteBuilder
func (TerseWriteBuilder) Emit ¶
func (p TerseWriteBuilder) Emit() *TerseWrite
type Testing ¶
type Testing struct { }
Indicates a definition/feature should only be used in an ephemeral testing enviornment.
Such enviornments only store serialized values temporarly and strictly control which versions of Thrift definitions are used, so 'compatibility' is not a concern.
func NewTesting ¶
func NewTesting() *Testing
type TestingBuilder ¶
type TestingBuilder struct {
// contains filtered or unexported fields
}
func NewTestingBuilder ¶
func NewTestingBuilder() *TestingBuilder
func (TestingBuilder) Emit ¶
func (p TestingBuilder) Emit() *Testing
type V1Builder ¶
type V1Builder struct {
// contains filtered or unexported fields
}
func NewV1Builder ¶
func NewV1Builder() *V1Builder
type V1alpha ¶
type V1alpha struct { }
Enables all experimental v1 features.
Use with *caution* and only with explicit permission. This may enable features may change significantly without notice or not work correctly in all contexts.
func NewV1alpha ¶
func NewV1alpha() *V1alpha
type V1alphaBuilder ¶
type V1alphaBuilder struct {
// contains filtered or unexported fields
}
func NewV1alphaBuilder ¶
func NewV1alphaBuilder() *V1alphaBuilder
func (V1alphaBuilder) Emit ¶
func (p V1alphaBuilder) Emit() *V1alpha
type V1beta ¶
type V1beta struct { }
Enables all beta v1 features.
Beta features are guaranteed to *not* break unrelated Thrift features so they should be relatively safe to test alongside other beta or released Thrift features.
type V1betaBuilder ¶
type V1betaBuilder struct {
// contains filtered or unexported fields
}
func NewV1betaBuilder ¶
func NewV1betaBuilder() *V1betaBuilder
func (V1betaBuilder) Emit ¶
func (p V1betaBuilder) Emit() *V1beta
type V1test ¶
type V1test struct { }
Enables experimental features, even those that are known to break common use cases.
type V1testBuilder ¶
type V1testBuilder struct {
// contains filtered or unexported fields
}
func NewV1testBuilder ¶
func NewV1testBuilder() *V1testBuilder
func (V1testBuilder) Emit ¶
func (p V1testBuilder) Emit() *V1test