reorganize code
This commit is contained in:
19
core/model/keypad_size.go
Normal file
19
core/model/keypad_size.go
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user