Documentation
¶
Index ¶
- Constants
- func TenantIDInterceptor(ctx context.Context, req *http.Request) error
- type Auth
- type Fs
- type Msg
- type Plugin
- type SDK
- func (sdk *SDK) Auth() *Auth
- func (sdk *SDK) Fs() *Fs
- func (sdk *SDK) GetPlugin(name string) (Plugin, bool)
- func (sdk *SDK) GetToken() (*oauth2.Token, error)
- func (sdk *SDK) HTTPClient() *http.Client
- func (sdk *SDK) Msg() *Msg
- func (sdk *SDK) RegisterPlugin(name string, cnf *conf.Configuration) error
Constants ¶
View Source
const ( PluginFS = "fs" PluginMsg = "msg" PluginAuth = "auth" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Plugin ¶
type Plugin interface {
Apply(*SDK, *conf.Configuration) error
}
Plugin is the knockout service client plugin interface.
type SDK ¶
type SDK struct {
// contains filtered or unexported fields
}
SDK is the knockout service client SDK.
func DefaultSDK ¶ added in v0.3.3
func DefaultSDK(cfg *conf.Configuration) (sdk *SDK, err error)
DefaultSDK creates a new SDK with default configuration.
func (*SDK) HTTPClient ¶ added in v0.6.1
HTTPClient returns the internal HTTP client. The returned client shares the same Transport, connection pool, and configuration. Modifying it will affect all SDK plugins and internal calls.
func (*SDK) RegisterPlugin ¶
func (sdk *SDK) RegisterPlugin(name string, cnf *conf.Configuration) error
RegisterPlugin registers a plugin. Plugins are used to extend the SDK.
Click to show internal directories.
Click to hide internal directories.