Documentation
¶
Index ¶
- func CheckRptrFile(rptrFile string, rptrURL string)
- func CheckUserFile(userFile string, userURL string)
- func GetAliasShort(userFile string, userID string) string
- func GetAliasString(userFile string, userID string) string
- func GetRepeaterCall(rptrFile string, rptID string) string
- func GetUserCall(userFile string, userID string) string
- type WriteCounter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckRptrFile ¶
CheckRptrFile checks to see if the repeater file is present, and if not then downloads it. If the file is present, then check the age. If the file is over 7 days old, redownload it.
func CheckUserFile ¶
CheckUserFile checks to see if the user file is present, and if not then downloads it. If the file is present, then check the age. If the file is over 7 days old, redownload it.
func GetAliasShort ¶
GetAliasShort returns a user's callsign and name. Needs to be cleaned up, for sure. Probably would do better with a variadic function but this is my first attempt at it. It works for now.
func GetAliasString ¶
GetAliasString returns a full alias string for a given user ID. Needs to be cleaned up, for sure. Probably would do better with a variadic function but this is my first attempt at it. It works for now.
func GetRepeaterCall ¶
GetRepeaterCall reads the rptr call file and returns the callsign of the ID that was queried.
func GetUserCall ¶
GetUserCall reads the user call file and returns the callsign of the ID that was queried.
Types ¶
type WriteCounter ¶
type WriteCounter struct {
Total uint64
}
WriteCounter counts the number of bytes written to it. It implements to the io.Writer interface and we can pass this into io.TeeReader() which will report progress on each write cycle.
func (WriteCounter) PrintProgress ¶
func (wc WriteCounter) PrintProgress()
PrintProgress does what it says on the tin. It.. well, it prints the progress.