nta

package
v1.0.175 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package ntaiface provides an interface to enable mocking the NTA service client for testing your code.

It is important to note that this interface will have breaking changes when the service model is updated and adds new API operations, paginators, and waiters.

Index

Constants

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

Service information constants

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateFileDetectionInput

type CreateFileDetectionInput struct {

	// SignURL is a required field
	SignURL *string `min:"1" max:"2048" type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (CreateFileDetectionInput) GoString

func (s CreateFileDetectionInput) GoString() string

GoString returns the string representation

func (*CreateFileDetectionInput) SetSignURL

SetSignURL sets the SignURL field's value.

func (CreateFileDetectionInput) String

func (s CreateFileDetectionInput) String() string

String returns the string representation

func (*CreateFileDetectionInput) Validate

func (s *CreateFileDetectionInput) Validate() error

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

type CreateFileDetectionOutput

type CreateFileDetectionOutput struct {
	Metadata *response.ResponseMetadata

	QueryKey *string `type:"string"`
	// contains filtered or unexported fields
}

func (CreateFileDetectionOutput) GoString

func (s CreateFileDetectionOutput) GoString() string

GoString returns the string representation

func (*CreateFileDetectionOutput) SetQueryKey

SetQueryKey sets the QueryKey field's value.

func (CreateFileDetectionOutput) String

func (s CreateFileDetectionOutput) String() string

String returns the string representation

type GetFileDetectionInput

type GetFileDetectionInput struct {

	// QueryKey is a required field
	QueryKey *string `max:"64" type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (GetFileDetectionInput) GoString

func (s GetFileDetectionInput) GoString() string

GoString returns the string representation

func (*GetFileDetectionInput) SetQueryKey

SetQueryKey sets the QueryKey field's value.

func (GetFileDetectionInput) String

func (s GetFileDetectionInput) String() string

String returns the string representation

func (*GetFileDetectionInput) Validate

func (s *GetFileDetectionInput) Validate() error

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

type GetFileDetectionOutput

type GetFileDetectionOutput struct {
	Metadata *response.ResponseMetadata

	FileMd5 *string `type:"string"`

	FileSecType *int32 `type:"int32"`

	FileSize *int64 `type:"int64"`

	Finish *int32 `type:"int32"`

	VirusDesc *string `type:"string"`
	// contains filtered or unexported fields
}

func (GetFileDetectionOutput) GoString

func (s GetFileDetectionOutput) GoString() string

GoString returns the string representation

func (*GetFileDetectionOutput) SetFileMd5

SetFileMd5 sets the FileMd5 field's value.

func (*GetFileDetectionOutput) SetFileSecType

func (s *GetFileDetectionOutput) SetFileSecType(v int32) *GetFileDetectionOutput

SetFileSecType sets the FileSecType field's value.

func (*GetFileDetectionOutput) SetFileSize

SetFileSize sets the FileSize field's value.

func (*GetFileDetectionOutput) SetFinish

SetFinish sets the Finish field's value.

func (*GetFileDetectionOutput) SetVirusDesc

SetVirusDesc sets the VirusDesc field's value.

func (GetFileDetectionOutput) String

func (s GetFileDetectionOutput) String() string

String returns the string representation

type NTA

type NTA struct {
	*client.Client
}

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

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

func New

func New(p client.ConfigProvider, cfgs ...*volcengine.Config) *NTA

New create int can support ssl or region locate set

func (*NTA) CreateFileDetection

func (c *NTA) CreateFileDetection(input *CreateFileDetectionInput) (*CreateFileDetectionOutput, error)

CreateFileDetection API operation for NTA.

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 NTA's API operation CreateFileDetection for usage and error information.

func (*NTA) CreateFileDetectionCommon

func (c *NTA) CreateFileDetectionCommon(input *map[string]interface{}) (*map[string]interface{}, error)

CreateFileDetectionCommon API operation for NTA.

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 NTA's API operation CreateFileDetectionCommon for usage and error information.

func (*NTA) CreateFileDetectionCommonRequest

func (c *NTA) CreateFileDetectionCommonRequest(input *map[string]interface{}) (req *request.Request, output *map[string]interface{})

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

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

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

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

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

func (*NTA) CreateFileDetectionCommonWithContext

func (c *NTA) CreateFileDetectionCommonWithContext(ctx volcengine.Context, input *map[string]interface{}, opts ...request.Option) (*map[string]interface{}, error)

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

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

The context must be non-nil and will be used for request cancellation. If the 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.

func (*NTA) CreateFileDetectionRequest

func (c *NTA) CreateFileDetectionRequest(input *CreateFileDetectionInput) (req *request.Request, output *CreateFileDetectionOutput)

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

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

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

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

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

func (*NTA) CreateFileDetectionWithContext

func (c *NTA) CreateFileDetectionWithContext(ctx volcengine.Context, input *CreateFileDetectionInput, opts ...request.Option) (*CreateFileDetectionOutput, error)

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

See CreateFileDetection 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.

func (*NTA) GetFileDetection

func (c *NTA) GetFileDetection(input *GetFileDetectionInput) (*GetFileDetectionOutput, error)

GetFileDetection API operation for NTA.

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 NTA's API operation GetFileDetection for usage and error information.

func (*NTA) GetFileDetectionCommon

func (c *NTA) GetFileDetectionCommon(input *map[string]interface{}) (*map[string]interface{}, error)

GetFileDetectionCommon API operation for NTA.

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 NTA's API operation GetFileDetectionCommon for usage and error information.

func (*NTA) GetFileDetectionCommonRequest

func (c *NTA) GetFileDetectionCommonRequest(input *map[string]interface{}) (req *request.Request, output *map[string]interface{})

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

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

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

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

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

func (*NTA) GetFileDetectionCommonWithContext

func (c *NTA) GetFileDetectionCommonWithContext(ctx volcengine.Context, input *map[string]interface{}, opts ...request.Option) (*map[string]interface{}, error)

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

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

The context must be non-nil and will be used for request cancellation. If the 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.

func (*NTA) GetFileDetectionRequest

func (c *NTA) GetFileDetectionRequest(input *GetFileDetectionInput) (req *request.Request, output *GetFileDetectionOutput)

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

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

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

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

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

func (*NTA) GetFileDetectionWithContext

func (c *NTA) GetFileDetectionWithContext(ctx volcengine.Context, input *GetFileDetectionInput, opts ...request.Option) (*GetFileDetectionOutput, error)

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

See GetFileDetection 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.

type NTAAPI

type NTAAPI interface {
	CreateFileDetectionCommon(*map[string]interface{}) (*map[string]interface{}, error)
	CreateFileDetectionCommonWithContext(volcengine.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error)
	CreateFileDetectionCommonRequest(*map[string]interface{}) (*request.Request, *map[string]interface{})

	CreateFileDetection(*CreateFileDetectionInput) (*CreateFileDetectionOutput, error)
	CreateFileDetectionWithContext(volcengine.Context, *CreateFileDetectionInput, ...request.Option) (*CreateFileDetectionOutput, error)
	CreateFileDetectionRequest(*CreateFileDetectionInput) (*request.Request, *CreateFileDetectionOutput)

	GetFileDetectionCommon(*map[string]interface{}) (*map[string]interface{}, error)
	GetFileDetectionCommonWithContext(volcengine.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error)
	GetFileDetectionCommonRequest(*map[string]interface{}) (*request.Request, *map[string]interface{})

	GetFileDetection(*GetFileDetectionInput) (*GetFileDetectionOutput, error)
	GetFileDetectionWithContext(volcengine.Context, *GetFileDetectionInput, ...request.Option) (*GetFileDetectionOutput, error)
	GetFileDetectionRequest(*GetFileDetectionInput) (*request.Request, *GetFileDetectionOutput)
}

NTAAPI provides an interface to enable mocking the nta.NTA service client's API operation,

// volcengine sdk func uses an SDK service client to make a request to
// NTA.
func myFunc(svc NTAAPI) bool {
    // Make svc.CreateFileDetection request
}

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

    myFunc(svc)
}

Jump to

Keyboard shortcuts

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