datahub

package
v4.2.550+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client wraps datahub client

func NewDatahubClient

func NewDatahubClient(config Config) Client

NewDatahubClient creates Datahub instance base on config

func (*Client) ActivateRegistrationData

func (d *Client) ActivateRegistrationData(signatureData string) error

ActivateRegistrationData activates signature data to Alameda-Datahub

func (*Client) AddKeycode

func (d *Client) AddKeycode(keycode string) error

AddKeycode adds keycode to Alameda-Datahub

func (*Client) Close

func (d *Client) Close() error

Close closes grpc connection

func (*Client) CreateEvents

func (d *Client) CreateEvents(events []*datahubv1alpha1_event.Event) error

CreateEvents creates events to Alameda-Datahub

func (*Client) DeleteKeycode

func (d *Client) DeleteKeycode(keycode string) error

DeleteKeycode delete keycode from Alameda-Datahub

func (*Client) GenerateRegistrationData

func (d *Client) GenerateRegistrationData() (string, error)

GenerateRegistrationData generates registration data from Alameda-Datahub

func (*Client) GetKeycodeDetail

func (d *Client) GetKeycodeDetail(keycode string) (keycodes.Keycode, error)

GetKeycodeDetail get keycode detail from Alameda-Datahub

func (*Client) ListKeycodes

func (d *Client) ListKeycodes() ([]*keycodes.Keycode, error)

ListKeycodes lists keycode from Alameda-Datahub

func (*Client) Ping

func (d *Client) Ping() error

Ping checks if Alameda-Datahub can serves request

type Config

type Config struct {
	Address string `mapstructure:"address"`
}

Config provides a configuration struct to connect to Alameda-Datahub

func NewDefaultConfig

func NewDefaultConfig() Config

NewDefaultConfig returns default configuration

Jump to

Keyboard shortcuts

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