sigsci

package module
Version: v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2021 License: MIT Imports: 9 Imported by: 3

README

Actions Status GoDoc Go Report Card

go-sigsci

Go client library for the Signal Sciences API.

Installation

go get github.com/signalsciences/go-sigsci

Usage

email := “[sigsci email]”
password := “[sigsci password]“
sc, err := sigsci.NewClient(email, password)
if err != nil {
        log.Fatal(err)
}

Full example

package main

import (
        "log"

        sigsci "github.com/signalsciences/go-sigsci"
)

func main() {
        email := “[sigsci email]“
        password := “[sigsci password]“
        sc, err := sigsci.NewClient(email, password)
        if err != nil {
                log.Fatal(err)
        }

        agents, err := sc.ListAgents("testcorp", "www.mysite.com")
        if err != nil {
                log.Fatal(err)
        }

        log.Println(agents)
}

Documentation

Overview

Package sigsci provides methods for interacting with the Signal Sciences API.

Index

Examples

Constants

View Source
const (
	RoleNoAccess = Role("none")
	RoleUnknown  = Role("unknown")
	RoleOwner    = Role("owner")
	RoleAdmin    = Role("admin")
	RoleUser     = Role("user")
	RoleObserver = Role("observer")

	// Deprecated corp/site roles
	RoleSiteNoAccess = Role("none")
	RoleSiteUnknown  = Role("unknown")
	RoleSiteOwner    = Role("owner")
	RoleSiteAdmin    = Role("admin")
	RoleSiteUser     = Role("user")
	RoleSiteObserver = Role("observer")
	RoleCorpOwner    = Role("corpOwner")
	RoleCorpUser     = Role("corpUser")
)

All available Roles

Variables

This section is empty.

Functions

This section is empty.

Types

type Action added in v0.1.1

type Action struct {
	Type   string `json:"type,omitempty"` //(block, allow, exclude)
	Signal string `json:"signal,omitempty"`
}

Action contains the rule action

type ActivityEvent

type ActivityEvent struct {
	ID          string
	EventType   string
	MsgData     map[string]string
	Message     string
	Attachments []struct{}
	Created     time.Time
}

ActivityEvent contains the data for activity page responses.

type Agent

type Agent struct {
	AgentActive                 bool      `json:"agent.active"`
	AgentAddr                   string    `json:"agent.addr"`
	AgentArgs                   string    `json:"agent.args"`
	AgentBuildID                string    `json:"agent.build_id"`
	AgentCGroup                 string    `json:"agent.cgroup"`
	AgentConnectionsDropped     int       `json:"agent.connections_dropped"`
	AgentConnectionsOpen        int       `json:"agent.connections_open"`
	AgentConnectionsTotal       int       `json:"agent.connections_total"`
	AgentCurrentRequests        int       `json:"agent.current_requests"`
	AgentDecisionTime50th       float64   `json:"agent.decision_time_50th"`
	AgentDecisionTime95th       float64   `json:"agent.decision_time_95th"`
	AgentDecisionTime99th       float64   `json:"agent.decision_time_99th"`
	AgentEnabled                bool      `json:"agent.enabled"`
	AgentLastRuleUpdate         time.Time `json:"agent.last_rule_update"`
	AgentLastSeen               time.Time `json:"agent.last_seen"`
	AgentLatencyTime50th        float64   `json:"agent.latency_time_50th"`
	AgentLatencyTime95th        float64   `json:"agent.latency_time_95th"`
	AgentLatencyTime99th        float64   `json:"agent.latency_time_99th"`
	AgentMaxProcs               int       `json:"agent.max_procs"`
	AgentName                   string    `json:"agent.name"`
	AgentPID                    int       `json:"agent.pid"`
	AgentReadBytes              int       `json:"agent.read_bytes"`
	AgentRPCPostrequest         int       `json:"agent.rpc_postrequest"`
	AgentRPCPrerequest          int       `json:"agent.rpc_prerequest"`
	AgentRPCUpdaterequest       int       `json:"agent.rpc_updaterequest"`
	AgentRuleUpdates            int       `json:"agent.rule_updates"`
	AgentStatus                 string    `json:"agent.status"`
	AgentTimestamp              int       `json:"agent.timestamp"`
	AgentTimezone               string    `json:"agent.timezone"`
	AgentTimezoneOffset         int       `json:"agent.timezone_offset"`
	AgentUploadMetadataFailures int       `json:"agent.upload_metadata_failures"`
	AgentUploadSize             int       `json:"agent.upload_size"`
	AgentUptime                 int       `json:"agent.uptime"`
	AgentVersion                string    `json:"agent.version"`
	AgentVersionsBehind         int       `json:"agent.versions_behind"`
	AgentWriteBytes             int       `json:"agent.write_bytes"`
	HostAgentCPU                float64   `json:"host.agent_cpu"`
	HostArchitecture            string    `json:"host.architecture"`
	HostClockSkew               int       `json:"host.clock_skew"`
	HostCPU                     float64   `json:"host.cpu"`
	HostCPUMhz                  int       `json:"host.cpu_mhz"`
	HostInstanceType            string    `json:"host.instance_type"`
	HostNumCPU                  int       `json:"host.num_cpu"`
	HostOS                      string    `json:"host.os"`
	HostRemoteAddr              string    `json:"host.remote_addr"`
	ModuleDetected              bool      `json:"module.detected"`
	ModuleServer                string    `json:"module.server"`
	ModuleType                  string    `json:"module.type"`
	ModuleVersion               string    `json:"module.version"`
	ModuleVersionsBehind        int       `json:"module.versions_behind"`
	RuntimeGcPauseMillis        float64   `json:"runtime.gc_pause_millis"`
	RuntimeMemSize              int       `json:"mem_size"`
	RuntimeNumGc                int       `json:"num_gc"`
	RuntimeNumGoroutines        int       `json:"num_goroutines"`
}

Agent contains the data for an agent

type AgentLog

type AgentLog struct {
	Hostname  string    `json:"hostName"`
	LogLevel  string    `json:"logLevel"`
	Message   string    `json:"message"`
	CreatedAt time.Time `json:"createdAt"`
}

AgentLog is an agent log

type Alert added in v0.1.1

type Alert struct {
	AlertUpdateBody
	ID        string     `json:"id,omitempty"`
	Type      string     `json:"type,omitempty"`
	TagName   string     `json:"tag_name,omitempty"`
	FieldName string     `json:"field_name,omitempty"`
	Created   *time.Time `json:"created,omitempty"`
	CreatedBy string     `json:"created_by,omitempty"`
}

Alert basic struct for an Alert

type AlertUpdateBody added in v0.1.1

type AlertUpdateBody struct {
	LongName             string `json:"longName"`
	Interval             int    `json:"interval"`  // 1, 10 or 60
	Threshold            int    `json:"threshold"` // greater than 0, max 10000
	SkipNotifications    bool   `json:"skipNotifications,omitempty"`
	Enabled              bool   `json:"enabled"`
	Action               string `json:"action"`
	BlockDurationSeconds int    `json:"blockDurationSeconds,omitempty"`
}

AlertUpdateBody body needed to update an alert

type Client

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

Client is the API client

func NewClient

func NewClient(email, password string) (Client, error)

NewClient authenticates and returns a Client API client

func NewTokenClient

func NewTokenClient(email, token string) Client

NewTokenClient creates a Client using token authentication

func (*Client) AddBlacklistIP

func (sc *Client) AddBlacklistIP(corpName, siteName string, body ListIPBody) (ListIP, error)

AddBlacklistIP adds an IP address to the blacklist.

func (*Client) AddCorpIntegration added in v0.1.1

func (sc *Client) AddCorpIntegration(corpName string, body IntegrationBody) (Integration, error)

AddCorpIntegration adds an integration.

func (sc *Client) AddHeaderLink(corpName, siteName string, body HeaderLinkBody) ([]HeaderLink, error)

AddHeaderLink adds a header link.

func (*Client) AddIntegration

func (sc *Client) AddIntegration(corpName, siteName string, body IntegrationBody) ([]Integration, error)

AddIntegration adds an integration.

func (*Client) AddRedaction

func (sc *Client) AddRedaction(corpName, siteName string, body RedactionBody) ([]Redaction, error)

AddRedaction adds a redaction.

func (*Client) AddSiteMember

func (sc *Client) AddSiteMember(corpName, siteName, email string) (SiteMemberResponse, error)

AddSiteMember adds an existing user to a site by email.

func (*Client) AddSiteMembers

func (sc *Client) AddSiteMembers(corpName, siteName string, body siteMembersBody) ([]SiteMember, error)

AddSiteMembers adds one or more existing users to a site.

func (*Client) AddWhitelistIP

func (sc *Client) AddWhitelistIP(corpName, siteName string, body ListIPBody) (ListIP, error)

AddWhitelistIP adds an IP address to the whitelist.

func (*Client) CreateCorpList added in v0.1.1

func (sc *Client) CreateCorpList(corpName string, body CreateListBody) (ResponseListBody, error)

CreateCorpList corp list

func (*Client) CreateCorpRule added in v0.1.1

func (sc *Client) CreateCorpRule(corpName string, body CreateCorpRuleBody) (ResponseCorpRuleBody, error)

CreateCorpRule creates a rule and returns the response

func (*Client) CreateCorpSignalTag added in v0.1.1

func (sc *Client) CreateCorpSignalTag(corpName string, body CreateSignalTagBody) (ResponseSignalTagBody, error)

CreateCorpSignalTag create signal tag

func (*Client) CreateCustomAlert

func (sc *Client) CreateCustomAlert(corpName, siteName string, body CustomAlertBody) (CustomAlert, error)

CreateCustomAlert creates a custom alert.

func (*Client) CreateSite added in v0.1.1

func (sc *Client) CreateSite(corpName string, body CreateSiteBody) (Site, error)

CreateSite Creates a site in a corp.

func (*Client) CreateSiteList added in v0.1.1

func (sc *Client) CreateSiteList(corpName, siteName string, body CreateListBody) (ResponseListBody, error)

CreateSiteList Create a site list

func (*Client) CreateSiteRedaction added in v0.1.1

func (sc *Client) CreateSiteRedaction(corpName, siteName string, body CreateSiteRedactionBody) (ResponseSiteRedactionBody, error)

CreateSiteRedaction Create a site list

func (*Client) CreateSiteRule added in v0.1.1

func (sc *Client) CreateSiteRule(corpName, siteName string, body CreateSiteRuleBody) (ResponseSiteRuleBody, error)

CreateSiteRule creates a rule and returns the response

func (*Client) CreateSiteSignalTag added in v0.1.1

func (sc *Client) CreateSiteSignalTag(corpName, siteName string, body CreateSignalTagBody) (ResponseSignalTagBody, error)

CreateSiteSignalTag create signal tag

func (*Client) DeleteBlacklistIP

func (sc *Client) DeleteBlacklistIP(corpName, siteName, id string) error

DeleteBlacklistIP deletes a blacklisted IP by id.

func (*Client) DeleteCorpIntegration added in v0.1.1

func (sc *Client) DeleteCorpIntegration(corpName, id string) error

DeleteCorpIntegration deletes a redaction by id.

func (*Client) DeleteCorpListByID added in v0.1.1

func (sc *Client) DeleteCorpListByID(corpName string, id string) error

DeleteCorpListByID deletes a rule and returns an error

func (*Client) DeleteCorpRuleByID added in v0.1.1

func (sc *Client) DeleteCorpRuleByID(corpName, id string) error

DeleteCorpRuleByID deletes a rule and returns an error

func (*Client) DeleteCorpSignalTagByID added in v0.1.1

func (sc *Client) DeleteCorpSignalTagByID(corpName string, id string) error

DeleteCorpSignalTagByID delete signal tag by id

func (*Client) DeleteCorpUser

func (sc *Client) DeleteCorpUser(corpName, email string) error

DeleteCorpUser deletes a user from the given corp.

func (*Client) DeleteCustomAlert

func (sc *Client) DeleteCustomAlert(corpName, siteName, id string) error

DeleteCustomAlert deletes a custom alert.

func (sc *Client) DeleteHeaderLink(corpName, siteName, id string) error

DeleteHeaderLink deletes a header link by id.

func (*Client) DeleteIntegration

func (sc *Client) DeleteIntegration(corpName, siteName, id string) error

DeleteIntegration deletes a redaction by id.

func (*Client) DeleteRedaction

func (sc *Client) DeleteRedaction(corpName, siteName, id string) error

DeleteRedaction deletes a redaction by id.

func (*Client) DeleteSite added in v0.1.1

func (sc *Client) DeleteSite(corpName, siteName string) error

DeleteSite deletes the site

func (*Client) DeleteSiteListByID added in v0.1.1

func (sc *Client) DeleteSiteListByID(corpName, siteName string, id string) error

DeleteSiteListByID deletes a rule and returns an error

func (*Client) DeleteSiteMember

func (sc *Client) DeleteSiteMember(corpName, siteName, email string) error

DeleteSiteMember deletes a site member by email.

func (*Client) DeleteSiteMonitor added in v0.1.1

func (sc *Client) DeleteSiteMonitor(corpName, siteName, id string) error

DeleteSiteMonitor Deletes the site monitor URL for a given site.

func (*Client) DeleteSiteRedactionByID added in v0.1.1

func (sc *Client) DeleteSiteRedactionByID(corpName, siteName string, id string) error

DeleteSiteRedactionByID deletes a redaction and returns an error

func (*Client) DeleteSiteRuleByID added in v0.1.1

func (sc *Client) DeleteSiteRuleByID(corpName, siteName, id string) error

DeleteSiteRuleByID deletes a rule and returns an error

func (*Client) DeleteSiteSignalTagByID added in v0.1.1

func (sc *Client) DeleteSiteSignalTagByID(corpName, siteName, id string) error

DeleteSiteSignalTagByID delete signal tag by id

func (*Client) DeleteWhitelistIP

func (sc *Client) DeleteWhitelistIP(corpName, siteName, id string) error

DeleteWhitelistIP deletes a whitelisted IP by id.

func (*Client) ExpireEvent

func (sc *Client) ExpireEvent(corpName, siteName, id string) (Event, error)

ExpireEvent expires an event by ID.

func (*Client) GenerateSiteMonitor

func (sc *Client) GenerateSiteMonitor(corpName, siteName string) (SiteMonitor, error)

GenerateSiteMonitor generates a site monitor URL.

func (*Client) GenerateSiteMonitorDashboard added in v0.1.1

func (sc *Client) GenerateSiteMonitorDashboard(corpName, siteName, dashboard string) (SiteMonitor, error)

GenerateSiteMonitorDashboard generates a site monitor URL for a dashboard.

func (*Client) GetAgent

func (sc *Client) GetAgent(corpName, siteName, agentName string) (Agent, error)

GetAgent gets an agent by name.

func (*Client) GetAgentLogs

func (sc *Client) GetAgentLogs(corpName, siteName, agentName string) ([]AgentLog, error)

GetAgentLogs gets agent logs for a given agent.

func (*Client) GetAllCorpLists added in v0.1.1

func (sc *Client) GetAllCorpLists(corpName string) (ResponseListBodyList, error)

GetAllCorpLists get all corp lists

func (*Client) GetAllCorpRules added in v0.1.1

func (sc *Client) GetAllCorpRules(corpName string) (ResponseCorpRuleBodyList, error)

GetAllCorpRules get all corp rules

func (*Client) GetAllCorpSignalTags added in v0.1.1

func (sc *Client) GetAllCorpSignalTags(corpName string) (ResponseSignalTagBodyList, error)

GetAllCorpSignalTags get all corp signals

func (*Client) GetAllSiteLists added in v0.1.1

func (sc *Client) GetAllSiteLists(corpName, siteName string) (ResponseListBodyList, error)

GetAllSiteLists get all site lists

func (*Client) GetAllSiteRedactions added in v0.1.1

func (sc *Client) GetAllSiteRedactions(corpName, siteName string) (ResponseSiteRedactionBodyList, error)

GetAllSiteRedactions Lists the Sites Redactions

func (*Client) GetAllSiteRules added in v0.1.1

func (sc *Client) GetAllSiteRules(corpName, siteName string) (ResponseSiteRuleBodyList, error)

GetAllSiteRules Lists the Site Rules

func (*Client) GetAllSiteSignalTags added in v0.1.1

func (sc *Client) GetAllSiteSignalTags(corpName, siteName string) (ResponseSignalTagBodyList, error)

GetAllSiteSignalTags get all site signals

func (*Client) GetCorp

func (sc *Client) GetCorp(corpName string) (Corp, error)

GetCorp gets a corp by name.

func (*Client) GetCorpIntegration added in v0.1.1

func (sc *Client) GetCorpIntegration(corpName, id string) (Integration, error)

GetCorpIntegration gets an integration by id.

func (*Client) GetCorpListByID added in v0.1.1

func (sc *Client) GetCorpListByID(corpName string, id string) (ResponseListBody, error)

GetCorpListByID get corp list by ID

func (*Client) GetCorpRuleByID added in v0.1.1

func (sc *Client) GetCorpRuleByID(corpName, id string) (ResponseCorpRuleBody, error)

GetCorpRuleByID get a site rule by id

func (*Client) GetCorpSignalTagByID added in v0.1.1

func (sc *Client) GetCorpSignalTagByID(corpName string, id string) (ResponseSignalTagBody, error)

GetCorpSignalTagByID get corp signal by id

func (*Client) GetCorpUser

func (sc *Client) GetCorpUser(corpName, email string) (CorpUser, error)

GetCorpUser gets a corp user by email.

func (*Client) GetCustomAlert

func (sc *Client) GetCustomAlert(corpName, siteName, id string) (CustomAlert, error)

GetCustomAlert gets a custom alert by ID

func (*Client) GetEvent

func (sc *Client) GetEvent(corpName, siteName, id string) (Event, error)

GetEvent gets an event by ID.

func (sc *Client) GetHeaderLink(corpName, siteName, id string) (HeaderLink, error)

GetHeaderLink gets a header link by id.

func (*Client) GetIntegration

func (sc *Client) GetIntegration(corpName, siteName, id string) (Integration, error)

GetIntegration gets an integration by id.

func (*Client) GetOverviewReport

func (sc *Client) GetOverviewReport(corpName string, query url.Values) ([]OverviewSite, error)

GetOverviewReport gets the overview report data for a given corp.

func (*Client) GetRedaction

func (sc *Client) GetRedaction(corpName, siteName, id string) (Redaction, error)

GetRedaction gets a redaction by id.

func (*Client) GetRequest

func (sc *Client) GetRequest(corpName, siteName, id string) (Request, error)

GetRequest gets a request by id.

func (*Client) GetRequestFeed

func (sc *Client) GetRequestFeed(corpName, siteName string, query url.Values) (next string, requests []Request, err error)

GetRequestFeed gets the request feed for the site.

func (*Client) GetSite

func (sc *Client) GetSite(corpName, siteName string) (Site, error)

GetSite gets a site by name.

func (*Client) GetSiteListByID added in v0.1.1

func (sc *Client) GetSiteListByID(corpName, siteName string, id string) (ResponseListBody, error)

GetSiteListByID get site list by ID

func (*Client) GetSiteMember

func (sc *Client) GetSiteMember(corpName, siteName, email string) (SiteMember, error)

GetSiteMember gets a site member by email.

func (*Client) GetSiteMonitor

func (sc *Client) GetSiteMonitor(corpName, siteName, email string) ([]SiteMonitor, error)

GetSiteMonitor gets the site monitor URL.

func (*Client) GetSitePrimaryAgentKey added in v0.1.2

func (sc *Client) GetSitePrimaryAgentKey(corpName, siteName string) (PrimaryAgentKey, error)

GetSitePrimaryAgentKey retrieve the primary agent keys

func (*Client) GetSiteRedactionByID added in v0.1.1

func (sc *Client) GetSiteRedactionByID(corpName, siteName, id string) (ResponseSiteRedactionBody, error)

GetSiteRedactionByID get a site redaction by id

func (*Client) GetSiteRuleByID added in v0.1.1

func (sc *Client) GetSiteRuleByID(corpName, siteName, id string) (ResponseSiteRuleBody, error)

GetSiteRuleByID get a site rule by id

func (*Client) GetSiteSignalTagByID added in v0.1.1

func (sc *Client) GetSiteSignalTagByID(corpName, siteName, id string) (ResponseSignalTagBody, error)

GetSiteSignalTagByID get site signal by id

func (*Client) GetSiteTemplateRuleByID added in v0.1.1

func (sc *Client) GetSiteTemplateRuleByID(corpName, siteName, id string) (SiteTemplate, error)

GetSiteTemplateRuleByID retrieves a site template rule

func (*Client) GetTimeseries

func (sc *Client) GetTimeseries(corpName, siteName string, query url.Values) ([]Timeseries, error)

GetTimeseries gets timeseries request info.

func (*Client) InviteSiteMember

func (sc *Client) InviteSiteMember(corpName, siteName, email string, body SiteMemberBody) (SiteMemberResponse, error)

InviteSiteMember invites a new user to a site by email.

func (*Client) InviteUser

func (sc *Client) InviteUser(corpName, email string, invite CorpUserInvite) (CorpUser, error)

InviteUser invites a user by email to a corp.

Example
email := testcreds.email
password := testcreds.token
sc, err := NewClient(email, password)
if err != nil {
	log.Fatal(err)
}

invite := NewCorpUserInvite(RoleCorpUser, []SiteMembership{
	NewSiteMembership(testcreds.site, RoleSiteOwner),
})

_, err = sc.InviteUser(testcreds.corp, "test@test.net", invite)
if err != nil {
	log.Fatal(err)
}
Output:

func (*Client) ListAgents

func (sc *Client) ListAgents(corpName, siteName string) ([]Agent, error)

ListAgents lists agents for a given corp and site.

func (*Client) ListBlacklistIPs

func (sc *Client) ListBlacklistIPs(corpName, siteName string) ([]ListIP, error)

ListBlacklistIPs lists blacklisted IP addresses.

func (*Client) ListCorpActivity

func (sc *Client) ListCorpActivity(corpName string, limit, page int) ([]ActivityEvent, error)

ListCorpActivity lists activity events for a given corp.

func (*Client) ListCorpUsers

func (sc *Client) ListCorpUsers(corpName string) ([]CorpUser, error)

ListCorpUsers lists corp users.

func (*Client) ListCorps

func (sc *Client) ListCorps() ([]Corp, error)

ListCorps lists corps.

func (*Client) ListCustomAlerts

func (sc *Client) ListCustomAlerts(corpName, siteName string) ([]CustomAlert, error)

ListCustomAlerts lists custom alerts for a given corp and site.

func (*Client) ListEvents

func (sc *Client) ListEvents(corpName, siteName string, query url.Values) ([]Event, error)

ListEvents lists events for a given site.

func (sc *Client) ListHeaderLinks(corpName, siteName string) ([]HeaderLink, error)

ListHeaderLinks lists header links.

func (*Client) ListIntegrations

func (sc *Client) ListIntegrations(corpName, siteName string) ([]Integration, error)

ListIntegrations lists integrations.

func (*Client) ListParams

func (sc *Client) ListParams(corpName, siteName string) ([]Param, error)

ListParams lists whitelisted parameters.

func (*Client) ListPaths

func (sc *Client) ListPaths(corpName, siteName string) ([]Path, error)

ListPaths lists whitelisted paths.

func (*Client) ListRedactions

func (sc *Client) ListRedactions(corpName, siteName string) ([]Redaction, error)

ListRedactions lists redactions.

func (*Client) ListSiteActivity

func (sc *Client) ListSiteActivity(corpName, siteName string, limit, page int) ([]ActivityEvent, error)

ListSiteActivity lists activity events for a given site.

func (*Client) ListSiteMembers

func (sc *Client) ListSiteMembers(corpName, siteName string) ([]SiteMember, error)

ListSiteMembers lists site members.

func (*Client) ListSites

func (sc *Client) ListSites(corpName string) ([]Site, error)

ListSites lists sites for a given corp.

func (*Client) ListSuspiciousIPs

func (sc *Client) ListSuspiciousIPs(corpName, siteName string) ([]SuspiciousIP, error)

ListSuspiciousIPs lists suspicious IPs.

func (*Client) ListTopAttacks

func (sc *Client) ListTopAttacks(corpName, siteName string, query url.Values) ([]TopAttack, error)

ListTopAttacks lists top attacks.

func (*Client) ListWhitelistIPs

func (sc *Client) ListWhitelistIPs(corpName, siteName string) ([]ListIP, error)

ListWhitelistIPs lists whitelisted IP addresses.

func (*Client) SearchRequests

func (sc *Client) SearchRequests(corpName, siteName string, query url.Values) (next string, requests []Request, err error)

SearchRequests searches requests.

func (*Client) UpdateCorp

func (sc *Client) UpdateCorp(corpName string, body UpdateCorpBody) (Corp, error)

UpdateCorp updates a corp by name.

func (*Client) UpdateCorpIntegration added in v0.1.1

func (sc *Client) UpdateCorpIntegration(corpName, id string, body UpdateIntegrationBody) error

UpdateCorpIntegration updates an integration by id.

func (*Client) UpdateCorpListByID added in v0.1.1

func (sc *Client) UpdateCorpListByID(corpName string, id string, body UpdateListBody) (ResponseListBody, error)

UpdateCorpListByID updates a corp list

func (*Client) UpdateCorpRuleByID added in v0.1.1

func (sc *Client) UpdateCorpRuleByID(corpName, id string, body CreateCorpRuleBody) (ResponseCorpRuleBody, error)

UpdateCorpRuleByID updates a rule and returns a response

func (*Client) UpdateCorpSignalTagByID added in v0.1.1

func (sc *Client) UpdateCorpSignalTagByID(corpName string, id string, body UpdateSignalTagBody) (ResponseSignalTagBody, error)

UpdateCorpSignalTagByID update corp signal

func (*Client) UpdateCustomAlert

func (sc *Client) UpdateCustomAlert(corpName, siteName, id string, body CustomAlertBody) (CustomAlert, error)

UpdateCustomAlert updates a custom alert by id.

func (*Client) UpdateIntegration

func (sc *Client) UpdateIntegration(corpName, siteName, id string, body UpdateIntegrationBody) error

UpdateIntegration updates an integration by id.

func (*Client) UpdateRedaction

func (sc *Client) UpdateRedaction(corpName, siteName, id string, body UpdateRedactionBody) (Redaction, error)

UpdateRedaction updates a redaction by id.

func (*Client) UpdateSite

func (sc *Client) UpdateSite(corpName, siteName string, body UpdateSiteBody) (Site, error)

UpdateSite updates a site by name.

func (*Client) UpdateSiteListByID added in v0.1.1

func (sc *Client) UpdateSiteListByID(corpName, siteName string, id string, body UpdateListBody) (ResponseListBody, error)

UpdateSiteListByID updates a site list and returns a response

func (*Client) UpdateSiteMonitor added in v0.1.1

func (sc *Client) UpdateSiteMonitor(corpName, siteName, id string, body UpdateSiteMonitorBody) error

UpdateSiteMonitor updates a monitor in place

func (*Client) UpdateSiteRedactionByID added in v0.1.1

func (sc *Client) UpdateSiteRedactionByID(corpName, siteName string, id string, body CreateSiteRedactionBody) (ResponseSiteRedactionBody, error)

UpdateSiteRedactionByID updates a site redaction and returns a response

func (*Client) UpdateSiteRuleByID added in v0.1.1

func (sc *Client) UpdateSiteRuleByID(corpName, siteName, id string, body CreateSiteRuleBody) (ResponseSiteRuleBody, error)

UpdateSiteRuleByID updates a rule and returns a response

func (*Client) UpdateSiteSignalTagByID added in v0.1.1

func (sc *Client) UpdateSiteSignalTagByID(corpName, siteName, id string, body UpdateSignalTagBody) (ResponseSignalTagBody, error)

UpdateSiteSignalTagByID update site signal

func (*Client) UpdateSiteTemplateRuleByID added in v0.1.1

func (sc *Client) UpdateSiteTemplateRuleByID(corpName, siteName, id string, body SiteTemplateRuleBody) (SiteTemplate, error)

UpdateSiteTemplateRuleByID updates a site template rule

type Condition added in v0.1.1

type Condition struct {
	Type          string      `json:"type,omitempty"`          //(group, single)
	GroupOperator string      `json:"groupOperator,omitempty"` //type: group - Conditions that must be matched when evaluating the request (all, any)
	Field         string      `json:"field,omitempty"`         //type: single - (scheme, method, path, useragent, domain, ip, responseCode, agentname, paramname, paramvalue, country, name, valueString, valueIp, signalType)
	Operator      string      `json:"operator,omitempty"`      //type: single - (equals, doesNotEqual, contains, doesNotContain, like, notLike, exists, doesNotExist, inList, notInList)
	Value         string      `json:"value,omitempty"`         //type: single - See request fields (https://docs.signalsciences.net/using-signal-sciences/features/rules/#request-fields)
	Conditions    []Condition `json:"conditions,omitempty"`
}

Condition contains rule condition

type ConfiguredDetectionField added in v0.1.1

type ConfiguredDetectionField struct {
	Name  string      `json:"name,omitempty"`
	Value interface{} `json:"value"`
}

ConfiguredDetectionField configuration for detection field in UpdateDetectionBody

type Corp

type Corp struct {
	Name                   string
	DisplayName            string
	SmallIconURI           string
	Created                time.Time
	SiteLimit              int
	Sites                  map[string]string
	AuthType               string
	MFAEnforced            bool
	SessionMaxAgeDashboard int
}

Corp contains details for a corp.

type CorpUser

type CorpUser struct {
	Name        string
	Email       string
	Memberships map[string]string
	Role        string
	Status      string
	MFAEnabled  bool
	AuthStatus  string
	Created     time.Time
}

CorpUser contains details for a corp user.

type CorpUserInvite

type CorpUserInvite struct {
	Role        Role              `json:"role"`
	Memberships inviteMemberships `json:"memberships"`
}

CorpUserInvite is the request struct for inviting a user to a corp.

func NewCorpUserInvite

func NewCorpUserInvite(corpRole Role, memberships []SiteMembership) CorpUserInvite

NewCorpUserInvite creates a new invitation struct for inviting a user to a corp.

type CreateCorpRuleBody added in v0.1.1

type CreateCorpRuleBody struct {
	SiteNames     []string    `json:"siteNames,omitempty"`      //Sites with the rule available. Rules with a global corpScope will return '[]'.
	Type          string      `json:"type,omitempty,omitempty"` //(request, signal)
	CorpScope     string      `json:"corpScope,omitempty"`      //Whether the rule is applied to all sites or to specific sites. (global, specificSites)
	Enabled       bool        `json:"enabled,omitempty"`
	GroupOperator string      `json:"groupOperator,omitempty"` //type: group - Conditions that must be matched when evaluating the request (all, any)
	Signal        string      `json:"signal,omitempty"`        //The signal id of the signal being excluded
	Reason        string      `json:"reason,omitempty"`        //Description of the rule
	Expiration    string      `json:"expiration,omitempty"`    //Date the rule will automatically be disabled. If rule is always enabled, will return empty string
	Conditions    []Condition `json:"conditions,omitempty"`
	Actions       []Action    `json:"actions,omitempty"`
}

CreateCorpRuleBody contains the rule of a Corp

type CreateListBody added in v0.1.1

type CreateListBody struct {
	Name        string   `json:"name,omitempty"`        //Descriptive list name
	Type        string   `json:"type,omitempty"`        //List types (string, ip, country, wildcard, signal)
	Description string   `json:"description,omitempty"` //Optional list description
	Entries     []string `json:"entries,omitempty"`     //List entries
}

CreateListBody Create List Request

type CreateSignalTagBody added in v0.1.1

type CreateSignalTagBody struct {
	ShortName   string `json:"shortName,omitempty"`   //The display name of the signal tag
	Description string `json:"description,omitempty"` //Optional signal tag description
}

CreateSignalTagBody create a signal tag

type CreateSiteBody added in v0.1.1

type CreateSiteBody struct {
	Name                 string `json:"name,omitempty"`                 //Identifying name of the site
	DisplayName          string `json:"displayName,omitempty"`          //Display name of the site
	AgentLevel           string `json:"agentLevel,omitempty"`           //Agent action level - 'block', 'log' or 'off'
	AgentAnonMode        string `json:"agentAnonMode"`                  //Agent IP anonimization mode - 'EU' or ”
	BlockHTTPCode        int    `json:"blockHTTPCode,omitempty"`        //HTTP response code to send when when traffic is being blocked
	BlockDurationSeconds int    `json:"blockDurationSeconds,omitempty"` //Duration to block an IP in seconds
}

CreateSiteBody is the structure required to create a Site.

type CreateSiteRedactionBody added in v0.1.1

type CreateSiteRedactionBody struct {
	Field         string `json:"field,omitempty"` //Field name
	RedactionType int    `json:"redactionType"`   //Type of redaction (0: Request Parameter, 1: Request Header, 2: Response Header)
}

CreateSiteRedactionBody Create redaction Request

type CreateSiteRuleBody added in v0.1.1

type CreateSiteRuleBody struct {
	Type          string      `json:"type,omitempty,omitempty"` //(signal, request, rateLimit)
	GroupOperator string      `json:"groupOperator,omitempty"`  //type: group - Conditions that must be matched when evaluating the request (all, any)
	Enabled       bool        `json:"enabled,omitempty"`
	Reason        string      `json:"reason,omitempty"`     //Description of the rule
	Signal        string      `json:"signal,omitempty"`     //The signal id of the signal being excluded. Null unless type==request
	Expiration    string      `json:"expiration,omitempty"` //Date the rule will automatically be disabled. If rule is always enabled, will return empty string
	Conditions    []Condition `json:"conditions,omitempty"`
	Actions       []Action    `json:"actions,omitempty"`
	RateLimit     *RateLimit  `json:"rateLimit,omitempty"` //Null unless type==rateLimit
}

CreateSiteRuleBody contains the rule for the site

type CustomAlert

type CustomAlert struct {
	ID                   string    `json:"id,omitempty"` //Site-specific unique ID of the alert
	SiteID               string    `json:"siteID,omitempty"`
	TagName              string    `json:"tagName,omitempty"`              //The name of the tag whose occurrences the alert is watching. Must match an existing tag
	LongName             string    `json:"longName,omitempty"`             //A human readable description of the alert. Must be between 3 and 25 characters.
	Interval             int       `json:"interval"`                       //The number of minutes of past traffic to examine. Must be 1, 10 or 60.
	Threshold            int       `json:"threshold"`                      //The number of occurrences of the tag in the interval needed to trigger the alert.
	BlockDurationSeconds int       `json:"blockDurationSeconds,omitempty"` //The number of seconds this alert is active. empty means default value
	Enabled              bool      `json:"enabled"`                        //A flag to toggle this alert.
	Action               string    `json:"action,omitempty"`               //A flag that describes what happens when the alert is triggered. 'info' creates an incident in the dashboard. 'flagged' creates an incident and blocks traffic for 24 hours.
	Type                 string    `json:"type,omitempty"`                 //Type of alert (siteAlert, template, rateLimit, siteMetric)
	SkipNotifications    bool      `json:"skipNotifications"`              //A flag to disable external notifications - slack, webhooks, emails, etc.
	FieldName            string    `json:"fieldName,omitempty"`
	CreatedBy            string    `json:"createdBy,omitempty"` //The email of the user that created the alert
	Created              time.Time `json:"created,omitempty"`   //RFC3339 date time
	Operator             string    `json:"operator,omitempty"`
}

CustomAlert is the body for creating a custom alert.

type CustomAlertBody

type CustomAlertBody struct {
	TagName           string `json:"tagName"`
	LongName          string `json:"longName"`
	Interval          int    `json:"interval"`
	Threshold         int    `json:"threshold"`
	Enabled           bool   `json:"enabled"`
	Action            string `json:"action"`
	SkipNotifications bool   `json:"skipNotifications"`
}

CustomAlertBody is the body for creating a custom alert.

type Detection added in v0.1.1

type Detection struct {
	DetectionUpdateBody
	Created   *time.Time `json:"created,omitempty"`
	CreatedBy string     `json:"created_by,omitempty"`
}

Detection basic struct for Detection

type DetectionUpdateBody added in v0.1.1

type DetectionUpdateBody struct {
	ID      string                     `json:"id,omitempty"`
	Name    string                     `json:"name"` // name of template
	Enabled bool                       `json:"enabled"`
	Fields  []ConfiguredDetectionField `json:"fields"`
}

DetectionUpdateBody body to update a detection

type Entries added in v0.1.1

type Entries struct {
	Additions []string `json:"additions,omitempty"` //List additions
	Deletions []string `json:"deletions,omitempty"` // List deletions
}

Entries List entries

type Event

type Event struct {
	ID                string
	Timestamp         time.Time
	Source            string
	RemoteCountryCode string
	RemoteHostname    string
	UserAgents        []string
	Action            string
	Type              string
	Reasons           map[string]int
	RequestCount      int
	TagCount          int
	Window            int
	Expires           time.Time
	ExpiredBy         string
}

Event is a request event.

type HeaderLink struct {
	ID        string
	Type      string
	Name      string
	LinkName  string
	Link      string
	CreatedBy string
	Created   time.Time
}

HeaderLink contains the data for a response or request header link

type HeaderLinkBody

type HeaderLinkBody struct {
	Type     string `json:"type"`
	Name     string `json:"name"`
	LinkName string `json:"linkName"`
	Link     string `json:"link"`
}

HeaderLinkBody is the body for creating a header link.

type Integration

type Integration struct {
	ID        string
	Name      string
	Type      string
	URL       string
	Events    []string
	Active    bool
	Note      string
	CreatedBy string
	Created   time.Time
}

Integration contains the data for an integration

type IntegrationBody

type IntegrationBody struct {
	URL    string   `json:"url"`
	Type   string   `json:"type"`
	Events []string `json:"events"`
}

IntegrationBody is the body for adding an integration.

type ListIP

type ListIP struct {
	ID        string
	Source    string
	Expires   time.Time `json:"omitempty"`
	Note      string
	CreatedBy string
	Created   time.Time
}

ListIP is a whitelisted or blacklisted IP address.

type ListIPBody

type ListIPBody struct {
	Source  string    `json:"source"`
	Note    string    `json:"note"`
	Expires time.Time `json:"expires,omitempty"`
}

ListIPBody is the body for adding an IP to the whitelist or blacklist.

func (ListIPBody) MarshalJSON

func (b ListIPBody) MarshalJSON() ([]byte, error)

MarshalJSON is a custom JSON marshal method for ListIPBody so that Expires can be formatted as RFC3339

type OverviewSite

type OverviewSite struct {
	Name             string
	DisplayName      string
	TotalCount       int
	BlockedCount     int
	FlaggedCount     int
	AttackCount      int
	FlaggedIPCount   int
	TopAttackTypes   []topAttackType
	TopAttackSources []topAttackSource
}

OverviewSite is a site in the overview report.

type Param

type Param struct {
	ID        string
	Name      string
	Type      string
	Note      string
	CreatedBy string
	Created   time.Time
}

Param is a whitelisted parameter.

type Path

type Path struct {
	ID        string
	Path      string
	Note      string
	CreatedBy string
	Created   time.Time
}

Path is a whitelisted path.

type PrimaryAgentKey added in v0.1.2

type PrimaryAgentKey struct {
	Name      string
	AccessKey string
	SecretKey string
}

PrimaryAgentKey contains the secret and access keys used by the agents

type RateLimit added in v0.1.1

type RateLimit struct {
	Threshold int `json:"threshold"`
	Interval  int `json:"interval"` // interval in minutes, 1 or 10
	Duration  int `json:"duration"` // duration in seconds
}

RateLimit holds all the data that is specific to rate limit rules

type Redaction

type Redaction struct {
	ID            string
	Field         string
	RedactionType int
	CreatedBy     string
	Created       time.Time
}

Redaction contains the data for a privacy redaction

type RedactionBody

type RedactionBody struct {
	Field         string `json:"field"`
	RedactionType int    `json:"redactionType"`
}

RedactionBody is the body for adding a redaction. Type of redaction (0: Request Parameter, 1: Request Header, 2: Response Header)

type Request

type Request struct {
	ID                string
	ServerHostname    string
	RemoteIP          string
	RemoteHostname    string
	RemoteCountryCode string
	UserAgent         string
	Timestamp         time.Time
	Method            string
	ServerName        string
	Protocol          string
	Path              string
	URI               string
	ResponseCode      int
	ResponseSize      int
	ResponseMillis    int
	AgentResponseCode int
	Tags              []RequestTag
}

Request contains the data for a request

type RequestTag

type RequestTag struct {
	Type     string
	Location string
	Value    string
	Detector string
}

RequestTag is a tag in a request

type ResponseCorpRuleBody added in v0.1.1

type ResponseCorpRuleBody struct {
	CreateCorpRuleBody
	ID        string    `json:"id"`
	CreatedBy string    `json:"createdby"` //Email address of the user that created the item
	Created   time.Time `json:"created"`   //Created RFC3339 date time
	Updated   time.Time `json:"updated"`   //Last updated RFC3339 date time
}

ResponseCorpRuleBody contains the response from creating the rule

type ResponseCorpRuleBodyList added in v0.1.1

type ResponseCorpRuleBodyList struct {
	TotalCount int                    `json:"totalCount"`
	Data       []ResponseCorpRuleBody `json:"data"` //ResponseCorpRuleBody
}

ResponseCorpRuleBodyList list

type ResponseListBody added in v0.1.1

type ResponseListBody struct {
	CreateListBody
	ID        string    `json:"id"`        //internal ID
	CreatedBy string    `json:"createdby"` //Email address of the user that created the item
	Created   time.Time `json:"created"`   //Created RFC3339 date time
	Updated   time.Time `json:"updated"`   //Last updated RFC3339 date time
}

ResponseListBody contains the response from creating the list

type ResponseListBodyList added in v0.1.1

type ResponseListBodyList struct {
	// TotalCount int                `json:"totalCount"`
	Data []ResponseListBody `json:"data"` //Site List data
}

ResponseListBodyList contains the returned list

type ResponseSignalTagBody added in v0.1.1

type ResponseSignalTagBody struct {
	CreateSignalTagBody
	TagName       string    `json:"tagName,omitempty"`  //The identifier for the signal tag
	LongName      string    `json:"longName,omitempty"` //The display name of the signal tag - deprecated
	Configurable  bool      `json:"configurable,omitempty"`
	Informational bool      `json:"informational,omitempty"`
	NeedsResponse bool      `json:"needsResponse,omitempty"`
	CreatedBy     string    `json:"createdBy,omitempty"` //Email address of the user that created the resource
	Created       time.Time `json:"created,omitempty"`   //Created RFC3339 date time
}

ResponseSignalTagBody response singnal tag

type ResponseSignalTagBodyList added in v0.1.1

type ResponseSignalTagBodyList struct {
	Data []ResponseSignalTagBody `json:"data"` //ResponseSignalTagBody
}

ResponseSignalTagBodyList response list

type ResponseSiteRedactionBody added in v0.1.1

type ResponseSiteRedactionBody struct {
	CreateSiteRedactionBody
	ID        string    `json:"id"`        //internal ID
	CreatedBy string    `json:"createdby"` //Email address of the user that created the item
	Created   time.Time `json:"created"`   //Created RFC3339 date time
	Updated   time.Time `json:"updated"`   //Last updated RFC3339 date time
}

ResponseSiteRedactionBody redaction response

type ResponseSiteRedactionBodyList added in v0.1.1

type ResponseSiteRedactionBodyList struct {
	// TotalCount int                    `json:"totalCount"`
	Data []ResponseSiteRedactionBody `json:"data"` //Site Redaction data
}

ResponseSiteRedactionBodyList redaction response list

type ResponseSiteRuleBody added in v0.1.1

type ResponseSiteRuleBody struct {
	CreateSiteRuleBody
	ID        string    `json:"id"`        //internal ID
	CreatedBy string    `json:"createdby"` //Email address of the user that created the item
	Created   time.Time `json:"created"`   //Created RFC3339 date time
	Updated   time.Time `json:"updated"`   //Last updated RFC3339 date time
}

ResponseSiteRuleBody contains the response from creating the rule

type ResponseSiteRuleBodyList added in v0.1.1

type ResponseSiteRuleBodyList struct {
	TotalCount int                    `json:"totalCount"`
	Data       []ResponseSiteRuleBody `json:"data"`
}

ResponseSiteRuleBodyList contains the returned rules

type Role

type Role string

Role is a corp or site role

type Site

type Site struct {
	Name                 string
	DisplayName          string
	AgentLevel           string
	BlockHTTPCode        int
	BlockDurationSeconds int
	Created              time.Time
	Whitelist            map[string]string
	Blacklist            map[string]string
	Events               map[string]string
	Requests             map[string]string
	Redactions           map[string]string
	SuspiciousIPs        map[string]string
	Monitors             map[string]string
	Pathwhitelist        map[string]string
	Paramwhitelist       map[string]string
	Integrations         map[string]string
	HeaderLinks          map[string]string
	Agents               map[string]string
	Alerts               map[string]string
	AnalyticsEvents      map[string]string
	TopAttacks           map[string]string
	Members              map[string]string
	AgentAnonMode        string
}

Site contains details for a site.

type SiteMember

type SiteMember struct {
	User SiteMemberUser
	Role Role
}

SiteMember contains the data for a site member

type SiteMemberBody

type SiteMemberBody struct {
	Role Role `json:"role"`
}

SiteMemberBody is the body for inviting a user to a site.

type SiteMemberResponse

type SiteMemberResponse struct {
	Email  string
	Role   Role
	Status string
}

SiteMemberResponse is the response for inviting a user to a site.

type SiteMemberUser

type SiteMemberUser struct {
	Name   string
	Email  string
	Status string
}

SiteMemberUser is the embedded user object in the site members response.

type SiteMembership

type SiteMembership struct {
	Site site `json:"site"`
	Role Role `json:"role"`
}

SiteMembership contains the data needed for inviting a member to a site.

func NewSiteMembership

func NewSiteMembership(name string, role Role) SiteMembership

NewSiteMembership returns a new site membership object for the given site name and role.

type SiteMonitor

type SiteMonitor struct {
	ID        string
	URL       string
	Share     bool
	CreatedBy string
	Created   time.Time
}

SiteMonitor is a monitor URL for a site.

type SiteMonitorResp added in v0.1.1

type SiteMonitorResp struct {
	Data []SiteMonitor
}

SiteMonitorResp is the response from GET site monitor

type SiteTemplate added in v0.1.1

type SiteTemplate struct {
	Name       string      `json:"name,omitempty"`
	Detections []Detection `json:"detections"`
	Alerts     []Alert     `json:"alerts"`
}

SiteTemplate basic struct for a site template

type SiteTemplateRuleBody added in v0.1.1

type SiteTemplateRuleBody struct {
	DetectionAdds    []Detection `json:"detectionAdds"`
	DetectionUpdates []Detection `json:"detectionUpdates"`
	DetectionDeletes []Detection `json:"detectionDeletes"`

	AlertAdds    []Alert `json:"alertAdds"`
	AlertUpdates []Alert `json:"alertUpdates"`
	AlertDeletes []Alert `json:"alertDeletes"`
}

SiteTemplateRuleBody needed to update a site template rule

type SuspiciousIP

type SuspiciousIP struct {
	Source            string
	Percent           int
	RemoteCountryCode string    `json:"remoteCountryCode"`
	RemoteHostname    string    `json:"remoteHostname"`
	TagName           string    `json:"tagName"`
	ShortName         string    `json:"shortName"`
	IntervalStart     time.Time `json:"interval_start"`
	Timestamp         time.Time
}

SuspiciousIP is a suspicious IP.

type Timeseries

type Timeseries struct {
	Type         string
	From         int
	Until        int
	Inc          int
	Data         []int
	SummaryCount int
	TotalPoints  int
}

Timeseries contains timeseries request info.

type TopAttack

type TopAttack struct {
	Value string
	Label string
	Count int
}

TopAttack is a top attack.

type UpdateCorpBody

type UpdateCorpBody struct {
	DisplayName            string `json:"displayName,omitempty"`
	SmallIconURI           string `json:"smallIconURI,omitempty"`
	SessionMaxAgeDashboard int    `json:"sessionMaxAgeDashboard,omitempty"`
}

UpdateCorpBody is the body for the UpdateCorp method.

type UpdateIntegrationBody

type UpdateIntegrationBody struct {
	URL    string   `json:"url,omitempty"`
	Events []string `json:"events,omitempty"`
}

UpdateIntegrationBody is the body for updating an integration.

type UpdateListBody added in v0.1.1

type UpdateListBody struct {
	Description string  `json:"description,omitempty"` //Optional list description
	Entries     Entries `json:"entries,omitempty"`     //List entries
}

UpdateListBody update list

type UpdateRedactionBody

type UpdateRedactionBody struct {
	Field         string `json:"field,omitempty"`
	RedactionType int    `json:"redactionType,omitempty"`
}

UpdateRedactionBody is the body for updating an integration.

type UpdateSignalTagBody added in v0.1.1

type UpdateSignalTagBody struct {
	Description string `json:"description,omitempty"` //Optional signal tag description
}

UpdateSignalTagBody update a signal tag

type UpdateSiteBody

type UpdateSiteBody struct {
	DisplayName          string `json:"displayName,omitempty"`
	AgentLevel           string `json:"agentLevel,omitempty"`
	BlockDurationSeconds int    `json:"blockDurationSeconds,omitempty"`
	BlockHTTPCode        int    `json:"blockHTTPCode,omitempty"`
	AgentAnonMode        string `json:"agentAnonMode"`
}

UpdateSiteBody is the body for the update site method.

type UpdateSiteMonitorBody added in v0.1.1

type UpdateSiteMonitorBody struct {
	ID    string `json:"id"`
	Share bool   `json:"share"`
}

UpdateSiteMonitorBody is the body to update a site monitor

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL