client

package
v0.33.5 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Adapt added in v0.29.26

func Adapt(c dkpreg.Client) dkpreg.Client

Adapt wraps an upstream dkpreg.Client so that it satisfies the local Client interface. This is useful for fake/stub clients that return the upstream interface type.

func NewFromOptions added in v0.29.19

func NewFromOptions(host string, opts ...regclient.Option) dkpreg.Client

NewFromOptions wraps regclient.New (the functional-options constructor) and returns a value that fully satisfies the local Client interface. Use this when building options via Option functions (e.g. regclient.WithAuth).

func PathToSegments added in v0.33.5

func PathToSegments(path string) []string

PathToSegments splits a slash-separated path into its non-empty segments, ready to spread into Client.WithSegment (which takes segments one by one and does not split slashes). Leading, trailing, and doubled slashes - and the empty string - drop out, so they never become a bogus empty segment.

  • PathToSegments("modules/csi") -> ["modules", "csi"]
  • PathToSegments("/modules/") -> ["modules"]
  • PathToSegments("") -> [] (WithSegment() then leaves the client unchanged)

Types

This section is empty.

Jump to

Keyboard shortcuts

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