reorganize code

This commit is contained in:
2024-08-23 10:18:39 -05:00
parent 6a56b2300a
commit dbc8ca3d29
20 changed files with 476 additions and 214 deletions

19
core/model/keypad_size.go Normal file
View File

@@ -0,0 +1,19 @@
package model
type KeypadSize struct {
AttrsPerKey int `json:"attrs_per_key"`
NumbOfKeys int `json:"numb_of_keys"`
}
func (kp *KeypadSize) TotalAttrs() int {
return kp.AttrsPerKey * kp.NumbOfKeys
}
func (kp *KeypadSize) IsDispersable() bool {
return kp.AttrsPerKey <= kp.NumbOfKeys
}
type EncipheredNKode struct {
Code string
Mask string
}