task

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModeEncrypt = "encrypt"
	ModeDecrypt = "decrypt"
)

Variables

This section is empty.

Functions

func GenerateOutputFilename

func GenerateOutputFilename(inputFile, outputDir, outputSuffix, mode string) string

Types

type FilePair

type FilePair struct {
	PlaintextPath string
	EncryptedPath string
	Format        string
}

func BuildGroupFilePairs

func BuildGroupFilePairs(opts GroupOptions) ([]FilePair, error)

func BuildProjectGroupFilePairs

func BuildProjectGroupFilePairs(opts GroupOptions) ([]FilePair, error)

type FormatRule

type FormatRule struct {
	Raw     string
	Format  string
	Matcher PatternMatcher
}

type GroupOptions

type GroupOptions struct {
	Root            string
	Patterns        []string
	FormatRules     []string
	UnknownAsBinary bool
	Mode            string
}

type Options

type Options struct {
	InputDir        string
	Patterns        []string
	FormatRules     []string
	UnknownAsBinary bool
	KeyFile         string
	PublicKey       string
	Parallel        int
	Verbose         bool
	Force           bool
	FilePairs       []FilePair
}

type PatternMatcher

type PatternMatcher struct {
	// contains filtered or unexported fields
}

func NewPatternMatcher

func NewPatternMatcher(patterns []string) (PatternMatcher, error)

func (PatternMatcher) Decision

func (m PatternMatcher) Decision(path string, isDir bool) (bool, bool)

type PatternRule

type PatternRule struct {
	Raw           string
	Negated       bool
	DirectoryOnly bool
	Anchored      bool
	HasSlash      bool
	Segments      []string
}

func ParsePatternRules

func ParsePatternRules(patterns []string) ([]PatternRule, error)

type Result

type Result struct {
	SourceFile string
	TargetFile string
	Success    bool
	Error      error
}

type Summary

type Summary struct {
	TotalFiles   int
	SuccessCount int
	FailedCount  int
	Results      []Result
}

func Decrypt

func Decrypt(opts Options) (*Summary, error)

func Encrypt

func Encrypt(opts Options) (*Summary, error)

Jump to

Keyboard shortcuts

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