Skip to content

Commit

Permalink
chore(encoder): no more useless types
Browse files Browse the repository at this point in the history
  • Loading branch information
simylein committed Jan 24, 2025
1 parent ad0c2a8 commit c7d4f5a
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions pkg/encoder/encoder.go
Original file line number Diff line number Diff line change
@@ -1,24 +1,5 @@
package encoder

import "reflect"

// FieldConfig defines the structure of a single field in the payload
type FieldConfig struct {
Name string
Start int
Length int
Transform func(interface{}) interface{}
Optional bool
Hex bool
}

// PayloadConfig defines the overall structure of the payload, including the target struct type
type PayloadConfig struct {
Fields []FieldConfig
TargetType reflect.Type
StatusByteIndex *int // can be nil
}

type Encoder interface {
Encode(interface{}, int16, string) (interface{}, interface{}, error)
}

0 comments on commit c7d4f5a

Please sign in to comment.