config

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

package config contains configuration information for `sfid` app

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// NameSpace of UUID v5, not used if only Sha256 output is requested.
	NameSpace string

	//WithMD5 returns MD5 hash back
	WithMD5 bool

	// WithUUID returns UUIDv5 back using either supplied or default UUID
	// NameSpace.
	WithUUID bool

	// Input is a string that might mean either a string, a file or a directory.
	Input string

	// Recursive sets recursive directory walking and creating output for each
	// file. This setting is ignored if Input is not a directory.
	Recursive bool

	// JobsNum sets provided concurrency number for running the algorithm
	JobsNum int
}

Config keeps configuration data.

func New

func New(opts ...Option) Config

type Option

type Option func(c *Config)

func OptInput

func OptInput(s string) Option

func OptJobsNum

func OptJobsNum(i int) Option

func OptNameSpace

func OptNameSpace(s string) Option

func OptRecursive

func OptRecursive(b bool) Option

func OptWithMD5 added in v0.1.1

func OptWithMD5(b bool) Option

func OptWithUUID

func OptWithUUID(b bool) Option

Jump to

Keyboard shortcuts

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