config

package
v0.0.0-...-2b7f6e1 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetOauthConfig

func GetOauthConfig() *oauth2.Config

GetOauthConfig returns the Oauth config for Google

func GetWebAPIPath

func GetWebAPIPath() string

GetWebAPIPath is used by telegram templates

func GetWebUI

func GetWebUI() string

GetWebUI is used in templates

func GetWebroot

func GetWebroot() string

GetWebroot is used by telegram templates

func IsFirebaseRunning

func IsFirebaseRunning() bool

IsFirebaseRunning repors the running state of the Firebase integration

func IsRocksRunning

func IsRocksRunning() bool

IsRocksRunning reports the current running state of Rocks integration

func IsTelegramRunning

func IsTelegramRunning() bool

IsTelegramRunning reports if telegram is running; used for templates

func IsVRunning

func IsVRunning() bool

IsVRunning reports the current running state of V integration

func JWParsingKeys

func JWParsingKeys() jwk.Set

JWParsingKeys returns the public keys uses to verify the JWT

func JWSigningKeys

func JWSigningKeys() jwk.Set

JWSigningKeys returns the private keys used to sign the JWT

func NewRouter

func NewRouter() *mux.Router

NewRouter creates the HTTPS router

func SetFirebaseRunning

func SetFirebaseRunning(r bool)

SetFirebaseRunning sets the running state of the Firebase integration

func SetRocksRunning

func SetRocksRunning(r bool)

SetRocksRunning sets the current running state of Rocks integration

func SetVRunning

func SetVRunning(v bool)

SetVRunning sets the current running state of V integration

func Subrouter

func Subrouter(prefix string) *mux.Router

Subrouter creates a Gorilla subroute with a prefix

func TGSetBot

func TGSetBot(name string, id int)

TGSetBot sets the bot name and ID for use in templates currently there are no templates that use these values

func TelegramBotID

func TelegramBotID() int

TelegramBotID returns the ID of the running telegram bot

func TelegramBotName

func TelegramBotName() string

TelegramBotName returns the name of the running telegram bot

Types

type WasabeeConf

type WasabeeConf struct {
	GoogleCreds       string   // path to file.json
	GoogleProject     string   // project name for firebase/profile/risc
	DB                string   // db connect string
	WordListFile      string   // "eff-large-words.txt" filename
	FrontendPath      string   // path to directory continaing templates
	Certs             string   // path to director containing certs
	CertFile          string   // filename (relative to Certs)
	CertKey           string   // filename (relative to Certs)
	FirebaseKey       string   // filename (relative to Certs)
	JWKpriv           string   // filename (relative to Certs)
	JWKpub            string   // filename (relative to Certs)
	JKU               string   // URL to well-known JKU (for 3rd parties to verify our JWT)
	DefaultPictureURL string   // URL to a default image for agents
	WebUIURL          string   // URL of WebUI
	GRPCPort          uint16   // Port on which to send and receive gRPC messages
	Peers             []string // hostname/ip of servers to update
	GRPCDomain        string   // domain for grpc credentials
	StoreRevisions    bool     // keep a copy of each upload
	RevisionsDir      string   // where to keep them

	// configuraiton for various subsystems
	V        wv
	Rocks    wrocks
	Telegram wtg
	HTTP     whttp
	RISC     wrisc
	Apple    apple
	// contains filtered or unexported fields
}

WasabeeConf is the primary config structure

func Get

func Get() *WasabeeConf

Get returns the global configuration XXX it probably should not return a pointer so the callers can't overwrite the config

func LoadFile

func LoadFile(filename string) (*WasabeeConf, error)

LoadFile is the primary method for loading the Wasabee config file, setting the defaults

Jump to

Keyboard shortcuts

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