wafruntime

package
v1.0.185 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ServiceName = "waf"       // Name of service.
	EndpointsID = ServiceName // ID to lookup a service endpoint with.
	ServiceID   = "waf"       // ServiceID is a unique identifer of a specific service.
)

Service information constants

Variables

This section is empty.

Functions

This section is empty.

Types

type QueryLLMGenerateStreamInput

type QueryLLMGenerateStreamInput struct {

	// MsgID is a required field
	MsgID *string `type:"string" json:",omitempty" required:"true"`

	UseStream *bool `type:"boolean" json:",omitempty"`
	// contains filtered or unexported fields
}

func (QueryLLMGenerateStreamInput) GoString

func (s QueryLLMGenerateStreamInput) GoString() string

GoString returns the string representation

func (*QueryLLMGenerateStreamInput) SetMsgID

SetMsgID sets the MsgID field's value.

func (*QueryLLMGenerateStreamInput) SetUseStream

SetUseStream sets the UseStream field's value.

func (QueryLLMGenerateStreamInput) String

String returns the string representation

func (*QueryLLMGenerateStreamInput) Validate

func (s *QueryLLMGenerateStreamInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type QueryLLMGenerateStreamOutput

type QueryLLMGenerateStreamOutput struct {
	*utils.StreamReader
}

type WAFAPI

type WAFAPI interface {
	QueryLLMGenerateStream(*QueryLLMGenerateStreamInput) (*QueryLLMGenerateStreamOutput, error)
	QueryLLMGenerateStreamWithContext(volcengine.Context, *QueryLLMGenerateStreamInput, ...request.Option) (*QueryLLMGenerateStreamOutput, error)
	QueryLLMGenerateStreamRequest(*QueryLLMGenerateStreamInput) (*request.Request, *QueryLLMGenerateStreamOutput)
}

WAFAPI provides an interface to enable mocking the waf.WAF service client's API operation,

// volcengine sdk func uses an SDK service client to make a request to
// WAF.
func myFunc(svc WAFAPI) bool {
    // Make svc.AddIpGroup request
}

func main() {
    sess := session.New()
    svc := waf.New(sess)

    myFunc(svc)
}

type WAFRuntime

type WAFRuntime struct {
	*waf.WAF
}

WAF provides the API operation methods for making requests to WAF. See this package's package overview docs for details on the service.

WAF methods are safe to use concurrently. It is not safe to modify mutate any of the struct's properties though.

func New

New create int can support ssl or region locate set

func (*WAFRuntime) QueryLLMGenerateStream

func (c *WAFRuntime) QueryLLMGenerateStream(input *QueryLLMGenerateStreamInput) (*QueryLLMGenerateStreamOutput, error)

QueryLLMGenerateStream API operation for WAF.

Returns volcengineerr.Error for service API and SDK errors. Use runtime type assertions with volcengineerr.Error's Code and Message methods to get detailed information about the error.

See the VOLCENGINE API reference guide for WAF's API operation QueryLLMGenerateStream for usage and error information.

func (*WAFRuntime) QueryLLMGenerateStreamRequest

func (c *WAFRuntime) QueryLLMGenerateStreamRequest(input *QueryLLMGenerateStreamInput) (req *request.Request, output *QueryLLMGenerateStreamOutput)

QueryLLMGenerateStreamRequest generates a "volcengine/request.Request" representing the client's request for the QueryLLMGenerateStream operation. The "output" return value will be populated with the QueryLLMGenerateStreamCommon request's response once the request completes successfully.

Use "Send" method on the returned QueryLLMGenerateStreamCommon Request to send the API call to the service. the "output" return value is not valid until after QueryLLMGenerateStreamCommon Send returns without error.

See QueryLLMGenerateStream for more information on using the QueryLLMGenerateStream API call, and error handling.

// Example sending a request using the QueryLLMGenerateStreamRequest method.
req, resp := client.QueryLLMGenerateStreamRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

func (*WAFRuntime) QueryLLMGenerateStreamWithContext

func (c *WAFRuntime) QueryLLMGenerateStreamWithContext(ctx volcengine.Context, input *QueryLLMGenerateStreamInput, opts ...request.Option) (*QueryLLMGenerateStreamOutput, error)

QueryLLMGenerateStreamWithContext is the same as QueryLLMGenerateStream with the addition of the ability to pass a context and additional request options.

See QueryLLMGenerateStream for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. Ifthe context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

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