fvt

package
v2.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const ContentTypeJson = "application/json"

Variables

This section is empty.

Functions

func GetResponseResultMap

func GetResponseResultMap(resp *http.Response) (result map[string]any, err error)

func GetResponseResultTextAndMap

func GetResponseResultTextAndMap(resp *http.Response) (body []byte, result map[string]any, err error)

func GetResponseText

func GetResponseText(resp *http.Response) (string, error)

func TryAssert

func TryAssert(count int, interval time.Duration, tryFunc func() bool) bool

Types

type SDK

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

func NewSdk

func NewSdk(baseUrl string) (*SDK, error)

func (*SDK) CreateConf

func (sdk *SDK) CreateConf(confpath string, conf map[string]any) (resp *http.Response, err error)

func (*SDK) CreateRule

func (sdk *SDK) CreateRule(ruleJson string) (resp *http.Response, err error)

func (*SDK) CreateStream

func (sdk *SDK) CreateStream(streamJson string) (resp *http.Response, err error)

func (*SDK) Delete

func (sdk *SDK) Delete(command string) (resp *http.Response, err error)

func (*SDK) DeleteRule

func (sdk *SDK) DeleteRule(name string) (resp *http.Response, err error)

func (*SDK) DeleteStream

func (sdk *SDK) DeleteStream(name string) (resp *http.Response, err error)

func (*SDK) Get

func (sdk *SDK) Get(command string) (resp *http.Response, err error)

func (*SDK) GetRuleStatus

func (sdk *SDK) GetRuleStatus(name string) (map[string]any, error)

func (*SDK) Post

func (sdk *SDK) Post(command string, body string) (resp *http.Response, err error)

func (*SDK) PostWithParam

func (sdk *SDK) PostWithParam(command string, param string, body string) (resp *http.Response, err error)

func (*SDK) RestartRule

func (sdk *SDK) RestartRule(ruleId string) (resp *http.Response, err error)

func (*SDK) StopRule added in v2.0.5

func (sdk *SDK) StopRule(ruleId string) (resp *http.Response, err error)

func (*SDK) UpdateRule added in v2.0.5

func (sdk *SDK) UpdateRule(name, ruleJson string) (resp *http.Response, err error)

Jump to

Keyboard shortcuts

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