mmds

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrUnauthorized is returned when the MMDS token is invalid.
	ErrUnauthorized = fmt.Errorf("Unauthorized")
)

Functions

This section is empty.

Types

type Client

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

Client is a client for the MMDS API.

func NewClient

func NewClient(opts ...Opt) *Client

NewClient creates a new Client.

func (*Client) GetMetadata

func (c *Client) GetMetadata(ctx context.Context, path string) (map[string]interface{}, error)

GetMetadata gets the metadata for the given path.

type Opt

type Opt func(*Client)

Opt is an option for the Client.

func WithHTTPClient

func WithHTTPClient(client *http.Client) Opt

WithHTTPClient sets the HTTP client for the Client.

Jump to

Keyboard shortcuts

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