Documentation
¶
Index ¶
- Variables
- func CalculateCompressedPublicKeyBytes(pub *ecdsa.PublicKey) []byte
- func CalculateNetworkGatewayID(priv *ecdsa.PrivateKey) lorawan.EUI64
- func CalculatePublicKeyBytes(pub *ecdsa.PublicKey) []byte
- func GeneratePrivateKey() (*ecdsa.PrivateKey, error)
- func SignPlainBatchOnboardMessage(chainID *big.Int, contract common.Address, owner common.Address, version uint8, ...) ([]byte, error)
- type Config
- type Gateway
- type GatewayYamlFileStore
- func (store *GatewayYamlFileStore) AddGateway(localID lorawan.EUI64, key *ecdsa.PrivateKey) error
- func (store *GatewayYamlFileStore) GatewayByLocalID(id lorawan.EUI64) (*Gateway, error)
- func (store *GatewayYamlFileStore) GatewayByLocalIDBytes(id []byte) (*Gateway, error)
- func (store *GatewayYamlFileStore) GatewayByNetworkID(id lorawan.EUI64) (*Gateway, error)
- func (store *GatewayYamlFileStore) GatewayByNetworkIDBytes(id []byte) (*Gateway, error)
- func (store *GatewayYamlFileStore) GatewayByThingsIxID(id [32]byte) (*Gateway, error)
- func (store *GatewayYamlFileStore) Gateways() []*Gateway
- type Store
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrStoreNotExists = fmt.Errorf("gateway store doesn't exists") ErrNotFound = fmt.Errorf("not found") ErrAlreadyExists = fmt.Errorf("already exists") ErrInvalidGatewayID = fmt.Errorf("invalid gateway ID") )
View Source
var (
Cmd = &cobra.Command{
Use: "gateway",
Short: "gateway related commands",
}
)
Functions ¶
func CalculateNetworkGatewayID ¶
func CalculateNetworkGatewayID(priv *ecdsa.PrivateKey) lorawan.EUI64
func CalculatePublicKeyBytes ¶
func GeneratePrivateKey ¶
func GeneratePrivateKey() (*ecdsa.PrivateKey, error)
Types ¶
type Gateway ¶
type Gateway struct {
LocalGatewayID lorawan.EUI64
NetworkGatewayID lorawan.EUI64
PrivateKey *ecdsa.PrivateKey
PublicKey *ecdsa.PublicKey
PublicKeyBytes []byte
CompressedPublicKeyBytes []byte
Owner common.Address
}
func NewGateway ¶
func (Gateway) CompressedPubKeyBytes ¶
CompressedPubKeyBytes returns the compressed public key including 0x02 prefix
type GatewayYamlFileStore ¶
type GatewayYamlFileStore struct {
Path string
// contains filtered or unexported fields
}
func LoadGatewayYamlFileStore ¶
func LoadGatewayYamlFileStore(path string) (*GatewayYamlFileStore, error)
func (*GatewayYamlFileStore) AddGateway ¶
func (store *GatewayYamlFileStore) AddGateway(localID lorawan.EUI64, key *ecdsa.PrivateKey) error
func (*GatewayYamlFileStore) GatewayByLocalID ¶
func (store *GatewayYamlFileStore) GatewayByLocalID(id lorawan.EUI64) (*Gateway, error)
func (*GatewayYamlFileStore) GatewayByLocalIDBytes ¶
func (store *GatewayYamlFileStore) GatewayByLocalIDBytes(id []byte) (*Gateway, error)
func (*GatewayYamlFileStore) GatewayByNetworkID ¶
func (store *GatewayYamlFileStore) GatewayByNetworkID(id lorawan.EUI64) (*Gateway, error)
func (*GatewayYamlFileStore) GatewayByNetworkIDBytes ¶
func (store *GatewayYamlFileStore) GatewayByNetworkIDBytes(id []byte) (*Gateway, error)
func (*GatewayYamlFileStore) GatewayByThingsIxID ¶
func (store *GatewayYamlFileStore) GatewayByThingsIxID(id [32]byte) (*Gateway, error)
func (*GatewayYamlFileStore) Gateways ¶
func (store *GatewayYamlFileStore) Gateways() []*Gateway
type Store ¶
type Store interface {
Gateways() []*Gateway
GatewayByLocalID(id lorawan.EUI64) (*Gateway, error)
GatewayByLocalIDBytes(id []byte) (*Gateway, error)
GatewayByNetworkID(id lorawan.EUI64) (*Gateway, error)
GatewayByNetworkIDBytes(id []byte) (*Gateway, error)
GatewayByThingsIxID([32]byte) (*Gateway, error)
AddGateway(localID lorawan.EUI64, key *ecdsa.PrivateKey) error
}
Store defines a gateway store.
Click to show internal directories.
Click to hide internal directories.