Documentation
¶
Index ¶
- Constants
- Variables
- func AlbumToArray() []string
- func CategoriesAdd(id string, desc string)
- func CategoriesDelete(row int)
- func CategoriesGet()
- func CategoriesToArray() []string
- func CategoriesUpdate(row int, id string, desc string)
- func CategoriesWhereUsed(cat string) int
- func CategoriesWriteStub(withinventory bool) string
- func CheckBucket(bucket, id, station string) bool
- func ComparePasswords(hashedPwd string, plainPwd []byte) bool
- func DataStore(file string) fyne.URI
- func DaysAdd(day string, desc string, dow int)
- func DaysDelete(row int)
- func DaysGet()
- func DaysUpdate(row int, day string, desc string, dow int)
- func Decrypt(text string, secret string) string
- func DecryptFile(filePathIn, filePathOut string) error
- func DeleteBucket(bucket, id string) error
- func DeleteNatsMessage(seq uint64)
- func Edit(action string, value string) bool
- func Encrypt(text string, secret string) string
- func EncryptFile(filePathIn, filePathOut string) error
- func EraseMessages(queue string)
- func GetBucket(bucket, id, station string) []byte
- func GetBucketSize(bucket, id string) uint64
- func GetDateTime(offsethours string) string
- func GetLangs(c string) string
- func HashAndSalt(pwd []byte) string
- func HoursAdd(id string, desc string)
- func HoursDelete(row int)
- func HoursGet()
- func HoursUpdate(row int, id string, desc string)
- func InventoryAdd(category string, artist string, song string, album string, songlength int, ...) int
- func InventoryDelete(row int)
- func InventoryGet()
- func InventoryGetCount(cat string) int
- func InventoryGetCurrent()
- func InventoryGetRoots()
- func InventoryGetRow(category, artist, song, album string) string
- func InventoryGetRowByRow(rowin string) string
- func InventoryGetRowRecovery(artist, song, album string) string
- func InventoryGetTrafficCount(artist, song, album string) map[string]int
- func InventorySel(cat, art string)
- func InventoryUpdate(row int, category string, artist string, song string, album string, ...)
- func InventoryUpdateRNDORDER()
- func InventoryUpdateRecovery(row, songlength, startson, expireson string, adstimeslots string, ...)
- func LoadHashWithDefault(filename string, password string) (string, bool)
- func NewNatsJS() error
- func NewPGSQL() error
- func PDFCategory(rn, stationid string)
- func PDFCategoryByID() []core.Row
- func PDFDays(rn, stationid string)
- func PDFDaysByDay() []core.Row
- func PDFHours(rn, stationid string)
- func PDFHoursByHour() []core.Row
- func PDFInventory(rn, cat, stationid string)
- func PDFInventoryByCategory(cat string) []core.Row
- func PDFOutput()
- func PDFSchedule(rn, stationid string)
- func PDFScheduleByDay() []core.Row
- func PDFTraffic(rn, stationid string)
- func PDFTrafficByAlbum() []core.Row
- func PDFTrafficPageHeader(rn string) core.Row
- func ParseURL(urlStr string) *url.URL
- func PutBucket(bucket string, id string, data []byte) error
- func ReceiveMESSAGE()
- func ReceiveONAIRMP3()
- func ReceiveONAIRMP4()
- func ReceiveONAIRWAV()
- func SaveHash(filename string, hash string) (string, bool)
- func ScheduleAdd(days string, hours string, position string, categories string, spinstoplay int)
- func ScheduleCopy(dayfrom, dayto, hourfrom, hourto string)
- func ScheduleDelete(row int)
- func ScheduleGet()
- func ScheduleGetCount(cat string) int
- func ScheduleGetPlan(day, hour, pos string)
- func ScheduleSel(day, hour string)
- func ScheduleUpdate(row int, days string, hours string, position string, categories string, ...)
- func Send(subject, m, alias string) bool
- func SendONAIRmp3(m string)
- func SendONAIRmp4(m string)
- func SendONAIRwav(m string)
- func SetupDetails(queue string, age string)
- func SetupNATS()
- func TestBucket(bucket, id string) bool
- func ToPDF(reportname, stationid string)
- func ToString(s []string) string
- func TrafficAdd(category, artist, song, album, playedon string)
- func TrafficCheckDuplicate(date, alb string) int
- func TrafficClear() string
- func TrafficGetAlbum(hours string) string
- func TrafficGetCountByAlbum(date, alb string) int
- func TrafficGetCountByDate(tc, td string) int
- func UserAdd(userrole, userpassword, userpasswordhash string, ...)
- func UserDelete(row int)
- func UserGet()
- func UserUpdate(row int, userrole, userpassword, userpasswordhash string, ...)
- type CategoriesStruct
- type DaysStruct
- type HoursStruct
- type InventoryStruct
- type MessageStore
- type MyTheme
- func (m MyTheme) Color(name fyne.ThemeColorName, variant fyne.ThemeVariant) color.Color
- func (m MyTheme) Font(style fyne.TextStyle) fyne.Resource
- func (m MyTheme) Icon(name fyne.ThemeIconName) fyne.Resource
- func (m MyTheme) SetIcon(name fyne.ThemeIconName, variant fyne.ThemeVariant)
- func (m MyTheme) Size(name fyne.ThemeSizeName) float32
- type Natsjs
- type NatsjsREPORT
- type OA
- type SQLconn
- type ScheduleStruct
- type UserStruct
Constants ¶
const BUFFER_SIZE int = 4096
todo: use circl from cloudfare to encrypt data post quantum crystals-kyber, crystals-dilithium, sphincs=, FALCON
const IV_SIZE int = 16
const MySecret string = "abd&1*~#^2^#s0^=)^^7%c34" // must be 24 characters
const Password = "123456" // default password shipped with app
Variables ¶
var AdsMaxMinutes int
var AlbumArray []string
var CategoriesStore = make(map[int]CategoriesStruct)
var CategoryArray []string
var DBClientcert = "" /* 1096-byte string literal not displayed */
var DBClientkey = "" /* 1732-byte string literal not displayed */
var DBaddress = "192.168.88.232:5432/radio"
var DBaddress = "localhost:5432/radio"
var DBpassword = "postgres"
var DBuser = "postgres"
var Dark = 0
var DarkButton = color.RGBA{187, 188, 201, 32}
var DarkButton = color.RGBA{162, 168, 250, 64}
var DarkDisabled = color.RGBA{187, 188, 201, 64}
var DarkFocus = color.RGBA{187, 188, 201, 64}
var DarkHover = color.RGBA{187, 188, 201, 64}
var DarkHyperlink = color.RGBA{187, 188, 201, 255}
var DarkInputBackground = color.RGBA{187, 188, 201, 32}
var DarkInputBorder = color.RGBA{187, 188, 201, 64}
var DarkPlaceholder = color.RGBA{187, 188, 201, 220}
var DarkPressed = color.RGBA{187, 188, 201, 220}
var DarkPrimary = color.RGBA{187, 188, 201, 255}
var DarkScrollBar = color.RGBA{187, 188, 201, 64}
var DarkScrollBarBackground = color.RGBA{187, 188, 201, 1}
var DarkSelection = color.RGBA{187, 188, 201, 128}
var DarkSeparator = color.RGBA{187, 188, 201, 64}
var DarkShadow = color.RGBA{187, 188, 201, 64}
var DaysStore = make(map[int]DaysStruct)
var FyneApp fyne.App
var FyneCategoryList fyne.Widget
var FyneDaysList fyne.Widget
var FyneDeviceList fyne.Widget
var FyneDeviceWin fyne.Window
var FyneFilter bool
var FyneFilterDevices bool
var FyneInventoryList fyne.Widget
var FyneInventoryWin fyne.Window
var FyneMainWin fyne.Window
var FyneMessageList fyne.Widget
var FyneMessageWin fyne.Window
var FyneScheduleList fyne.Widget
var FyneUserList fyne.Widget
var HashLocation = "/home/oem/.config/fyne/org.nh3000.nh3000/config.hash"
var HoursStore = make(map[int]HoursStruct)
var InventoryStore = make(map[int]InventoryStruct)
var InventoryStoreCurrent = []InventoryStruct{}
var InventoryStoreRoots = []InventoryStruct{}
var KeyAes = []byte{35, 46, 57, 24, 85, 35, 24, 74, 87, 35, 88, 98, 66, 32, 14, 05} // must be 16 bytes
default encryption
var KeyHmac = []byte{36, 45, 53, 21, 87, 35, 24, 74, 87, 35, 88, 98, 66, 32, 14, 05} // must be 16 bytes
var Light = 1
var LightButton = color.RGBA{129, 137, 252, 250}
var LightDisabled = color.RGBA{129, 137, 252, 64}
var LightFocus = color.RGBA{129, 137, 252, 64}
var LightHover = color.RGBA{129, 137, 252, 1}
var LightHyperlink = color.RGBA{129, 137, 252, 1}
var LightInputBackground = color.RGBA{129, 137, 252, 32}
var LightInputBorder = color.RGBA{129, 137, 252, 250}
var LightPlaceholder = color.RGBA{129, 137, 252, 220}
var LightPressed = color.RGBA{129, 137, 252, 220}
var LightPrimary = color.RGBA{129, 137, 252, 255}
var LightScrollBar = color.RGBA{129, 137, 252, 250}
var LightScrollBarBackground = color.RGBA{129, 137, 252, 1}
var LightSelection = color.RGBA{129, 137, 252, 200}
var LightSeparator = color.Black
var LightShadow = color.RGBA{129, 137, 252, 64}
var LoggedOn bool
var MessageToSend string
var fyneFilterFound = false
var MyLangs = map[string]string{}/* 492 elements not displayed */
eng esp cmn
var NATS = &Natsjs{}
var NATSREPORT = &NatsjsREPORT{}
var NATSSTREAM = "NATS"
var NatsAdmin = "natsadmin"
defaults
var NatsAlias string
var NatsBucketType string
var NatsCaroot = "" /* 1448-byte string literal not displayed */
var NatsClientcert = "" /* 1538-byte string literal not displayed */
var NatsClientkey = "" /* 1706-byte string literal not displayed */
var NatsMessages = make(map[int]MessageStore)
var NatsMessagesIndex = make(map[string]bool)
var NatsMessagesIndexDevice = make(map[string]bool)
var NatsMessagesDevice = make(map[int]MessageStore)
var NatsMsgMaxAge string
var NatsNodeUUID string
var NatsQueueDurable = "snatsdurable"
var NatsQueuePassword = "987654321098765432109876"
var NatsServer = "nats://192.168.88.232:4222"
var NatsUser = "natsoperator"
var NatsUserAuthorizations = "natsauthorizations"
var NatsUserAuthorizationsPassword = "PASSWORD"
var NatsUserCommands = "natscommands"
var NatsUserCommandsPassword = "PASSWORD"
var NatsUserDevices = "natsdevices"
var NatsUserDevicesPassword = "PASSWORD"
var NatsUserEvents = "natsevents"
var NatsUserEventsPassword = "PASSWORD"
var NatsUserPassword = "hjscr44iod"
var NewNatsDone = false
var NewPGSlDone = false
var OAJSON = OA{}
var PasswordHash string
var PreferedLanguage string
var PreferencesLocation = "/home/oem/.config/fyne/org.nh3000.nh3000/preferences.json"
var Retro = 2
var RetroButton = color.RGBA{116, 207, 103, 250}
var RetroDisabled = color.RGBA{116, 207, 103, 64}
var RetroFocus = color.RGBA{116, 207, 103, 64}
var RetroHover = color.RGBA{116, 207, 103, 1}
var RetroHyperlink = color.RGBA{116, 207, 103, 1}
var RetroInputBackground = color.RGBA{116, 207, 103, 32}
var RetroInputBorder = color.RGBA{116, 207, 103, 250}
var RetroPlaceholder = color.RGBA{116, 207, 103, 255}
var RetroPressed = color.RGBA{116, 207, 103, 220}
var RetroPrimary = color.RGBA{116, 207, 103, 255}
var RetroScrollBar = color.RGBA{116, 207, 103, 250}
var RetroScrollBarBackground = color.RGBA{116, 207, 103, 1}
var RetroSelection = color.RGBA{116, 207, 103, 200}
var RetroSeparator = color.Black
var RetroShadow = color.RGBA{116, 207, 103, 64}
var SQL = &SQLconn{}
* The following fields need to be modified for your production * Environment to provide maximum security * * These fields are meant to be distributed at compile time and * editable in the gui. *
var ScheduleCategory int
var SchedulePlan = make(map[int]ScheduleStruct)
var ScheduleStore = make(map[int]ScheduleStruct)
var Selected = 0
var SelectedCategory int
var SelectedDay int
var SelectedHour int
var SelectedInventory int
var SelectedUser int
var TimeZoneOffset = ""
var TrafficAlbum = ""
var TrafficEnd = "YYYY-MM-DD 23:59:59"
var TrafficStart = "YYYY-MM-DD 00:00:00"
var UserStore = make(map[int]UserStruct)
var WebAddress = "https://192.168.88.233:9000" // default web address
Functions ¶
func AlbumToArray ¶
func AlbumToArray() []string
func CategoriesAdd ¶
func CategoriesDelete ¶
func CategoriesDelete(row int)
func CategoriesGet ¶
func CategoriesGet()
func CategoriesToArray ¶
func CategoriesToArray() []string
func CategoriesUpdate ¶
func CategoriesWhereUsed ¶
func CategoriesWriteStub ¶
func CheckBucket ¶
func ComparePasswords ¶
validate password
func DaysDelete ¶
func DaysDelete(row int)
func DecryptFile ¶
func DeleteBucket ¶
func DeleteNatsMessage ¶
func DeleteNatsMessage(seq uint64)
func EncryptFile ¶
func EraseMessages ¶
func EraseMessages(queue string)
func GetBucketSize ¶
func GetDateTime ¶
func HoursDelete ¶
func HoursDelete(row int)
func HoursUpdate ¶
func InventoryAdd ¶
func InventoryAdd(category string, artist string, song string, album string, songlength int, rndorder string, startson string, expireson string, adstimeslots []string, adsdayslots []string, adsmaxspins int, adsmaxspinsperhour int, lastplayed string, dateadded string, spinstoday int, spinsweek int, spinstotal int, sourcelink string) int
func InventoryDelete ¶
func InventoryDelete(row int)
func InventoryGet ¶
func InventoryGet()
func InventoryGetCount ¶
func InventoryGetCurrent ¶
func InventoryGetCurrent()
func InventoryGetRoots ¶
func InventoryGetRoots()
func InventoryGetRow ¶
func InventoryGetRowByRow ¶
func InventoryGetRowRecovery ¶
func InventorySel ¶
func InventorySel(cat, art string)
func InventoryUpdate ¶
func InventoryUpdate(row int, category string, artist string, song string, album string, songlength int, rndorder string, startson string, expireson string, adstimeslots []string, adsdayslots []string, adsmaxspins int, adsmaxspinsperhour int, lastplayed string, dateadded string, spinstoday int, spinsweek int, spinstotal int, sourcelink string)
func InventoryUpdateRNDORDER ¶
func InventoryUpdateRNDORDER()
func InventoryUpdateRecovery ¶
func LoadHashWithDefault ¶
create and load hash
func PDFCategory ¶
func PDFCategory(rn, stationid string)
func PDFCategoryByID ¶
func PDFDaysByDay ¶
func PDFHoursByHour ¶
func PDFInventory ¶
func PDFInventory(rn, cat, stationid string)
func PDFInventoryByCategory ¶
func PDFSchedule ¶
func PDFSchedule(rn, stationid string)
func PDFScheduleByDay ¶
func PDFTraffic ¶
func PDFTraffic(rn, stationid string)
func PDFTrafficByAlbum ¶
func PDFTrafficPageHeader ¶
func ReceiveMESSAGE ¶
func ReceiveMESSAGE()
func ReceiveONAIRMP3 ¶
func ReceiveONAIRMP3()
func ReceiveONAIRMP4 ¶
func ReceiveONAIRMP4()
func ReceiveONAIRWAV ¶
func ReceiveONAIRWAV()
func ScheduleAdd ¶
func ScheduleCopy ¶
func ScheduleCopy(dayfrom, dayto, hourfrom, hourto string)
func ScheduleDelete ¶
func ScheduleDelete(row int)
func ScheduleGet ¶
func ScheduleGet()
func ScheduleGetCount ¶
func ScheduleGetPlan ¶
func ScheduleGetPlan(day, hour, pos string)
func ScheduleSel ¶
func ScheduleSel(day, hour string)
func ScheduleUpdate ¶
func SendONAIRmp3 ¶
func SendONAIRmp3(m string)
func SendONAIRmp4 ¶
func SendONAIRmp4(m string)
func SendONAIRwav ¶
func SendONAIRwav(m string)
func SetupDetails ¶
func TestBucket ¶
func TrafficAdd ¶
func TrafficAdd(category, artist, song, album, playedon string)
func TrafficCheckDuplicate ¶
func TrafficClear ¶
func TrafficClear() string
func TrafficGetAlbum ¶
func TrafficGetCountByAlbum ¶
func TrafficGetCountByDate ¶
func UserDelete ¶
func UserDelete(row int)
func UserUpdate ¶
Types ¶
type CategoriesStruct ¶
type DaysStruct ¶
type HoursStruct ¶
type InventoryStruct ¶
type InventoryStruct struct {
Row int // rowid
Category string // category
Artist string // artist
Song string // song
Album string // Album
Songlength int // song length
Rndorder string // assigned weekly
Startson string //
AdsTimeSlots []string
AdsDaySlots []string
AdsMaxSpins int
AdsMaxSpinsPerHour int
Expireson string
Lastplayed string
Dateadded string
Spinstoday int // cleared daily at day reset
Spinsweek int // spins weekly at week reset
Spinstotal int // total spins
Sourcelink string // link to relevant source
}
type ATS struct {
Slot string // ads time slots 00-23
}
type MessageStore ¶
type MessageStore struct {
MSiduuid string // message id
MSalias string // alias
MShostname string // hostname
MSipadrs string // ip address
MSmacid string // macids
MSmessage string // message payload
MSnodeuuid string // unique id
MSdate string // message date
MSsubject string // message subject
MSos string // device os
MSsequence uint64 // consumer sequence for secure delete
MSelementid int // order in array
}
type MyTheme ¶
type MyTheme struct{}
func (MyTheme) Color ¶
func (m MyTheme) Color(name fyne.ThemeColorName, variant fyne.ThemeVariant) color.Color
func (MyTheme) SetIcon ¶
func (m MyTheme) SetIcon(name fyne.ThemeIconName, variant fyne.ThemeVariant)
type NatsjsREPORT ¶
type ScheduleStruct ¶
type UserStruct ¶
type UserStruct struct {
Row int // rowid
Userrole string // role of user
Userpassword string // Entered password
Userpasswordhash string // Entered password
Userauthcategories []string // authorized categories
Userauthaction []string // actions allowed
}
rowid serial primary key, userrole varchar(32), userpassword text not null, userpasswordhash varchar(128) not null, userauthcategories text array[128] not null, userauthactions text array[128] not null
func UserGetbyID ¶
func UserGetbyID(id string) UserStruct