settings

package
v0.0.0-...-b0fc717 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const MAINTENANCE_SYNC_DEFAULT = 60
View Source
const MAX_ARTISTS = 10
View Source
const MAX_CHARS = 10
View Source
const MAX_RESULTS_PER_PAGE = 50
View Source
const MAX_SOURCES = 10

Variables

This section is empty.

Functions

This section is empty.

Types

type Settings

type Settings struct {
	gogram.InitSettings

	Logfile string `json:"logfile"`
	Pidfile string `json:"pidfile"`

	ApiKey              string `json:"apikey"`
	DbUrl               string `json:"dburl"`
	ApiName             string `json:"api_name"`
	ApiEndpoint         string `json:"api_endpoint"`
	ApiFilteredEndpoint string `json:"api_filtered_endpoint"`
	ApiStaticPrefix     string `json:"api_static_prefix"`

	Owner data.UserID `json:"owner"`
	Home  data.ChatID `json:"home"`

	ResultsPerPage int `json:"results_per_page"`

	SearchUser   string `json:"search_user"`
	SearchAPIKey string `json:"search_apikey"`

	NoResultsPhotoID   data.FileID `json:"no_results_photo_id"`
	BlacklistedPhotoID data.FileID `json:"blacklisted_photo_id"`
	ErrorPhotoID       data.FileID `json:"error_photo_id"`

	MediaConvertDirectory   string      `json:"media_convert_directory"`
	Webm2Mp4ConvertScript   string      `json:"webm2mp4_convert_script"`
	MediaStoreChannel       data.ChatID `json:"media_store_channel"`
	MaintenanceSyncInterval int         `json:"maintenance_sync_interval"`
	DebugMediaReceived      bool        `json:"debug_media_received"`

	SourceMap json.RawMessage `json:"source_map"`

	types.CaptionSettings
}

func (*Settings) DefaultSearchCredentials

func (this *Settings) DefaultSearchCredentials() storage.UserCreds

func (Settings) GetApiEndpoint

func (s Settings) GetApiEndpoint() string

func (Settings) GetApiFilteredEndpoint

func (s Settings) GetApiFilteredEndpoint() string

func (Settings) GetApiName

func (s Settings) GetApiName() string

func (Settings) GetApiStaticPrefix

func (s Settings) GetApiStaticPrefix() string

func (Settings) GetMediaConvertDirectory

func (s Settings) GetMediaConvertDirectory() string

func (Settings) GetMediaStoreChannel

func (s Settings) GetMediaStoreChannel() data.ChatID

func (Settings) GetSourceMap

func (s Settings) GetSourceMap() json.RawMessage

func (Settings) GetWebm2Mp4ConvertScript

func (s Settings) GetWebm2Mp4ConvertScript() string

func (*Settings) InitializeAll

func (this *Settings) InitializeAll(bot *gogram.TelegramBot) error

func (*Settings) RedirectLogs

func (this *Settings) RedirectLogs(bot *gogram.TelegramBot) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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