config

package
v0.0.0-...-d5ce8da Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StremioAddonSidekick string = "sidekick"
	StremioAddonStore    string = "store"
	StremioAddonWrap     string = "wrap"
)

Variables

View Source
var (
	Port               = config.Port
	ProxyAuthPassword  = config.ProxyAuthPassword
	ProxyStreamEnabled = config.ProxyStreamEnabled
	StoreAuthToken     = config.StoreAuthToken
	BuddyURL           = config.BuddyURL
	HasBuddy           = config.HasBuddy
	PeerURL            = config.PeerURL
	PeerAuthToken      = config.PeerAuthToken
	HasPeer            = config.HasPeer
	RedisURI           = config.RedisURI
	DatabaseURI        = config.DatabaseURI
	StremioAddon       = config.StremioAddon
	Version            = config.Version
	LandingPage        = config.LandingPage
	ServerStartTime    = config.ServerStartTime
	StoreTunnel        = config.StoreTunnel
)

Functions

func PrintConfig

func PrintConfig()

Types

type Config

type Config struct {
	Port               string
	StoreAuthToken     StoreAuthTokenMap
	ProxyAuthPassword  ProxyAuthPasswordMap
	ProxyStreamEnabled bool
	BuddyURL           string
	HasBuddy           bool
	PeerURL            string
	PeerAuthToken      string
	HasPeer            bool
	RedisURI           string
	DatabaseURI        string
	StremioAddon       StremioAddonConfig
	Version            string
	LandingPage        string
	ServerStartTime    time.Time
	StoreTunnel        StoreTunnelConfigMap
}

type ProxyAuthPasswordMap

type ProxyAuthPasswordMap map[string]string

func (ProxyAuthPasswordMap) GetPassword

func (m ProxyAuthPasswordMap) GetPassword(userName string) string

type StoreAuthTokenMap

type StoreAuthTokenMap map[string]map[string]string

func (StoreAuthTokenMap) GetPreferredStore

func (m StoreAuthTokenMap) GetPreferredStore(user string) string

func (StoreAuthTokenMap) GetToken

func (m StoreAuthTokenMap) GetToken(user, store string) string

func (StoreAuthTokenMap) ListStores

func (m StoreAuthTokenMap) ListStores(user string) []string

type StoreTunnelConfig

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

type StoreTunnelConfigMap

type StoreTunnelConfigMap map[string]StoreTunnelConfig

func (StoreTunnelConfigMap) IsEnabledForAPI

func (stc StoreTunnelConfigMap) IsEnabledForAPI(name string) bool

func (StoreTunnelConfigMap) IsEnabledForStream

func (stc StoreTunnelConfigMap) IsEnabledForStream(name string) bool

type StremioAddonConfig

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

func (StremioAddonConfig) IsEnabled

func (sa StremioAddonConfig) IsEnabled(name string) bool

Jump to

Keyboard shortcuts

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