Documentation
¶
Index ¶
- func ResolveClientID(ctx context.Context, client *clockify.Client, workspaceID, ref string) (string, error)
- func ResolveProjectID(ctx context.Context, client *clockify.Client, workspaceID, ref string) (string, error)
- func ResolveTagID(ctx context.Context, client *clockify.Client, workspaceID, ref string) (string, error)
- func ResolveTaskID(ctx context.Context, client *clockify.Client, ...) (string, error)
- func ResolveUserID(ctx context.Context, client *clockify.Client, workspaceID, ref string) (string, error)
- func ValidateID(id, name string) error
- func ValidateNameRef(ref, kind string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResolveClientID ¶
func ResolveProjectID ¶
func ResolveTagID ¶
func ResolveTaskID ¶
func ResolveUserID ¶
func ValidateID ¶
func ValidateNameRef ¶
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.