configs

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LogFile         = "log.txt"
	ConfigFile      = "config.json"
	CredentialsFile = "credentials.json"
	TokenFile       = "token.json"
)

Variables

This section is empty.

Functions

func InitLogger

func InitLogger(w io.Writer)

InitLogger initializes the default logger with the provided writer.

func OpenConfig

func OpenConfig(flags int) (*os.File, error)

OpenConfig opens the configuration file with the specified flags.

func OpenCredentials

func OpenCredentials(flags int) (*os.File, error)

OpenCredentials opens the credentials file with the specified flags.

func OpenLog

func OpenLog(flags int) (*os.File, error)

OpenLog opens the log file with the specified flags.

func OpenToken

func OpenToken(flags int) (*os.File, error)

OpenToken opens the token file with the specified flags.

Types

type Config

type Config struct {
	AutoStart bool `json:"auto_start"`
}

func LoadConfig

func LoadConfig() (*Config, error)

LoadConfig loads the configuration from the configuration file.

type Event

type Event struct {
	Summary string `json:"summary"`
	Url     string `json:"url"`
	Start   start  `json:"start"`
}

type Events

type Events struct {
	Items []*Event `json:"events"`
}

type FuncInfo

type FuncInfo struct {
	Name string
	File string
	Line int
}

func CallerInfo

func CallerInfo() FuncInfo

CallerInfo returns information about the caller of the function where it's called.

Jump to

Keyboard shortcuts

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