smclient

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2018 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	GetInfo() (*types.Info, error)
	RegisterPlatform(*types.Platform) (*types.Platform, error)
	RegisterBroker(*types.Broker) (*types.Broker, error)
	ListBrokers() (*types.Brokers, error)
	ListPlatforms() (*types.Platforms, error)
	DeleteBroker(string) error
	DeletePlatform(string) error
	UpdateBroker(string, *types.Broker) (*types.Broker, error)
	UpdatePlatform(string, *types.Platform) (*types.Platform, error)
}

Client should be implemented by SM clients

func NewClient

func NewClient(httpClient auth.Client, config *ClientConfig) Client

NewClient returns new SM client

type ClientConfig

type ClientConfig struct {
	auth.Token

	ClientID              string
	ClientSecret          string
	AuthorizationEndpoint string
	TokenEndpoint         string
	IssuerURL             string

	URL         string
	User        string
	SSLDisabled bool
}

ClientConfig contains the configuration of the CLI.

func (ClientConfig) GetToken

func (clientCfg ClientConfig) GetToken() auth.Token

GetToken returns the oauth token from the client configuration

func (ClientConfig) Validate

func (clientCfg ClientConfig) Validate() error

Validate validates client config

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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