config

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: MIT Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package config resolves where wamcp keeps its state on disk.

Index

Constants

View Source
const EnvDataDir = "WAMCP_DATA_DIR"

EnvDataDir overrides the default data directory.

Variables

This section is empty.

Functions

This section is empty.

Types

type Paths

type Paths struct {
	Dir        string // root data directory (created with 0700)
	SessionDB  string // whatsmeow device/session store
	MessagesDB string // local message archive
	MediaDir   string // downloaded media
	LockFile   string // single-instance lock
	TokenFile  string // bearer token for the HTTP transport
}

Paths groups every file wamcp reads or writes.

func Resolve

func Resolve(dir string) (Paths, error)

Resolve returns the paths for dir, or for the default location when dir is empty: $WAMCP_DATA_DIR, otherwise <user config dir>/wamcp.

func (Paths) Ensure

func (p Paths) Ensure() error

Ensure creates the data directory with owner-only permissions.

Jump to

Keyboard shortcuts

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