Documentation ¶
Index ¶
- func BanIPAddress(address, note string) error
- func CreateBanIPTable(db *sql.DB)
- func CreateMessagesTable(db *sql.DB)
- func DeleteWebhook(id int) error
- func FindHighestVideoQualityIndex(qualities []models.StreamOutputVariant) (int, bool)
- func GetAdminPassword() string
- func GetBlockedFederatedDomains() []string
- func GetBrowserPushConfig() models.BrowserNotificationConfiguration
- func GetBrowserPushPrivateKey() (string, error)
- func GetBrowserPushPublicKey() (string, error)
- func GetChatDisabled() bool
- func GetChatEstbalishedUsersOnlyMode() bool
- func GetChatJoinPartMessagesEnabled() bool
- func GetCustomColorVariableValues() map[string]string
- func GetCustomJavascript() string
- func GetCustomOfflineMessage() string
- func GetCustomStyles() string
- func GetDatabase() *sql.DB
- func GetDefaultFederationUsername() string
- func GetDirectoryEnabled() bool
- func GetDirectoryRegistrationKey() string
- func GetDisableSearchIndexing() bool
- func GetDiscordConfig() models.DiscordConfiguration
- func GetEmojiList() []models.CustomEmoji
- func GetExternalActions() []models.ExternalAction
- func GetExtraPageBodyContent() string
- func GetFederatedInboxMap() map[string]string
- func GetFederationEnabled() bool
- func GetFederationGoLiveMessage() string
- func GetFederationIsPrivate() bool
- func GetFederationShowEngagement() bool
- func GetFederationUsername() string
- func GetFfMpegPath() string
- func GetForbiddenUsernameList() []string
- func GetHTTPListenAddress() string
- func GetHTTPPortNumber() int
- func GetHasPerformedInitialNotificationsConfig() bool
- func GetHideViewerCount() bool
- func GetIPAddressBans() ([]models.IPAddress, error)
- func GetLastDisconnectTime() (*utils.NullTime, error)
- func GetLogoPath() string
- func GetLogoUniquenessString() string
- func GetMessagesCount() int64
- func GetNSFW() bool
- func GetNotificationsEnabled() bool
- func GetPeakOverallViewerCount() int
- func GetPeakSessionViewerCount() int
- func GetPrivateKey() string
- func GetPublicKey() string
- func GetRTMPPortNumber() int
- func GetS3Config() models.S3
- func GetServerInitTime() (*utils.NullTime, error)
- func GetServerMetadataTags() []string
- func GetServerName() string
- func GetServerSummary() string
- func GetServerURL() string
- func GetServerWelcomeMessage() string
- func GetSocialHandles() []models.SocialHandle
- func GetStreamKeys() []models.StreamKey
- func GetStreamLatencyLevel() models.LatencyLevel
- func GetStreamOutputVariants() []models.StreamOutputVariant
- func GetStreamTitle() string
- func GetSuggestedUsernamesList() []string
- func GetUsersCount() int64
- func GetVideoCodec() string
- func GetVideoServingEndpoint() string
- func GetWebhooks() ([]models.Webhook, error)
- func GetWebhooksForEvent(event models.EventType) []models.Webhook
- func GetWebsocketOverrideHost() string
- func HasPopulatedDefaults() bool
- func InsertWebhook(url string, events []models.EventType) (int, error)
- func IsIPAddressBanned(address string) (bool, error)
- func MustExec(s string, db *sql.DB)
- func PopulateDefaults()
- func RemoveIPAddressBan(address string) error
- func SetAdminPassword(key string) error
- func SetBlockedFederatedDomains(domains []string) error
- func SetBrowserPushConfig(config models.BrowserNotificationConfiguration) error
- func SetBrowserPushPrivateKey(key string) error
- func SetBrowserPushPublicKey(key string) error
- func SetChatDisabled(disabled bool) error
- func SetChatEstablishedUsersOnlyMode(enabled bool) error
- func SetChatJoinMessagesEnabled(enabled bool) error
- func SetCustomColorVariableValues(variables map[string]string) error
- func SetCustomJavascript(styles string) error
- func SetCustomOfflineMessage(message string) error
- func SetCustomStyles(styles string) error
- func SetDirectoryEnabled(enabled bool) error
- func SetDirectoryRegistrationKey(key string) error
- func SetDisableSearchIndexing(disableSearchIndexing bool) error
- func SetDiscordConfig(config models.DiscordConfiguration) error
- func SetExternalActions(actions []models.ExternalAction) error
- func SetExtraPageBodyContent(content string) error
- func SetFederationEnabled(enabled bool) error
- func SetFederationGoLiveMessage(message string) error
- func SetFederationIsPrivate(isPrivate bool) error
- func SetFederationShowEngagement(showEngagement bool) error
- func SetFederationUsername(username string) error
- func SetFfmpegPath(path string) error
- func SetForbiddenUsernameList(usernames []string) error
- func SetHTTPListenAddress(address string) error
- func SetHTTPPortNumber(port float64) error
- func SetHasPerformedInitialNotificationsConfig(hasConfigured bool) error
- func SetHideViewerCount(hide bool) error
- func SetLastDisconnectTime(disconnectTime time.Time) error
- func SetLogoPath(logo string) error
- func SetLogoUniquenessString(uniqueness string) error
- func SetNSFW(isNSFW bool) error
- func SetNotificationsEnabled(enabled bool) error
- func SetPeakOverallViewerCount(count int) error
- func SetPeakSessionViewerCount(count int) error
- func SetPrivateKey(key string) error
- func SetPublicKey(key string) error
- func SetRTMPPortNumber(port float64) error
- func SetS3Config(config models.S3) error
- func SetServerInitTime(t time.Time) error
- func SetServerMetadataTags(tags []string) error
- func SetServerName(name string) error
- func SetServerSummary(summary string) error
- func SetServerURL(url string) error
- func SetServerWelcomeMessage(welcomeMessage string) error
- func SetSocialHandles(socialHandles []models.SocialHandle) error
- func SetStreamKeys(actions []models.StreamKey) error
- func SetStreamLatencyLevel(level float64) error
- func SetStreamOutputVariants(variants []models.StreamOutputVariant) error
- func SetStreamTitle(title string) error
- func SetSuggestedUsernamesList(usernames []string) error
- func SetVideoCodec(codec string) error
- func SetVideoServingEndpoint(message string) error
- func SetWebhookAsUsed(webhook models.Webhook) error
- func SetWebsocketOverrideHost(host string) error
- func SetupEmojiDirectory() (err error)
- func SetupPersistence(file string) error
- func UpdateEmojiList(force bool) (time.Time, error)
- func VerifySettings() error
- type ConfigEntry
- type Datastore
- func (ds *Datastore) Get(key string) (ConfigEntry, error)
- func (ds *Datastore) GetBool(key string) (bool, error)
- func (ds *Datastore) GetCachedValue(key string) ([]byte, error)
- func (ds *Datastore) GetNumber(key string) (float64, error)
- func (ds *Datastore) GetQueries() *db.Queries
- func (ds *Datastore) GetString(key string) (string, error)
- func (ds *Datastore) GetStringMap(key string) (map[string]string, error)
- func (ds *Datastore) GetStringSlice(key string) ([]string, error)
- func (ds *Datastore) MustExec(s string)
- func (ds *Datastore) Reset()
- func (ds *Datastore) Save(e ConfigEntry) error
- func (ds *Datastore) SetBool(key string, value bool) error
- func (ds *Datastore) SetCachedValue(key string, b []byte)
- func (ds *Datastore) SetNumber(key string, value float64) error
- func (ds *Datastore) SetString(key string, value string) error
- func (ds *Datastore) SetStringMap(key string, value map[string]string) error
- func (ds *Datastore) SetStringSlice(key string, value []string) error
- func (ds *Datastore) Setup()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BanIPAddress ¶ added in v0.0.12
BanIPAddress will persist a new IP address ban to the datastore.
func CreateBanIPTable ¶ added in v0.0.12
CreateBanIPTable will create the IP ban table if needed.
func CreateMessagesTable ¶ added in v0.0.8
CreateMessagesTable will create the chat messages table if needed.
func DeleteWebhook ¶ added in v0.0.6
DeleteWebhook will delete a webhook from the database.
func FindHighestVideoQualityIndex ¶ added in v0.0.6
func FindHighestVideoQualityIndex(qualities []models.StreamOutputVariant) (int, bool)
FindHighestVideoQualityIndex will return the highest quality from a slice of variants.
func GetAdminPassword ¶ added in v0.1.0
func GetAdminPassword() string
GetAdminPassword will return the admin password.
func GetBlockedFederatedDomains ¶ added in v0.0.11
func GetBlockedFederatedDomains() []string
GetBlockedFederatedDomains will return a list of blocked federated domains.
func GetBrowserPushConfig ¶ added in v0.0.12
func GetBrowserPushConfig() models.BrowserNotificationConfiguration
GetBrowserPushConfig will return the browser push configuration.
func GetBrowserPushPrivateKey ¶ added in v0.0.12
GetBrowserPushPrivateKey will return the private key for browser pushes.
func GetBrowserPushPublicKey ¶ added in v0.0.12
GetBrowserPushPublicKey will return the public key for browser pushes.
func GetChatDisabled ¶ added in v0.0.7
func GetChatDisabled() bool
GetChatDisabled will return if chat is disabled.
func GetChatEstbalishedUsersOnlyMode ¶ added in v0.0.12
func GetChatEstbalishedUsersOnlyMode() bool
GetChatEstbalishedUsersOnlyMode returns the state of established user only mode.
func GetChatJoinPartMessagesEnabled ¶ added in v0.1.2
func GetChatJoinPartMessagesEnabled() bool
GetChatJoinPartMessagesEnabled will return if chat join messages are enabled.
func GetCustomColorVariableValues ¶ added in v0.1.0
GetCustomColorVariableValues gets CSS variable names and values.
func GetCustomJavascript ¶ added in v0.1.0
func GetCustomJavascript() string
GetCustomJavascript will return a string with Javascript to insert into the page.
func GetCustomOfflineMessage ¶ added in v0.1.0
func GetCustomOfflineMessage() string
GetCustomOfflineMessage will return the custom offline message.
func GetCustomStyles ¶ added in v0.0.7
func GetCustomStyles() string
GetCustomStyles will return a string with CSS to insert into the page.
func GetDatabase ¶
GetDatabase will return the shared instance of the actual database.
func GetDefaultFederationUsername ¶ added in v0.0.11
func GetDefaultFederationUsername() string
GetDefaultFederationUsername will return the username used for sending federation activities.
func GetDirectoryEnabled ¶ added in v0.0.6
func GetDirectoryEnabled() bool
GetDirectoryEnabled will return if this server should register to YP.
func GetDirectoryRegistrationKey ¶ added in v0.0.6
func GetDirectoryRegistrationKey() string
GetDirectoryRegistrationKey will return the YP protocol registration key.
func GetDisableSearchIndexing ¶ added in v0.1.1
func GetDisableSearchIndexing() bool
GetDisableSearchIndexing will return if the web server should be indexable.
func GetDiscordConfig ¶ added in v0.0.12
func GetDiscordConfig() models.DiscordConfiguration
GetDiscordConfig will return the Discord configuration.
func GetEmojiList ¶ added in v0.1.0
func GetEmojiList() []models.CustomEmoji
GetEmojiList returns a list of custom emoji from the emoji directory.
func GetExternalActions ¶ added in v0.0.7
func GetExternalActions() []models.ExternalAction
GetExternalActions will return the registered external actions.
func GetExtraPageBodyContent ¶ added in v0.0.6
func GetExtraPageBodyContent() string
GetExtraPageBodyContent will return the user-supplied body content.
func GetFederatedInboxMap ¶ added in v0.0.11
GetFederatedInboxMap is a mapping between account names and their outbox.
func GetFederationEnabled ¶ added in v0.0.11
func GetFederationEnabled() bool
GetFederationEnabled will return if federation is enabled.
func GetFederationGoLiveMessage ¶ added in v0.0.11
func GetFederationGoLiveMessage() string
GetFederationGoLiveMessage will return the message sent when going live.
func GetFederationIsPrivate ¶ added in v0.0.11
func GetFederationIsPrivate() bool
GetFederationIsPrivate will return if federation is private.
func GetFederationShowEngagement ¶ added in v0.0.11
func GetFederationShowEngagement() bool
GetFederationShowEngagement will return if fediverse engagement shows in chat.
func GetFederationUsername ¶ added in v0.0.11
func GetFederationUsername() string
GetFederationUsername will return the username used in federated activities.
func GetFfMpegPath ¶ added in v0.0.6
func GetFfMpegPath() string
GetFfMpegPath will return the ffmpeg path.
func GetForbiddenUsernameList ¶ added in v0.0.8
func GetForbiddenUsernameList() []string
GetForbiddenUsernameList will return the blocked usernames as a comma separated string.
func GetHTTPListenAddress ¶ added in v0.0.8
func GetHTTPListenAddress() string
GetHTTPListenAddress will return the HTTP listen address.
func GetHTTPPortNumber ¶ added in v0.0.6
func GetHTTPPortNumber() int
GetHTTPPortNumber will return the server HTTP port.
func GetHasPerformedInitialNotificationsConfig ¶ added in v0.0.12
func GetHasPerformedInitialNotificationsConfig() bool
GetHasPerformedInitialNotificationsConfig gets when performed initial setup.
func GetHideViewerCount ¶ added in v0.1.0
func GetHideViewerCount() bool
GetHideViewerCount will return if the viewer count shold be hidden.
func GetIPAddressBans ¶ added in v0.0.12
GetIPAddressBans will return all the banned IP addresses.
func GetLastDisconnectTime ¶ added in v0.0.6
GetLastDisconnectTime will return the time the last stream ended.
func GetLogoPath ¶ added in v0.0.6
func GetLogoPath() string
GetLogoPath will return the path for the logo, relative to webroot.
func GetLogoUniquenessString ¶ added in v0.0.12
func GetLogoUniquenessString() string
GetLogoUniquenessString will return the logo cache busting string.
func GetMessagesCount ¶ added in v0.0.12
func GetMessagesCount() int64
GetMessagesCount will return the number of messages in the database.
func GetNSFW ¶ added in v0.0.6
func GetNSFW() bool
GetNSFW will return if this stream has NSFW content.
func GetNotificationsEnabled ¶ added in v0.0.12
func GetNotificationsEnabled() bool
GetNotificationsEnabled will return the enabled state of notifications.
func GetPeakOverallViewerCount ¶ added in v0.0.6
func GetPeakOverallViewerCount() int
GetPeakOverallViewerCount will return the overall max number of viewers.
func GetPeakSessionViewerCount ¶ added in v0.0.6
func GetPeakSessionViewerCount() int
GetPeakSessionViewerCount will return the max number of viewers for this stream.
func GetPrivateKey ¶ added in v0.0.11
func GetPrivateKey() string
GetPrivateKey will return the private key.
func GetPublicKey ¶ added in v0.0.11
func GetPublicKey() string
GetPublicKey will return the public key.
func GetRTMPPortNumber ¶ added in v0.0.6
func GetRTMPPortNumber() int
GetRTMPPortNumber will return the server RTMP port.
func GetS3Config ¶ added in v0.0.6
GetS3Config will return the external storage configuration.
func GetServerInitTime ¶ added in v0.0.11
GetServerInitTime will return when the server was first setup.
func GetServerMetadataTags ¶ added in v0.0.6
func GetServerMetadataTags() []string
GetServerMetadataTags will return the metadata tags.
func GetServerName ¶ added in v0.0.6
func GetServerName() string
GetServerName will return the server name text.
func GetServerSummary ¶ added in v0.0.6
func GetServerSummary() string
GetServerSummary will return the server summary text.
func GetServerURL ¶ added in v0.0.6
func GetServerURL() string
GetServerURL will return the server URL.
func GetServerWelcomeMessage ¶ added in v0.0.7
func GetServerWelcomeMessage() string
GetServerWelcomeMessage will return the server welcome message text.
func GetSocialHandles ¶ added in v0.0.6
func GetSocialHandles() []models.SocialHandle
GetSocialHandles will return the external social links.
func GetStreamKeys ¶ added in v0.1.0
GetStreamKeys will return valid stream keys.
func GetStreamLatencyLevel ¶ added in v0.0.6
func GetStreamLatencyLevel() models.LatencyLevel
GetStreamLatencyLevel will return the stream latency level.
func GetStreamOutputVariants ¶ added in v0.0.6
func GetStreamOutputVariants() []models.StreamOutputVariant
GetStreamOutputVariants will return all of the stream output variants.
func GetStreamTitle ¶ added in v0.0.6
func GetStreamTitle() string
GetStreamTitle will return the name of the current stream.
func GetSuggestedUsernamesList ¶ added in v0.0.11
func GetSuggestedUsernamesList() []string
GetSuggestedUsernamesList will return the suggested usernames. If the number of suggested usernames is smaller than 10, the number pool is not used (see code in the CreateAnonymousUser function).
func GetUsersCount ¶ added in v0.0.12
func GetUsersCount() int64
GetUsersCount will return the number of users in the database.
func GetVideoCodec ¶ added in v0.0.7
func GetVideoCodec() string
GetVideoCodec returns the codec to use for transcoding video.
func GetVideoServingEndpoint ¶ added in v0.1.1
func GetVideoServingEndpoint() string
GetVideoServingEndpoint returns the custom video endpont.
func GetWebhooks ¶ added in v0.0.6
GetWebhooks will return all the webhooks.
func GetWebhooksForEvent ¶ added in v0.0.6
GetWebhooksForEvent will return all of the webhooks that want to be notified about an event type.
func GetWebsocketOverrideHost ¶ added in v0.0.12
func GetWebsocketOverrideHost() string
GetWebsocketOverrideHost will return the host override for websockets.
func HasPopulatedDefaults ¶ added in v0.0.6
func HasPopulatedDefaults() bool
HasPopulatedDefaults will determine if the defaults have been inserted into the database.
func InsertWebhook ¶ added in v0.0.6
InsertWebhook will add a new webhook to the database.
func IsIPAddressBanned ¶ added in v0.0.12
IsIPAddressBanned will return if an IP address has been previously blocked.
func MustExec ¶ added in v0.0.13
MustExec will execute a SQL statement on a provided database instance.
func PopulateDefaults ¶ added in v0.0.6
func PopulateDefaults()
PopulateDefaults will set default values in the database.
func RemoveIPAddressBan ¶ added in v0.0.12
RemoveIPAddressBan will remove a previously banned IP address.
func SetAdminPassword ¶ added in v0.1.0
SetAdminPassword will set the admin password.
func SetBlockedFederatedDomains ¶ added in v0.0.11
SetBlockedFederatedDomains will set the blocked federated domains.
func SetBrowserPushConfig ¶ added in v0.0.12
func SetBrowserPushConfig(config models.BrowserNotificationConfiguration) error
SetBrowserPushConfig will set the browser push configuration.
func SetBrowserPushPrivateKey ¶ added in v0.0.12
SetBrowserPushPrivateKey will set the private key for browser pushes.
func SetBrowserPushPublicKey ¶ added in v0.0.12
SetBrowserPushPublicKey will set the public key for browser pushes.
func SetChatDisabled ¶ added in v0.0.7
SetChatDisabled will disable chat if set to true.
func SetChatEstablishedUsersOnlyMode ¶ added in v0.0.12
SetChatEstablishedUsersOnlyMode sets the state of established user only mode.
func SetChatJoinMessagesEnabled ¶ added in v0.0.12
SetChatJoinMessagesEnabled will set if chat join messages are enabled.
func SetCustomColorVariableValues ¶ added in v0.1.0
SetCustomColorVariableValues sets CSS variable names and values.
func SetCustomJavascript ¶ added in v0.1.0
SetCustomJavascript will save a string with Javascript to insert into the page.
func SetCustomOfflineMessage ¶ added in v0.1.0
SetCustomOfflineMessage will set the custom offline message.
func SetCustomStyles ¶ added in v0.0.7
SetCustomStyles will save a string with CSS to insert into the page.
func SetDirectoryEnabled ¶ added in v0.0.6
SetDirectoryEnabled will set if this server should register to YP.
func SetDirectoryRegistrationKey ¶ added in v0.0.6
SetDirectoryRegistrationKey will set the YP protocol registration key.
func SetDisableSearchIndexing ¶ added in v0.1.1
SetDisableSearchIndexing will set if the web server should be indexable.
func SetDiscordConfig ¶ added in v0.0.12
func SetDiscordConfig(config models.DiscordConfiguration) error
SetDiscordConfig will set the Discord configuration.
func SetExternalActions ¶ added in v0.0.7
func SetExternalActions(actions []models.ExternalAction) error
SetExternalActions will save external actions.
func SetExtraPageBodyContent ¶ added in v0.0.6
SetExtraPageBodyContent will set the user-supplied body content.
func SetFederationEnabled ¶ added in v0.0.11
SetFederationEnabled will enable federation if set to true.
func SetFederationGoLiveMessage ¶ added in v0.0.11
SetFederationGoLiveMessage will set the message sent when going live.
func SetFederationIsPrivate ¶ added in v0.0.11
SetFederationIsPrivate will set if federation activity is private.
func SetFederationShowEngagement ¶ added in v0.0.11
SetFederationShowEngagement will set if fediverse engagement shows in chat.
func SetFederationUsername ¶ added in v0.0.11
SetFederationUsername will set the username used in federated activities.
func SetFfmpegPath ¶ added in v0.0.6
SetFfmpegPath will set the custom ffmpeg path.
func SetForbiddenUsernameList ¶ added in v0.0.8
SetForbiddenUsernameList set the username blocklist as a comma separated string.
func SetHTTPListenAddress ¶ added in v0.0.8
SetHTTPListenAddress will set the server HTTP listen address.
func SetHTTPPortNumber ¶ added in v0.0.6
SetHTTPPortNumber will set the server HTTP port.
func SetHasPerformedInitialNotificationsConfig ¶ added in v0.0.12
SetHasPerformedInitialNotificationsConfig sets when performed initial setup.
func SetHideViewerCount ¶ added in v0.1.0
SetHideViewerCount will set if the viewer count should be hidden.
func SetLastDisconnectTime ¶ added in v0.0.6
SetLastDisconnectTime will set the time the last stream ended.
func SetLogoPath ¶ added in v0.0.6
SetLogoPath will set the path for the logo, relative to webroot.
func SetLogoUniquenessString ¶ added in v0.0.12
SetLogoUniquenessString will set the logo cache busting string.
func SetNotificationsEnabled ¶ added in v0.0.12
SetNotificationsEnabled will save the enabled state of notifications.
func SetPeakOverallViewerCount ¶ added in v0.0.6
SetPeakOverallViewerCount will set the overall max number of viewers.
func SetPeakSessionViewerCount ¶ added in v0.0.6
SetPeakSessionViewerCount will set the max number of viewers for this stream.
func SetPrivateKey ¶ added in v0.0.11
SetPrivateKey will save the private key.
func SetPublicKey ¶ added in v0.0.11
SetPublicKey will save the public key.
func SetRTMPPortNumber ¶ added in v0.0.6
SetRTMPPortNumber will set the server RTMP port.
func SetS3Config ¶ added in v0.0.6
SetS3Config will set the external storage configuration.
func SetServerInitTime ¶ added in v0.0.11
SetServerInitTime will set when the server was first created.
func SetServerMetadataTags ¶ added in v0.0.6
SetServerMetadataTags will return the metadata tags.
func SetServerName ¶ added in v0.0.6
SetServerName will set the server name text.
func SetServerSummary ¶ added in v0.0.6
SetServerSummary will set the server summary text.
func SetServerURL ¶ added in v0.0.6
SetServerURL will set the server URL.
func SetServerWelcomeMessage ¶ added in v0.0.7
SetServerWelcomeMessage will set the server welcome message text.
func SetSocialHandles ¶ added in v0.0.6
func SetSocialHandles(socialHandles []models.SocialHandle) error
SetSocialHandles will set the external social links.
func SetStreamKeys ¶ added in v0.1.0
SetStreamKeys will set valid stream keys.
func SetStreamLatencyLevel ¶ added in v0.0.6
SetStreamLatencyLevel will set the stream latency level.
func SetStreamOutputVariants ¶ added in v0.0.6
func SetStreamOutputVariants(variants []models.StreamOutputVariant) error
SetStreamOutputVariants will set the stream output variants.
func SetStreamTitle ¶ added in v0.0.6
SetStreamTitle will set the name of the current stream.
func SetSuggestedUsernamesList ¶ added in v0.0.11
SetSuggestedUsernamesList sets the username suggestion list.
func SetVideoCodec ¶ added in v0.0.7
SetVideoCodec will set the codec used for video encoding.
func SetVideoServingEndpoint ¶ added in v0.1.1
SetVideoServingEndpoint sets the custom video endpoint.
func SetWebhookAsUsed ¶ added in v0.0.6
SetWebhookAsUsed will update the last used time for a webhook.
func SetWebsocketOverrideHost ¶ added in v0.0.12
SetWebsocketOverrideHost will set the host override for websockets.
func SetupEmojiDirectory ¶ added in v0.1.0
func SetupEmojiDirectory() (err error)
SetupEmojiDirectory sets up the custom emoji directory by copying all built-in emojis if the directory does not yet exist.
func SetupPersistence ¶
SetupPersistence will open the datastore and make it available.
func UpdateEmojiList ¶ added in v0.1.1
UpdateEmojiList will update the cache (if required) and return the modifiation time.
func VerifySettings ¶ added in v0.0.6
func VerifySettings() error
VerifySettings will perform a sanity check for specific settings values.
Types ¶
type ConfigEntry ¶ added in v0.0.6
type ConfigEntry struct { Value interface{} Key string }
ConfigEntry is the actual object saved to the database. The Value is encoded using encoding/gob.
type Datastore ¶ added in v0.0.6
Datastore is the global key/value store for configuration values.
func GetDatastore ¶ added in v0.0.8
func GetDatastore() *Datastore
GetDatastore returns the shared instance of the owncast datastore.
func GetStore ¶ added in v0.0.6
func GetStore() *Datastore
GetStore will return the shared instance of the read/write datastore.
func (*Datastore) Get ¶ added in v0.0.6
func (ds *Datastore) Get(key string) (ConfigEntry, error)
Get will query the database for the key and return the entry.
func (*Datastore) GetCachedValue ¶ added in v0.0.6
GetCachedValue will return a value for key from the cache.
func (*Datastore) GetQueries ¶ added in v0.0.11
GetQueries will return the shared instance of the SQL query generator.
func (*Datastore) GetStringMap ¶ added in v0.1.0
GetStringMap will return the string map value for a key.
func (*Datastore) GetStringSlice ¶ added in v0.0.12
GetStringSlice will return the string slice value for a key.
func (*Datastore) MustExec ¶ added in v0.0.13
MustExec will execute a SQL statement on a provided database instance.
func (*Datastore) Reset ¶ added in v0.0.6
func (ds *Datastore) Reset()
Reset will delete all config entries in the datastore and start over.
func (*Datastore) Save ¶ added in v0.0.6
func (ds *Datastore) Save(e ConfigEntry) error
Save will save the ConfigEntry to the database.
func (*Datastore) SetCachedValue ¶ added in v0.0.6
SetCachedValue will set a value for key in the cache.
func (*Datastore) SetStringMap ¶ added in v0.1.0
SetStringMap will set the string map value for a key.
func (*Datastore) SetStringSlice ¶ added in v0.0.12
SetStringSlice will set the string slice value for a key.