Documentation
¶
Index ¶
- Constants
- Variables
- func DecodeCRC32(data []byte) ([]byte, error)
- func EncodeCRC32(data []byte) ([]byte, error)
- type Chksum
- type ChksumType
- func (x ChksumType) Enum() *ChksumType
- func (x ChksumType) MarshalJSON() ([]byte, error)
- func (x ChksumType) MarshalProtoJSON(s *json.MarshalState)
- func (x ChksumType) MarshalProtoText() string
- func (x ChksumType) MarshalText() ([]byte, error)
- func (x ChksumType) String() string
- func (x *ChksumType) UnmarshalJSON(b []byte) error
- func (x *ChksumType) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (x *ChksumType) UnmarshalText(b []byte) error
- type Config
- func (m *Config) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *Config) CloneVT() *Config
- func (this *Config) EqualMessageVT(thatMsg any) bool
- func (this *Config) EqualVT(that *Config) bool
- func (c *Config) EqualsConfig(other config.Config) bool
- func (x *Config) GetChksumType() ChksumType
- func (c *Config) GetConfigID() string
- func (x *Config) MarshalJSON() ([]byte, error)
- func (x *Config) MarshalProtoJSON(s *json.MarshalState)
- func (x *Config) MarshalProtoText() string
- func (m *Config) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *Config) MarshalToVT(dAtA []byte) (int, error)
- func (m *Config) MarshalVT() (dAtA []byte, err error)
- func (*Config) ProtoMessage()
- func (x *Config) Reset()
- func (m *Config) SizeVT() (n int)
- func (x *Config) String() string
- func (x *Config) UnmarshalJSON(b []byte) error
- func (x *Config) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *Config) UnmarshalVT(dAtA []byte) error
- func (c *Config) Validate() error
- type StepFactory
Constants ¶
const ConfigID = "hydra/transform/chksum"
ConfigID is the configuration identifier.
Variables ¶
var ( ChksumType_name = map[int32]string{ 0: "ChksumType_UNKNOWN", 1: "ChksumType_CRC32", } ChksumType_value = map[string]int32{ "ChksumType_UNKNOWN": 0, "ChksumType_CRC32": 1, } )
Enum value maps for ChksumType.
Functions ¶
func DecodeCRC32 ¶
DecodeCRC32 is a shortcut for the crc32 checksum transform.
func EncodeCRC32 ¶
EncodeCRC32 is a shortcut for the crc32 checksum transform.
Types ¶
type Chksum ¶
type Chksum struct {
// contains filtered or unexported fields
}
Chksum is the checksum step.
func (*Chksum) DecodeBlock ¶
DecodeBlock decodes the block according to the config. May reuse the same byte slice if possible.
type ChksumType ¶
type ChksumType int32
ChksumType is the checksum type enum.
const ( // ChksumType_UNKNOWN defaults to CRC64. ChksumType_ChksumType_UNKNOWN ChksumType = 0 // ChksumType_CRC32 performs a appended 4 byte crc32 against the data. ChksumType_ChksumType_CRC32 ChksumType = 1 )
func (ChksumType) Enum ¶
func (x ChksumType) Enum() *ChksumType
func (ChksumType) MarshalJSON ¶
func (x ChksumType) MarshalJSON() ([]byte, error)
MarshalJSON marshals the ChksumType to JSON.
func (ChksumType) MarshalProtoJSON ¶
func (x ChksumType) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the ChksumType to JSON.
func (ChksumType) MarshalProtoText ¶
func (x ChksumType) MarshalProtoText() string
func (ChksumType) MarshalText ¶
func (x ChksumType) MarshalText() ([]byte, error)
MarshalText marshals the ChksumType to text.
func (ChksumType) String ¶
func (x ChksumType) String() string
func (*ChksumType) UnmarshalJSON ¶
func (x *ChksumType) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals the ChksumType from JSON.
func (*ChksumType) UnmarshalProtoJSON ¶
func (x *ChksumType) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the ChksumType from JSON.
func (*ChksumType) UnmarshalText ¶
func (x *ChksumType) UnmarshalText(b []byte) error
UnmarshalText unmarshals the ChksumType from text.
type Config ¶
type Config struct {
// ChksumType is the type of chksum to use.
ChksumType ChksumType `protobuf:"varint,1,opt,name=chksum_type,json=chksumType,proto3" json:"chksumType,omitempty"`
// contains filtered or unexported fields
}
Config configures the snappy transform.
func (*Config) CloneMessageVT ¶
func (m *Config) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*Config) EqualMessageVT ¶
func (*Config) EqualsConfig ¶
EqualsConfig checks if the config is equal to another.
func (*Config) GetChksumType ¶
func (x *Config) GetChksumType() ChksumType
func (*Config) GetConfigID ¶
GetConfigID returns the unique string for this configuration type. This string is stored with the encoded config.
func (*Config) MarshalJSON ¶
MarshalJSON marshals the Config to JSON.
func (*Config) MarshalProtoJSON ¶
func (x *Config) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the Config message to JSON.
func (*Config) MarshalProtoText ¶
func (*Config) MarshalToSizedBufferVT ¶
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
func (*Config) UnmarshalJSON ¶
UnmarshalJSON unmarshals the Config from JSON.
func (*Config) UnmarshalProtoJSON ¶
func (x *Config) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the Config message from JSON.
func (*Config) UnmarshalVT ¶
type StepFactory ¶
type StepFactory struct{}
StepFactory constructs the transform step.
func NewStepFactory ¶
func NewStepFactory() *StepFactory
NewStepFactory constructs the factory object.
func (*StepFactory) Construct ¶
func (f *StepFactory) Construct( conf config.Config, opts controller.ConstructOpts, ) (block_transform.Step, error)
Construct constructs the associated transform step given configuration.
func (*StepFactory) ConstructConfig ¶
func (f *StepFactory) ConstructConfig() config.Config
ConstructConfig constructs an instance of the transform configuration.
func (*StepFactory) ConstructMockConfig ¶
func (f *StepFactory) ConstructMockConfig() []config.Config
ConstructMockConfig constructs an instance of the transform configuration for testing.
func (*StepFactory) GetConfigID ¶
func (f *StepFactory) GetConfigID() string
GetConfigID returns the unique config ID for the transform step.