barracudawaf

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Provider

func Provider() *schema.Provider

Provider : Schema definition for barracudawaf provider

Types

type APIRequest

type APIRequest struct {
	Method      string
	URL         string
	Body        interface{}
	ContentType string
}

APIRequest : builds API request for resource.

type BarracudaWAF

type BarracudaWAF struct {
	Host      string
	User      string
	Password  string
	Token     string
	UserAgent string //specifies the caller of the request
	Transport *http.Transport
}

BarracudaWAF : container for barracuda's WAF session state.

func NewSession

func NewSession(host, port, user, passwd string) *BarracudaWAF

NewSession : Barracuda WAF system connection.

func (*BarracudaWAF) APICall

func (b *BarracudaWAF) APICall(options *APIRequest) ([]byte, error)

APICall : is used to query the Barracuda WAF web API.

func (*BarracudaWAF) CreateBarracudaWAFResource

func (b *BarracudaWAF) CreateBarracudaWAFResource(name string, request *APIRequest) error

CreateBarracudaWAFResource : Creates Barracuda WAF resource

func (*BarracudaWAF) DeleteBarracudaWAFResource

func (b *BarracudaWAF) DeleteBarracudaWAFResource(name string, request *APIRequest) error

DeleteBarracudaWAFResource : Delete Barracuda WAF resource

func (*BarracudaWAF) GetAuthToken

func (b *BarracudaWAF) GetAuthToken() (*BarracudaWAF, error)

GetAuthToken : Check Token for Authentication Barracuda WAF APIs

func (*BarracudaWAF) GetBarracudaWAFResource

func (b *BarracudaWAF) GetBarracudaWAFResource(name string, request *APIRequest) (*WAFResouceData, error)

GetBarracudaWAFResource : Updates Barracuda WAF resource

func (*BarracudaWAF) UpdateBarracudaWAFResource

func (b *BarracudaWAF) UpdateBarracudaWAFResource(name string, request *APIRequest) error

UpdateBarracudaWAFResource : Updates Barracuda WAF resource

func (*BarracudaWAF) UpdateBarracudaWAFSubResource

func (b *BarracudaWAF) UpdateBarracudaWAFSubResource(name string, resourceEndpoint string, request *APIRequest) error

UpdateBarracudaWAFSubResource : Updates Barracuda WAF sub resource

type Config

type Config struct {
	IPAddress string
	Username  string
	Password  string
	AdminPort string
}

Config : container for Barracuda WAF session

func (*Config) Client

func (c *Config) Client() (*BarracudaWAF, error)

Client : Barracuda WAF Client for REST API calls for resource crud

type RequestError

type RequestError struct {
	Message string `json:"msg,omitempty"`
	Token   string `json:"token,omitempty"`
}

RequestError : contains information about any error from a request.

func (*RequestError) Error

func (r *RequestError) Error() error

Error : returns the error message.

type WAFResouceData

type WAFResouceData struct {
	Token  string                            `json:"token,omitempty"`
	Object string                            `json:"object,omitempty"`
	Data   map[string]map[string]interface{} `json:"data,omitempty"`
}

WAFResouceData : Container for barracuda WAF resource's data

Source Files

Jump to

Keyboard shortcuts

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