brandmeister

package
v0.0.0-...-55db9b7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 4, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTalkgroups

func GetTalkgroups() (map[string]string, error)

GetTalkgroups fetches all talkgroups from the BM API

Types

type Cluster

type Cluster struct {
	Clusterid   string `json:"clusterid"`
	Clustername string `json:"clustername"`
	Masterid    string `json:"masterid"`
	Talkgroup   string `json:"talkgroup"`
}

Cluster is a cluster of repeaters as fetched from https://api.brandmeister.network/v1.0/repeater/?action=LIST

func GetCluster

func GetCluster(id string) (*Cluster, error)

GetCluster fetches a cluster from the BM API

type Profile

type Profile struct {
	BlockedGroups []interface{} `json:"blockedGroups"`
	Clusters      []struct {
		Clusterid    int64 `json:"clusterid"`
		ExtTalkgroup int64 `json:"extTalkgroup"`
		Repeaterid   int64 `json:"repeaterid"`
		Slot         uint8 `json:"slot"`
		Talkgroup    int64 `json:"talkgroup"`
	} `json:"clusters"`
	DynamicSubscriptions []interface{} `json:"dynamicSubscriptions"`
	Reflector            struct {
		Active    int64 `json:"active"`
		Interval  int64 `json:"interval"`
		Reflector int64 `json:"reflector"`
	} `json:"reflector"`
	StaticSubscriptions []struct {
		Slot      uint8 `json:"slot"`
		Talkgroup int64 `json:"talkgroup"`
	} `json:"staticSubscriptions"`
	TimedSubscriptions []struct {
		Data struct {
			EndDate   int64 `json:"endDate"`
			Friday    int64 `json:"friday"`
			Monday    int64 `json:"monday"`
			Saturday  int64 `json:"saturday"`
			Start     int64 `json:"start"`
			StartDate int64 `json:"startDate"`
			Stop      int64 `json:"stop"`
			Sunday    int64 `json:"sunday"`
			Thursday  int64 `json:"thursday"`
			Tuesday   int64 `json:"tuesday"`
			Wednesday int64 `json:"wednesday"`
		} `json:"data"`
		Recordid   int64 `json:"recordid"`
		Repeaterid int64 `json:"repeaterid"`
		Slot       uint8 `json:"slot"`
		Talkgroup  int64 `json:"talkgroup"`
	} `json:"timedSubscriptions"`
}

func GetProfile

func GetProfile(id string) (*Profile, error)

GetProfile fetches the profile of given repeater from BM API

type Repeater

type Repeater struct {
	Agl                 string `json:"agl"`
	Callsign            string `json:"callsign"`
	City                string `json:"city"`
	Colorcode           uint8  `json:"colorcode,string"`
	Description         string `json:"description"`
	Firmware            string `json:"firmware"`
	Gain                string `json:"gain"`
	Hardware            string `json:"hardware"`
	LastKnownMaster     string `json:"lastKnownMaster"`
	LastUpdated         string `json:"last_updated"`
	Lat                 string `json:"lat"`
	Lng                 string `json:"lng"`
	Pep                 string `json:"pep"`
	PriorityDescription string `json:"priorityDescription"`
	Repeaterid          string `json:"repeaterid"`
	Rx                  string `json:"rx"`
	Status              string `json:"status"`
	Sysops              []struct {
		UserRoles []string `json:"user_roles"`
		Username  string   `json:"username"`
	} `json:"sysops,omitempty"`
	Tx      string `json:"tx"`
	Website string `json:"website"`
}

Repeater is a Brandmeister repeater as fetched from https://api.brandmeister.network/v1.0/repeater/?action=LIST

func GetRepeater

func GetRepeater(id string) (*Repeater, error)

GetRepeater fetches metadata for given repeater from BM API

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL