dfpath

package
v2.0.3-beta.2 Latest Latest
Warning

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

Go to latest
Published: May 16, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultCacheDir = "/var/cache/dragonfly"
View Source
var DefaultConfigDir = "/etc/dragonfly"
View Source
var DefaultDataDir = "/var/lib/dragonfly"
View Source
var DefaultLogDir = "/var/log/dragonfly"
View Source
var DefaultWorkHome = "/usr/local/dragonfly"

Functions

This section is empty.

Types

type Dfpath

type Dfpath interface {
	WorkHome() string
	CacheDir() string
	LogDir() string
	DataDir() string
	PluginDir() string
	DaemonSockPath() string
	DaemonLockPath() string
	DfgetLockPath() string
}

Dfpath is the interface used for init project path

func New

func New(options ...Option) (Dfpath, error)

New returns a new dfpath interface

type Option

type Option func(d *dfpath)

Option is a functional option for configuring the dfpath

func WithCacheDir

func WithCacheDir(dir string) Option

WithCacheDir set the cache directory

func WithDataDir

func WithDataDir(dir string) Option

WithDataDir set download data directory

func WithLogDir

func WithLogDir(dir string) Option

WithLogDir set the log directory

func WithWorkHome

func WithWorkHome(dir string) Option

WithWorkHome set the workhome directory

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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