common

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

common functions used by both binaries

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultConfigPath

func DefaultConfigPath() string

DefaultConfigPath returns the default config location for onedriver

func LogLevels

func LogLevels() []string

LogLevels returns the available logging levels

func StringToLevel

func StringToLevel(input string) zerolog.Level

StringToLevel converts a string to a zerolog.LogLevel that can be used with zerolog

func Version

func Version() string

Version returns the current version string

Types

type Config

type Config struct {
	CacheDir         string `yaml:"cacheDir"`
	LogLevel         string `yaml:"log"`
	graph.AuthConfig `yaml:"auth"`
}

func LoadConfig

func LoadConfig(path string) *Config

LoadConfig is the primary way of loading onedriver's config

func (Config) WriteConfig

func (c Config) WriteConfig(path string)

Write config to a file

Jump to

Keyboard shortcuts

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