utils

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// QueryAction of the manager which search service packages, service instances or service bindings
	QueryAction action = "Query"
	// DeployAction of manager which deploy service binding or service instance
	DeployAction action = "Deploy"
	// UninstallAction of manager which uninstall service binding or service instance
	UninstallAction action = "Uninstall"
)

Variables

View Source
var (
	// ErrIllegalParameters pass in from url or body struct
	ErrIllegalParameters = fmt.Errorf("illegal parameters")
)

Functions

func AuditLog

func AuditLog(ctx *context.Context, traceName string, resourceType action, name *string, err *error)

AuditLog write the audit log from the defer method, and the detail dependents on the error. Because only use the kappctl binary tool or CURL APIs to visit manager, thus, it only offers APICallType of trace.

func ReplyJSON

func ReplyJSON(ctx *context.Context, stateCode int, resp interface{})

ReplyJSON sends json reply to http client

func ValidString

func ValidString(str string) bool

ValidString does the string is valid or not

Types

This section is empty.

Jump to

Keyboard shortcuts

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