Documentation
¶
Index ¶
- func IsNameResolutionPermissionError(err error) bool
- func Resolve(input string, resourceType string, client *api.Client, ...) (int, error)
- func ResolveActivity(ctx context.Context, client *api.Client, input string) (int, error)
- func ResolveAll(ctx context.Context, client *api.Client, inputs []string, resourceType string, ...) ([]int, error)
- func ResolveAssignee(ctx context.Context, client *api.Client, input string) (int, error)
- func ResolveCategory(ctx context.Context, client *api.Client, input string, ...) (int, error)
- func ResolveCustomField(ctx context.Context, client *api.Client, input string) (int, error)
- func ResolveCustomFieldNames(ctx context.Context, client *api.Client, inputs []string) ([]int, error)
- func ResolveGroup(ctx context.Context, client *api.Client, input string) (int, error)
- func ResolvePriority(ctx context.Context, client *api.Client, input string) (int, error)
- func ResolveProject(ctx context.Context, client *api.Client, input string) (int, string, error)
- func ResolveQuery(ctx context.Context, client *api.Client, input string, ...) (*models.SavedQuery, error)
- func ResolveRole(ctx context.Context, client *api.Client, input string) (int, error)
- func ResolveStatus(ctx context.Context, client *api.Client, input string) (int, error)
- func ResolveTracker(ctx context.Context, client *api.Client, input string) (int, error)
- func ResolveTrackerNames(ctx context.Context, client *api.Client, inputs []string) ([]int, error)
- func ResolveUser(ctx context.Context, client *api.Client, input string) (int, error)
- func ResolveVersion(ctx context.Context, client *api.Client, input string, ...) (int, error)
- type NameResolutionPermissionError
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsNameResolutionPermissionError ¶
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 ¶
ResolveActivity resolves a time entry activity by name or numeric ID.
func ResolveAll ¶ added in v2.6.0
func ResolveAll( ctx context.Context, client *api.Client, inputs []string, resourceType string, fetchOptions func() ([]Option, error), ) ([]int, error)
ResolveAll resolves a batch of inputs against the same option set, fetching the option list at most once. Numeric inputs short-circuit and never trigger a fetch. Empty strings are skipped. The fetcher is only invoked when a non-numeric input is encountered, matching the lazy behavior of Resolve.
func ResolveAssignee ¶
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 ResolveCustomField ¶ added in v2.6.0
ResolveCustomField resolves a custom field by name or numeric ID.
func ResolveCustomFieldNames ¶ added in v2.6.0
func ResolveCustomFieldNames(ctx context.Context, client *api.Client, inputs []string) ([]int, error)
ResolveCustomFieldNames resolves a batch of custom-field inputs (names or numeric IDs) to numeric IDs, fetching /custom_fields.json at most once.
func ResolveGroup ¶
ResolveGroup resolves a group by name or numeric ID.
func ResolvePriority ¶
ResolvePriority resolves a priority by name or numeric ID.
func ResolveProject ¶
ResolveProject resolves a project by name/identifier or numeric ID. Returns both the numeric ID and the string identifier (needed for version resolution).
func ResolveQuery ¶ added in v2.6.0
func ResolveQuery(ctx context.Context, client *api.Client, input string, projectIdentifier string) (*models.SavedQuery, error)
ResolveQuery resolves a saved query by numeric ID or name. When the input is numeric the underlying list is not fetched; the returned SavedQuery only has its ID populated in that case. For name input every visible query is listed and matched case-insensitively.
When projectIdentifier is set, a project-scoped query whose ProjectID matches wins over a global query with the same name. Queries scoped to a different project are excluded entirely.
func ResolveRole ¶ added in v2.6.0
ResolveRole resolves a role by name or numeric ID.
func ResolveStatus ¶
ResolveStatus resolves a status by name or numeric ID.
func ResolveTracker ¶
ResolveTracker resolves a tracker by name or numeric ID.
func ResolveTrackerNames ¶ added in v2.6.0
ResolveTrackerNames resolves a batch of tracker inputs (names or numeric IDs) to numeric IDs, fetching /trackers.json at most once.
func ResolveUser ¶
ResolveUser resolves a user by "me", login/name, or numeric ID.
Types ¶
type NameResolutionPermissionError ¶
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 ¶
func (e *NameResolutionPermissionError) Error() string