api

package
v0.0.0-...-5090d89 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultServerURL *url.URL
)

Functions

This section is empty.

Types

type Client

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

Client is an API client for the LoRa Cloud Device Management v1 service.

func New

func New(cl *http.Client, opts ...Option) (*Client, error)

New creates a new Client with the given options.

func (*Client) Do

func (c *Client) Do(ctx context.Context, method, category, entity, operation string, body io.Reader, queryParams ...queryParam) (*http.Response, error)

Do executes a new HTTP request with the given parameters and body and returns the response.

type Option

type Option interface {
	// contains filtered or unexported methods
}

Option is an option for the API client.

func WithBaseURL

func WithBaseURL(baseURL *url.URL) Option

WithBaseURL uses the given base URL for the requests of the client.

func WithToken

func WithToken(token string) Option

WithToken uses the given authentication token in the client.

type OptionFunc

type OptionFunc func(*Client)

OptionFunc is an Option implemented as a function.

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

Uplinks is an API client for the Uplink API.

func (*Uplinks) Send

Send sends the given uplink to the Device Management service.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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