mapping

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Resolver

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

Resolver resolves the profile for a given path

func NewResolver

func NewResolver(cfg *config.Config) *Resolver

NewResolver creates a new mapping resolver

func (*Resolver) AddFolderMapping

func (r *Resolver) AddFolderMapping(path, profileID string) error

AddFolderMapping adds a folder mapping

func (*Resolver) AddRepoMapping

func (r *Resolver) AddRepoMapping(path, profileID string) error

AddRepoMapping adds a repo mapping

func (*Resolver) RemoveFolderMapping

func (r *Resolver) RemoveFolderMapping(path string) error

RemoveFolderMapping removes a folder mapping

func (*Resolver) RemoveRepoMapping

func (r *Resolver) RemoveRepoMapping(path string) error

RemoveRepoMapping removes a repo mapping

func (*Resolver) ResolveProfile

func (r *Resolver) ResolveProfile(path string) (*config.Profile, error)

ResolveProfile resolves which profile should be used for a given path Precedence: 1. Repo mapping (exact match) 2. Deepest matching folder mapping 3. Default profile (if set) 4. No match (returns nil)

Jump to

Keyboard shortcuts

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