config

package
v0.0.0-...-3200f4c Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BigCentralBaseURL

func BigCentralBaseURL() string

func FileServerBaseURL

func FileServerBaseURL() string

func FileServerHTTPS

func FileServerHTTPS() bool

func OpenDefaultConfigFile

func OpenDefaultConfigFile() (*os.File, error)

opens or creates a config file at the default xdg path

func WriteConfigToFile

func WriteConfigToFile(configFile *os.File, config *Config) error

Types

type Config

type Config struct {
	Token         string `json:"token"`
	EncryptionKey string `json:"encryption_key"`
}

func ReadConfig

func ReadConfig(configFile *os.File) (*Config, error)

func (*Config) EncryptionKeyBytes

func (c *Config) EncryptionKeyBytes() ([]byte, error)

func (*Config) SetEncryptionKey

func (c *Config) SetEncryptionKey(key []byte)

Jump to

Keyboard shortcuts

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