nmsdk

package module
v0.0.0-...-08c9faa Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2020 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

View Source
const (
	SubjectProvisionNewDevice        = "NATS-MANAGER.PROVISION-NEW-DEVICE"
	SubjectGenerateDeviceCredentials = "NATS-MANAGER.GENERATE-DEVICE-CREDENTIALS"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AppCredsRetriever

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

func NewAppCredsRetriever

func NewAppCredsRetriever(appName, vaultMount, vaultPrefix string, vault *vault.Client) AppCredsRetriever

func NewAppCredsRetrieverFromEnv

func NewAppCredsRetrieverFromEnv(appName string) (AppCredsRetriever, error)

func (AppCredsRetriever) NatsCredsCBs

func (r AppCredsRetriever) NatsCredsCBs() (nats.UserJWTHandler, nats.SignatureHandler)

type Client

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

func NewClient

func NewClient(nc *nats.Conn) *Client

func (*Client) GenerateDeviceCredentials

func (c *Client) GenerateDeviceCredentials(ctx context.Context, id uuid.UUID) (string, error)

func (*Client) ProvisionNewDevice

func (c *Client) ProvisionNewDevice(ctx context.Context, id uuid.UUID) error

type ManagerError

type ManagerError struct {
	Data *rpcpb.Error
}

func (ManagerError) Error

func (e ManagerError) Error() string

Jump to

Keyboard shortcuts

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