MCPcopy Create free account
hub / github.com/TheThingsNetwork/lorawan-stack / GetAllIDs

Method GetAllIDs

pkg/frequencyplans/frequencyplans.go:717–733  ·  view source on GitHub ↗

GetAllIDs returns the list of IDs of the available frequency plans.

()

Source from the content-addressed store, hash-verified

715
716// GetAllIDs returns the list of IDs of the available frequency plans.
717func (s *Store) GetAllIDs() ([]string, error) {
718 if s == nil {
719 return nil, errNotConfigured.New()
720 }
721
722 descriptions, err := s.descriptions()
723 if err != nil {
724 return nil, errReadList.WithCause(err)
725 }
726
727 ids := []string{}
728 for _, description := range descriptions {
729 ids = append(ids, description.ID)
730 }
731
732 return ids, nil
733}

Callers 5

ExampleFunction · 0.95
TestInvalidStoreFunction · 0.95
TestEmptyStoreFunction · 0.95
TestStoreFunction · 0.95
ForEachFrequencyPlanFunction · 0.80

Calls 3

descriptionsMethod · 0.95
NewMethod · 0.65
WithCauseMethod · 0.45

Tested by 4

ExampleFunction · 0.76
TestInvalidStoreFunction · 0.76
TestEmptyStoreFunction · 0.76
TestStoreFunction · 0.76