Files
go-nkode/models/models.go
2024-08-21 08:20:51 -05:00

20 lines
352 B
Go

package models
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
}