resolve

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: May 12, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResolveClientID

func ResolveClientID(ctx context.Context, client *clockify.Client, workspaceID, ref string) (string, error)

func ResolveProjectID

func ResolveProjectID(ctx context.Context, client *clockify.Client, workspaceID, ref string) (string, error)

func ResolveTagID

func ResolveTagID(ctx context.Context, client *clockify.Client, workspaceID, ref string) (string, error)

func ResolveTaskID

func ResolveTaskID(ctx context.Context, client *clockify.Client, workspaceID, projectID, ref string) (string, error)

func ResolveUserID

func ResolveUserID(ctx context.Context, client *clockify.Client, workspaceID, ref string) (string, error)

func ValidateID

func ValidateID(id, name string) error

func ValidateNameRef

func ValidateNameRef(ref, kind string) error

ValidateNameRef is the permissive sibling of ValidateID, used for name-or-ID inputs that resolve to a Clockify entity by name. Names reach the Clockify API as URL query-parameter values (which url.Values safely percent-encodes) — never as path segments — so the strict path-safety character class ValidateID enforces would over-reject legitimate workspace names like "ACME / Support" or "R&D 50%".

The contract here mirrors the API surface: anything that's not a control byte and isn't pathologically long is accepted; the caller is expected to resolve it via name lookup, then validate the resulting Clockify ID with ValidateID before any path use.

Types

This section is empty.

Jump to

Keyboard shortcuts

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