client

package
v1.15.0-alpha Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2021 License: Apache-2.0 Imports: 13 Imported by: 21

Documentation

Index

Constants

View Source
const (
	// DefaultHost is the default Host
	// found in Meta (info) section of spec file
	DefaultHost string = "localhost"
	// DefaultBasePath is the default BasePath
	// found in Meta (info) section of spec file
	DefaultBasePath string = "/santaba/rest"
)

Variables

View Source
var DefaultSchemes = []string{"https"}

DefaultSchemes are the default schemes found in Meta (info) section of spec file

Functions

func LMv1Auth

func LMv1Auth(accessId, accessKey string) runtime.ClientAuthInfoWriter

Types

type Config

type Config struct {
	AccessKey    *string
	AccessID     *string
	TransportCfg *TransportConfig
}

Config information for LMSdkGo client

func NewConfig

func NewConfig() *Config

NewConfig create a new empty client Config

func (*Config) SetAccessID

func (c *Config) SetAccessID(accessID *string)

SetAccessID for the client Config

func (*Config) SetAccessKey

func (c *Config) SetAccessKey(accessKey *string)

SetAccessKey for the client Config

func (*Config) SetAccountDomain

func (c *Config) SetAccountDomain(accountDomain *string)

SetAccountDomain for the client Config

type LMSdkGo

type LMSdkGo struct {
	LM *lm.Client

	Transport runtime.ClientTransport
}

LMSdkGo is a client for LM sdk go

func New

func New(c *Config) *LMSdkGo

New creates a new LM sdk go client

func (*LMSdkGo) SetTransport

func (c *LMSdkGo) SetTransport(transport runtime.ClientTransport)

SetTransport changes the transport on the client and all its subresources

type TransportConfig

type TransportConfig struct {
	Host     string
	BasePath string
	Schemes  []string
}

TransportConfig contains the transport related info, found in the meta section of the spec file.

func DefaultTransportConfig

func DefaultTransportConfig() *TransportConfig

DefaultTransportConfig creates a TransportConfig with the default settings taken from the meta section of the spec file.

func (*TransportConfig) WithBasePath

func (cfg *TransportConfig) WithBasePath(basePath string) *TransportConfig

WithBasePath overrides the default basePath, provided by the meta section of the spec file.

func (*TransportConfig) WithHost

func (cfg *TransportConfig) WithHost(host string) *TransportConfig

WithHost overrides the default host, provided by the meta section of the spec file.

func (*TransportConfig) WithSchemes

func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig

WithSchemes overrides the default schemes, provided by the meta section of the spec file.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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