Categorygithub.com/MiLk/nsscache-go
modulepackage
1.2.0
Repository: https://github.com/milk/nsscache-go.git
Documentation: pkg.go.dev

# README

nsscache-go

GoDoc Build Status Coverage Status

Implementation of nsscache in Go. The main goal of this library is too allow to write easily new program which can populate the nsscache files from not yet supported sources or to use your custom logic to generate those cache files.

Running the test

To run the test against libnss-cache, you need to have docker installer, and build the test image.

cd docker
docker build -t nsscache-go:latest .

See

# Packages

Package cache contains the types and convenience functions for manipulating caches in memory prior to writing to the disk.
No description provided by the author
Package source defines the interfaces that fill caches.

# Functions

NewCaches creates cache structs for passwd, group and shadow.
WriteAtomic allows atomic updates to files by first writing to a temporary file, setting all parameters on the temporary file and renaming it to the desired name.

# Structs

Option is a wrapper type used to specify options on a specific cache.
WriteOptions specifies optional values for writing the caches out.

# Type aliases

CacheMap allows you to manage the caches as a group.