config

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2021 License: GPL-3.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

View Source
const (
	SLOT_IA = "ia"
	SLOT_IS = "is"
	SLOT_IP = "ip"
	SLOT_PH = "ph"
)

Variables

This section is empty.

Functions

func SlotExtra added in v0.8.0

func SlotExtra(s string) string

SlotExtra returns the extra config of wayback slot.

func SlotName

func SlotName(s string) string

SlotName returns the descriptions of the wayback service.

Types

type Options

type Options struct {
	// contains filtered or unexported fields
}
var Opts *Options

Opts holds parsed configuration options.

func NewOptions

func NewOptions() *Options

NewOptions returns Options with default values.

func (*Options) GitHubOwner added in v0.7.0

func (o *Options) GitHubOwner() string

GitHubOwner returns the user id of GitHub account.

func (*Options) GitHubRepo added in v0.7.0

func (o *Options) GitHubRepo() string

GitHubRepo returns the GitHub repository which to publish results.

func (*Options) GitHubToken added in v0.7.0

func (o *Options) GitHubToken() string

GitHubToken returns the personal access token of GitHub account.

func (*Options) HasDebugMode

func (o *Options) HasDebugMode() bool

HasDebugMode returns true if debug mode is enabled.

func (*Options) IPFSHost

func (o *Options) IPFSHost() string

IPFSHost returns the host of IPFS daemon service.

func (*Options) IPFSMode

func (o *Options) IPFSMode() string

IPFSMode returns the mode to using IPFS.

func (*Options) IPFSPort

func (o *Options) IPFSPort() uint

IPFSPort returns the port of IPFS daemon service.

func (*Options) IRCChannel added in v0.9.0

func (o *Options) IRCChannel() string

IRCChannel returns channel of IRC

func (*Options) IRCNick added in v0.9.0

func (o *Options) IRCNick() string

IRCNick returns nick of IRC

func (*Options) IRCPassword added in v0.9.0

func (o *Options) IRCPassword() string

IRCPassword returns password of IRC

func (*Options) IRCServer added in v0.9.0

func (o *Options) IRCServer() string

IRCServer returns server of IRC

func (*Options) LogTime

func (o *Options) LogTime() bool

LogTime returns if the time should be displayed in log messages.

func (*Options) MastodonAccessToken added in v0.8.0

func (o *Options) MastodonAccessToken() string

MastodonAccessToken returns the access token of Mastodon application.

func (*Options) MastodonClientKey added in v0.8.0

func (o *Options) MastodonClientKey() string

MastodonClientKey returns the client key of Mastodon application.

func (*Options) MastodonClientSecret added in v0.8.0

func (o *Options) MastodonClientSecret() string

MastodonClientSecret returns the cilent secret of Mastodon application.

func (*Options) MastodonServer added in v0.8.0

func (o *Options) MastodonServer() string

MastodonServer returns the domain of Mastodon instance.

func (*Options) MatrixHomeserver added in v0.9.0

func (o *Options) MatrixHomeserver() string

MatrixHomeserver returns the homeserver of Matrix.

func (*Options) MatrixPassword added in v0.9.0

func (o *Options) MatrixPassword() string

MatrixPassword returns the password of Matrix account.

func (*Options) MatrixRoomID added in v0.9.0

func (o *Options) MatrixRoomID() string

MatrixRoomID returns the room ID of Matrix account.

func (*Options) MatrixUserID added in v0.9.0

func (o *Options) MatrixUserID() string

MatrixUserID returns the user ID of Matrix account.

func (*Options) PublishToChannel added in v0.7.0

func (o *Options) PublishToChannel() bool

PublishToChannel returns whether to publish results to Telegram Channel.

func (*Options) PublishToIRCChannel added in v0.9.0

func (o *Options) PublishToIRCChannel() bool

PublishToIRCChannel returns whether publish results to IRC channel.

func (*Options) PublishToIssues added in v0.7.0

func (o *Options) PublishToIssues() bool

PublishToIssues returns whether to publish results to GitHub issues.

func (*Options) PublishToMastodon added in v0.8.0

func (o *Options) PublishToMastodon() bool

PublishToMastodon returns whether to publish result to Mastodon.

func (*Options) PublishToMatrixRoom added in v0.9.0

func (o *Options) PublishToMatrixRoom() bool

PublishToMatrixRoom returns whether publish results to Matrix room.

func (*Options) PublishToTwitter added in v0.8.0

func (o *Options) PublishToTwitter() bool

PublishToTwitter returns whether to publish result to Twitter.

func (*Options) Slots

func (o *Options) Slots() map[string]bool

Slots returns configurations of wayback service, e.g. Internet Archive

func (*Options) TelegramChannel

func (o *Options) TelegramChannel() string

TelegramChannel returns the Telegram Channel name.

func (*Options) TelegramToken

func (o *Options) TelegramToken() string

TelegramToken returns the token of Telegram Bot.

func (*Options) TorLocalPort

func (o *Options) TorLocalPort() int

TorLocalPort returns the local port to a TCP listener on.

func (*Options) TorPrivKey

func (o *Options) TorPrivKey() string

TorPrivKey returns the private key of Tor service.

func (*Options) TorRemotePorts

func (o *Options) TorRemotePorts() []int

TorRemotePorts returns the remote ports to serve the Tor hidden service on.

func (*Options) TorrcFile added in v0.6.0

func (o *Options) TorrcFile() string

TorrcFile returns path of the torrc file to set on start Tor Hidden Service.

func (*Options) TwitterAccessSecret added in v0.8.0

func (o *Options) TwitterAccessSecret() string

TwitterAccessSecret returns the access secret of Twitter application.

func (*Options) TwitterAccessToken added in v0.8.0

func (o *Options) TwitterAccessToken() string

TwitterAccessToken returns the access token of Twitter application.

func (*Options) TwitterConsumerKey added in v0.8.0

func (o *Options) TwitterConsumerKey() string

TwitterConsumerKey returns the consumer key of Twitter application.

func (*Options) TwitterConsumerSecret added in v0.8.0

func (o *Options) TwitterConsumerSecret() string

TwitterConsumerSecret returns the consumer secret of Twitter application.

func (*Options) UseTor

func (o *Options) UseTor() bool

UseTor returns whether to use the Tor proxy when snapshot webpage.

type Parser

type Parser struct {
	// contains filtered or unexported fields
}

Parser handles configuration parsing.

func NewParser

func NewParser() *Parser

NewParser returns a new Parser.

func (*Parser) ParseEnvironmentVariables

func (p *Parser) ParseEnvironmentVariables() (*Options, error)

ParseEnvironmentVariables loads configuration values from environment variables.

Jump to

Keyboard shortcuts

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