resolver

package
v1.12.2 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsNameResolutionPermissionError added in v1.12.1

func IsNameResolutionPermissionError(err error) bool

IsNameResolutionPermissionError reports whether err indicates that a human-readable lookup was blocked by permissions.

func Resolve

func Resolve(input string, resourceType string, client *api.Client, fetcher func() ([]Option, error)) (int, error)

Resolve attempts to resolve input to a numeric ID. If input is numeric, it returns the parsed int directly. Otherwise, it calls fetcher to get available options and performs case-insensitive exact matching on the name.

func ResolveActivity added in v1.9.0

func ResolveActivity(ctx context.Context, client *api.Client, input string) (int, error)

ResolveActivity resolves a time entry activity by name or numeric ID.

func ResolveAssignee

func ResolveAssignee(ctx context.Context, client *api.Client, input string) (int, error)

ResolveAssignee resolves an assignee by "me", login/name, or numeric ID.

func ResolveCategory

func ResolveCategory(ctx context.Context, client *api.Client, input string, projectIdentifier string) (int, error)

ResolveCategory resolves an issue category by name or numeric ID. projectIdentifier is required when resolving by name.

func ResolveGroup added in v1.9.0

func ResolveGroup(ctx context.Context, client *api.Client, input string) (int, error)

ResolveGroup resolves a group by name or numeric ID.

func ResolvePriority

func ResolvePriority(ctx context.Context, client *api.Client, input string) (int, error)

ResolvePriority resolves a priority by name or numeric ID.

func ResolveProject

func ResolveProject(ctx context.Context, client *api.Client, input string) (int, string, error)

ResolveProject resolves a project by name/identifier or numeric ID. Returns both the numeric ID and the string identifier (needed for version resolution).

func ResolveStatus

func ResolveStatus(ctx context.Context, client *api.Client, input string) (int, error)

ResolveStatus resolves a status by name or numeric ID.

func ResolveTracker

func ResolveTracker(ctx context.Context, client *api.Client, input string) (int, error)

ResolveTracker resolves a tracker by name or numeric ID.

func ResolveUser added in v1.9.0

func ResolveUser(ctx context.Context, client *api.Client, input string) (int, error)

ResolveUser resolves a user by "me", login/name, or numeric ID.

func ResolveVersion

func ResolveVersion(ctx context.Context, client *api.Client, input string, projectIdentifier string) (int, error)

ResolveVersion resolves a version by name or numeric ID. projectIdentifier is required when resolving by name.

Types

type NameResolutionPermissionError added in v1.12.1

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

NameResolutionPermissionError indicates that a name lookup could not be completed because the API does not allow listing the candidate resource.

func (*NameResolutionPermissionError) Error added in v1.12.1

type Option

type Option struct {
	ID   int
	Name string
}

Option represents a name/ID pair for resolution.

Jump to

Keyboard shortcuts

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