wafapiv1

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package wafapiv1 : Operations and models for the WafApiV1 service

Index

Constants

View Source
const (
	UpdateWafSettingsOptions_Value_Off = "off"
	UpdateWafSettingsOptions_Value_On  = "on"
)

Constants associated with the UpdateWafSettingsOptions.Value property. value.

View Source
const DefaultServiceName = "waf_api"

DefaultServiceName is the default key used to find external configuration information.

View Source
const DefaultServiceURL = "https://api.cis.cloud.ibm.com"

DefaultServiceURL is the default URL to make service requests to.

Variables

This section is empty.

Functions

func UnmarshalWafResponse

func UnmarshalWafResponse(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalWafResponse unmarshals an instance of WafResponse from the specified map of raw messages.

func UnmarshalWafResponseResult

func UnmarshalWafResponseResult(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalWafResponseResult unmarshals an instance of WafResponseResult from the specified map of raw messages.

Types

type GetWafSettingsOptions

type GetWafSettingsOptions struct {

	// Allows users to set headers on API requests
	Headers map[string]string
}

GetWafSettingsOptions : The GetWafSettings options.

func (*GetWafSettingsOptions) SetHeaders

func (options *GetWafSettingsOptions) SetHeaders(param map[string]string) *GetWafSettingsOptions

SetHeaders : Allow user to set Headers

type UpdateWafSettingsOptions

type UpdateWafSettingsOptions struct {
	// value.
	Value *string `json:"value,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

UpdateWafSettingsOptions : The UpdateWafSettings options.

func (*UpdateWafSettingsOptions) SetHeaders

func (options *UpdateWafSettingsOptions) SetHeaders(param map[string]string) *UpdateWafSettingsOptions

SetHeaders : Allow user to set Headers

func (*UpdateWafSettingsOptions) SetValue

func (options *UpdateWafSettingsOptions) SetValue(value string) *UpdateWafSettingsOptions

SetValue : Allow user to set Value

type WafApiV1

type WafApiV1 struct {
	Service *core.BaseService

	// cloud resource name.
	Crn *string

	// zone id.
	ZoneID *string
}

WafApiV1 : This document describes CIS WAF API.

Version: 1.0.0

func NewWafApiV1

func NewWafApiV1(options *WafApiV1Options) (service *WafApiV1, err error)

NewWafApiV1 : constructs an instance of WafApiV1 with passed in options.

func NewWafApiV1UsingExternalConfig

func NewWafApiV1UsingExternalConfig(options *WafApiV1Options) (wafApi *WafApiV1, err error)

NewWafApiV1UsingExternalConfig : constructs an instance of WafApiV1 with passed in options and external configuration.

func (*WafApiV1) GetWafSettings

func (wafApi *WafApiV1) GetWafSettings(getWafSettingsOptions *GetWafSettingsOptions) (result *WafResponse, response *core.DetailedResponse, err error)

GetWafSettings : Get WAF setting of a specific zone Get WAF of a specific zone.

func (*WafApiV1) NewGetWafSettingsOptions

func (*WafApiV1) NewGetWafSettingsOptions() *GetWafSettingsOptions

NewGetWafSettingsOptions : Instantiate GetWafSettingsOptions

func (*WafApiV1) NewUpdateWafSettingsOptions

func (*WafApiV1) NewUpdateWafSettingsOptions() *UpdateWafSettingsOptions

NewUpdateWafSettingsOptions : Instantiate UpdateWafSettingsOptions

func (*WafApiV1) SetServiceURL

func (wafApi *WafApiV1) SetServiceURL(url string) error

SetServiceURL sets the service URL

func (*WafApiV1) UpdateWafSettings

func (wafApi *WafApiV1) UpdateWafSettings(updateWafSettingsOptions *UpdateWafSettingsOptions) (result *WafResponse, response *core.DetailedResponse, err error)

UpdateWafSettings : Set WAF setting for a specific zone Set WAF (on | off) for a specific zone.

type WafApiV1Options

type WafApiV1Options struct {
	ServiceName   string
	URL           string
	Authenticator core.Authenticator

	// cloud resource name.
	Crn *string `validate:"required"`

	// zone id.
	ZoneID *string `validate:"required"`
}

WafApiV1Options : Service options

type WafResponse

type WafResponse struct {
	// success.
	Success *bool `json:"success" validate:"required"`

	// errors.
	Errors [][]string `json:"errors" validate:"required"`

	// messages.
	Messages [][]string `json:"messages" validate:"required"`

	// result.
	Result *WafResponseResult `json:"result" validate:"required"`
}

WafResponse : waf response.

type WafResponseResult

type WafResponseResult struct {
	// id.
	ID *string `json:"id,omitempty"`

	// value.
	Value *string `json:"value,omitempty"`

	// editable.
	Editable *bool `json:"editable,omitempty"`

	// modified date.
	ModifiedOn *string `json:"modified_on,omitempty"`
}

WafResponseResult : result.

Jump to

Keyboard shortcuts

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