SucuriAPI

package module
v0.0.0-...-d740339 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2021 License: MIT Imports: 5 Imported by: 0

README

SucuriAPI-Go

Work in progress

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sucuri

type Sucuri struct {
	Url       string
	ApiKey    string
	ApiSecret string
}

Sucuri represents the endpoint and credentials to submit a SucuriRequest to the API

func (Sucuri) BlacklistIP

func (s Sucuri) BlacklistIP(ip string, remove bool) SucuriRequest

WhitelistIP generates a SucuriRequest that adds the specified IP address to the whitelisted IPs list. If remove is set to true the specified IP address will be removed from the whitelisted IP addresses

func (Sucuri) BlacklistPath

func (s Sucuri) BlacklistPath(path string, pattern string) SucuriRequest

BlacklistPath generates a SucuriRequest that adds the specified Path to the blacklisted paths list, with the specified pattern (matches|begins_with|ends_with|equals).

func (Sucuri) ClearCache

func (s Sucuri) ClearCache() SucuriRequest

ClearCache generates a SucuriRequest that will clear the site cache

func (Sucuri) ClearFileFromCache

func (s Sucuri) ClearFileFromCache(filepath string) SucuriRequest

ClearFileFromCache generates a SucuriRequest that will clear the file specified by the path from cache

func (Sucuri) UpdateSetting

func (s Sucuri) UpdateSetting(setting string, value string) SucuriRequest

UpdateSetting generates a SucuriRequest that will overwrite the specified setting and value

func (Sucuri) WhitelistIP

func (s Sucuri) WhitelistIP(ip string, remove bool) SucuriRequest

WhitelistIP generates a SucuriRequest that adds the specified IP address to the whitelisted IPs list. If remove is set to true the specified IP address will be removed from the whitelisted IP addresses

func (Sucuri) WhitelistPath

func (s Sucuri) WhitelistPath(path string, pattern string) SucuriRequest

WhitelistPath generates a SucuriRequest that adds the specified Path to the whitelisted paths list, with the specified pattern (matches|begins_with|ends_with|equals).

type SucuriRequest

type SucuriRequest struct {
	// contains filtered or unexported fields
}

func (SucuriRequest) Submit

func (r SucuriRequest) Submit()

Jump to

Keyboard shortcuts

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