Documentation ¶
Overview ¶
Package config handles configuration management for the application.
Index ¶
- Constants
- Variables
- func SlotExtra(s string) string
- func SlotName(s string) string
- type Options
- func (o *Options) BoltPathname() string
- func (o *Options) ChromeRemoteAddr() string
- func (o *Options) DiscordBotToken() string
- func (o *Options) DiscordChannel() string
- func (o *Options) DiscordHelptext() string
- func (o *Options) EnabledChromeRemote() bool
- func (o *Options) EnabledMeilisearch() bool
- func (o *Options) EnabledMetrics() bool
- func (o *Options) EnabledReduxer() bool
- func (o *Options) GitHubOwner() string
- func (o *Options) GitHubRepo() string
- func (o *Options) GitHubToken() string
- func (o *Options) HasDebugMode() bool
- func (o *Options) IPFSApikey() string
- func (o *Options) IPFSHost() string
- func (o *Options) IPFSMode() string
- func (o *Options) IPFSPort() int
- func (o *Options) IPFSSecret() string
- func (o *Options) IPFSTarget() string
- func (o *Options) IRCChannel() string
- func (o *Options) IRCNick() string
- func (o *Options) IRCPassword() string
- func (o *Options) IRCServer() string
- func (o *Options) ListenAddr() string
- func (o *Options) LogLevel() logger.LogLevel
- func (o *Options) LogTime() bool
- func (o *Options) MastodonAccessToken() string
- func (o *Options) MastodonClientKey() string
- func (o *Options) MastodonClientSecret() string
- func (o *Options) MastodonServer() string
- func (o *Options) MatrixHomeserver() string
- func (o *Options) MatrixPassword() string
- func (o *Options) MatrixRoomID() string
- func (o *Options) MatrixUserID() string
- func (o *Options) MaxAttachSize(scope string) int64
- func (o *Options) MaxMediaSize() uint64
- func (o *Options) NostrPrivateKey() string
- func (o *Options) NostrRelayURL() []string
- func (o *Options) NotionDatabaseID() string
- func (o *Options) NotionToken() string
- func (o *Options) PoolingSize() int
- func (o *Options) PublishToChannel() bool
- func (o *Options) PublishToDiscordChannel() bool
- func (o *Options) PublishToIRCChannel() bool
- func (o *Options) PublishToIssues() bool
- func (o *Options) PublishToMastodon() bool
- func (o *Options) PublishToMatrixRoom() bool
- func (o *Options) PublishToNostr() bool
- func (o *Options) PublishToNotion() bool
- func (o *Options) PublishToSlackChannel() bool
- func (o *Options) PublishToTwitter() bool
- func (o *Options) SlackAppToken() string
- func (o *Options) SlackBotToken() string
- func (o *Options) SlackChannel() string
- func (o *Options) SlackHelptext() string
- func (o *Options) Slots() map[string]bool
- func (o *Options) StorageDir() string
- func (o *Options) TelegramChannel() string
- func (o *Options) TelegramHelptext() string
- func (o *Options) TelegramToken() string
- func (o *Options) TorLocalPort() int
- func (o *Options) TorPrivKey() string
- func (o *Options) TorRemotePorts() []int
- func (o *Options) TwitterAccessSecret() string
- func (o *Options) TwitterAccessToken() string
- func (o *Options) TwitterConsumerKey() string
- func (o *Options) TwitterConsumerSecret() string
- func (o *Options) UseTor() bool
- func (o *Options) WaybackFallback() bool
- func (o *Options) WaybackMaxRetries() uint64
- func (o *Options) WaybackMeiliApikey() string
- func (o *Options) WaybackMeiliEndpoint() string
- func (o *Options) WaybackMeiliIndexing() string
- func (o *Options) WaybackTimeout() time.Duration
- func (o *Options) WaybackUserAgent() string
- type Parser
Constants ¶
const ( SLOT_IA = "ia" // Internet Archive SLOT_IS = "is" // archive.today SLOT_IP = "ip" // IPFS SLOT_PH = "ph" // Telegraph SLOT_TT = "tt" // Time Travel SLOT_GC = "gc" // Google Cache PB_SLUG = "/playback" // Identity for playback UNKNOWN = "unknown" )
nolint:stylecheck
Variables ¶
var ( IPFSToken = "" IPFSTarget = "web3storage" )
Functions ¶
Types ¶
type Options ¶
type Options struct {
// contains filtered or unexported fields
}
Options represents a configuration options in the application.
func (*Options) BoltPathname ¶ added in v0.12.3
BoltPathname returns filename of bolt database
func (*Options) ChromeRemoteAddr ¶ added in v0.10.2
ChromeRemoteAddr returns the remote debugging address for Chrome/Chromium
func (*Options) DiscordBotToken ¶ added in v0.15.1
DiscordBotToken returns the token of Discord bot
func (*Options) DiscordChannel ¶ added in v0.15.1
DiscordChannel returns the channel on Discord.
func (*Options) DiscordHelptext ¶ added in v0.15.1
DiscordHelptext returns the help text for Discord bot
func (*Options) EnabledChromeRemote ¶ added in v0.10.2
EnabledChromeRemote returns whether enable Chrome/Chromium remote debugging for screenshot
func (*Options) EnabledMeilisearch ¶ added in v0.18.0
EnabledMeilisearch returns whether enable meilisearch server.
func (*Options) EnabledMetrics ¶ added in v0.11.0
EnabledMetrics returns true if metrics collector is enabled.
func (*Options) EnabledReduxer ¶ added in v0.13.0
EnabledReduxer returns whether enable store binary file locally.
func (*Options) GitHubOwner ¶ added in v0.7.0
GitHubOwner returns the user id of GitHub account.
func (*Options) GitHubRepo ¶ added in v0.7.0
GitHubRepo returns the GitHub repository which to publish results.
func (*Options) GitHubToken ¶ added in v0.7.0
GitHubToken returns the personal access token of GitHub account.
func (*Options) HasDebugMode ¶
HasDebugMode returns true if debug mode is enabled.
func (*Options) IPFSApikey ¶ added in v0.17.0
IPFSApiKey returns the apikey of the IPFS pinning service. It returns a managed IPFS credential if env `WAYBACK_IPFS_APIKEY` empty.
func (*Options) IPFSSecret ¶ added in v0.17.0
IPFSSecret returns the secret of the IPFS pinning service.
func (*Options) IPFSTarget ¶ added in v0.17.0
IPFSTarget returns which IPFS pinning service to use.
func (*Options) IRCChannel ¶ added in v0.9.0
IRCChannel returns channel of IRC
func (*Options) IRCPassword ¶ added in v0.9.0
IRCPassword returns password of IRC
func (*Options) ListenAddr ¶ added in v0.16.0
ListenAddr returns the listen address for the HTTP server.
func (*Options) MastodonAccessToken ¶ added in v0.8.0
MastodonAccessToken returns the access token of Mastodon application.
func (*Options) MastodonClientKey ¶ added in v0.8.0
MastodonClientKey returns the client key of Mastodon application.
func (*Options) MastodonClientSecret ¶ added in v0.8.0
MastodonClientSecret returns the cilent secret of Mastodon application.
func (*Options) MastodonServer ¶ added in v0.8.0
MastodonServer returns the domain of Mastodon instance.
func (*Options) MatrixHomeserver ¶ added in v0.9.0
MatrixHomeserver returns the homeserver of Matrix.
func (*Options) MatrixPassword ¶ added in v0.9.0
MatrixPassword returns the password of Matrix account.
func (*Options) MatrixRoomID ¶ added in v0.9.0
MatrixRoomID returns the room ID of Matrix account.
func (*Options) MatrixUserID ¶ added in v0.9.0
MatrixUserID returns the user ID of Matrix account.
func (*Options) MaxAttachSize ¶ added in v0.15.1
MaxAttachSize returns max attach size limits for several services. scope: telegram
func (*Options) MaxMediaSize ¶ added in v0.15.1
MaxMediaSize returns max size to limit download stream media.
func (*Options) NostrPrivateKey ¶ added in v0.19.0
NostrPrivateKey returns the private key of Nostr account.
func (*Options) NostrRelayURL ¶ added in v0.19.0
NostrRelayURL returns the relay url of Nostr server.
func (*Options) NotionDatabaseID ¶ added in v0.18.0
NotionDatabaseID returns the Notion's dabase id.
func (*Options) NotionToken ¶ added in v0.18.0
NotionToken returns the Notion integration token.
func (*Options) PoolingSize ¶ added in v0.12.0
PoolingSize returns the number of worker pool
func (*Options) PublishToChannel ¶ added in v0.7.0
PublishToChannel returns whether to publish results to Telegram Channel.
func (*Options) PublishToDiscordChannel ¶ added in v0.15.1
PublishToDiscordChannel returns whether publish results to Discord channel.
func (*Options) PublishToIRCChannel ¶ added in v0.9.0
PublishToIRCChannel returns whether publish results to IRC channel.
func (*Options) PublishToIssues ¶ added in v0.7.0
PublishToIssues returns whether to publish results to GitHub issues.
func (*Options) PublishToMastodon ¶ added in v0.8.0
PublishToMastodon returns whether to publish result to Mastodon.
func (*Options) PublishToMatrixRoom ¶ added in v0.9.0
PublishToMatrixRoom returns whether publish results to Matrix room.
func (*Options) PublishToNostr ¶ added in v0.19.0
PublishToNostr determines whether the results should be published on Nostr.
func (*Options) PublishToNotion ¶ added in v0.18.0
PublishToNotion determines whether the results should be published on Notion.
func (*Options) PublishToSlackChannel ¶ added in v0.15.1
PublishToSlackChannel returns whether publish results to Slack channel.
func (*Options) PublishToTwitter ¶ added in v0.8.0
PublishToTwitter returns whether to publish result to Twitter.
func (*Options) SlackAppToken ¶ added in v0.15.1
SlackAppToken returns the app-level token of Slack bot.
func (*Options) SlackBotToken ¶ added in v0.15.1
SlackBotToken returns the bot user auth token of Slack bot.
func (*Options) SlackChannel ¶ added in v0.15.1
SlackChannel returns the Slack channel id.
func (*Options) SlackHelptext ¶ added in v0.15.1
SlackHelptext returns the help text for Slack bot.
func (*Options) StorageDir ¶ added in v0.13.0
StorageDir returns the directory to storage binary file, e.g. html file, PDF
func (*Options) TelegramChannel ¶
TelegramChannel returns the Telegram Channel name.
func (*Options) TelegramHelptext ¶ added in v0.10.0
TelegramHelptext returns the help text for Telegram bot.
func (*Options) TelegramToken ¶
TelegramToken returns the token of Telegram Bot.
func (*Options) TorLocalPort ¶
TorLocalPort returns the local port to a TCP listener on. This is ignored if `WAYBACK_LISTEN_ADDR` is set.
func (*Options) TorPrivKey ¶
TorPrivKey returns the private key of Tor service.
func (*Options) TorRemotePorts ¶
TorRemotePorts returns the remote ports to serve the Tor hidden service on.
func (*Options) TwitterAccessSecret ¶ added in v0.8.0
TwitterAccessSecret returns the access secret of Twitter application.
func (*Options) TwitterAccessToken ¶ added in v0.8.0
TwitterAccessToken returns the access token of Twitter application.
func (*Options) TwitterConsumerKey ¶ added in v0.8.0
TwitterConsumerKey returns the consumer key of Twitter application.
func (*Options) TwitterConsumerSecret ¶ added in v0.8.0
TwitterConsumerSecret returns the consumer secret of Twitter application.
func (*Options) WaybackFallback ¶ added in v0.16.2
WaybackFallback returns whether fallback to Google cache is enabled if the original webpage is unavailable.
func (*Options) WaybackMaxRetries ¶ added in v0.18.0
WaybackMaxRetries returns max retries for a wayback request.
func (*Options) WaybackMeiliApikey ¶ added in v0.18.0
WaybackMeiliApikey returns the Meilisearch admin apikey.
func (*Options) WaybackMeiliEndpoint ¶ added in v0.18.0
WaybackMeiliEndpoint returns the Meilisearch API endpoint.
func (*Options) WaybackMeiliIndexing ¶ added in v0.18.0
WaybackMeiliIndexing returns the Meilisearch indexing name.
func (*Options) WaybackTimeout ¶ added in v0.16.0
WaybackTimeout returns timeout for a wayback request.
func (*Options) WaybackUserAgent ¶ added in v0.16.2
WaybackUserAgent returns User-Agent for a wayback request.
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser handles configuration parsing.
func (*Parser) ParseEnvironmentVariables ¶
ParseEnvironmentVariables loads configuration values from environment variables.