api

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2025 License: Apache-2.0 Imports: 11 Imported by: 7

Documentation

Index

Constants

View Source
const (
	PluginFS  = "fs"
	PluginMsg = "msg"
)

Variables

This section is empty.

Functions

func TenantIDInterceptor

func TenantIDInterceptor(ctx context.Context, req *http.Request) error

TenantIDInterceptor is a client intercept that try to inject tenant id into request header. only support string and int type.

Types

type Fs

type Fs struct {
	*fs.Client
	// contains filtered or unexported fields
}

Fs file system client. the file system is a file storage service, such as s3, oss, etc.

func NewFs

func NewFs() *Fs

NewFs creates a new file system client.

func (*Fs) Apply

func (f *Fs) Apply(sdk *SDK, cnf *conf.Configuration) error

type Msg

type Msg struct {
	*msg.APIClient
	// contains filtered or unexported fields
}

func NewMsg

func NewMsg() *Msg

func (*Msg) Apply

func (f *Msg) Apply(sdk *SDK, cnf *conf.Configuration) error

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 NewSDK

func NewSDK(cnf *conf.Configuration) (sdk *SDK, err error)

NewSDK creates a new SDK.

func (*SDK) Fs

func (sdk *SDK) Fs() *Fs

Fs returns the file system plugin.

func (*SDK) GetPlugin

func (sdk *SDK) GetPlugin(name string) (Plugin, bool)

GetPlugin returns a plugin by name.

func (*SDK) Msg

func (sdk *SDK) Msg() *Msg

Msg returns the msg plugin.

func (*SDK) RegisterPlugin

func (sdk *SDK) RegisterPlugin(name string, cnf *conf.Configuration) error

RegisterPlugin registers a plugin. Plugins are used to extend the SDK.

Directories

Path Synopsis
fs

Jump to

Keyboard shortcuts

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