api

package
v1.0.0-beta2 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2020 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventsAPI

type EventsAPI interface {
	SendEvent(event model.Event) error
}

EventsAPI the API to manipulate Events

type ForeignSourcesAPI

type ForeignSourcesAPI interface {
	GetForeignSourceDef(foreignSource string) (*model.ForeignSourceDef, error)
	SetForeignSourceDef(fs model.ForeignSourceDef) error
	SetScanInterval(foreignSource string, scanInterval string) error
	DeleteForeignSourceDef(foreignSource string) error

	IsForeignSourceValid(fsDef model.ForeignSourceDef) error
	IsPolicyValid(policy model.Policy) error
	IsDetectorValid(detector model.Detector) error

	GetDetectorConfig(detectorID string) (*model.Plugin, error)
	GetDetector(foreignSource string, detectorID string) (*model.Detector, error)
	SetDetector(foreignSource string, detector model.Detector) error
	DeleteDetector(foreignSource string, detectorName string) error

	GetPolicyConfig(policyID string) (*model.Plugin, error)
	GetPolicy(foreignSource string, policyID string) (*model.Policy, error)
	SetPolicy(foreignSource string, policy model.Policy) error
	DeletePolicy(foreignSource string, policyName string) error
}

ForeignSourcesAPI the API to manipulate Foreign Source definitions

type MonitoringLocationsAPI

type MonitoringLocationsAPI interface {
	GetLocations() (*model.MonitoringLocationList, error)
	LocationExists(location string) (bool, error)
	GetLocation(location string) (*model.MonitoringLocation, error)
	SetLocation(location model.MonitoringLocation) error
}

MonitoringLocationsAPI the API to manipulate Monitoring Locations

type ProfilesAPI

type ProfilesAPI interface {
	GetProfilesConfig() (*model.ProfilesConfig, error)
	SetProfile(profile model.Profile) error
	SetDefault(profileName string) error
	DeleteProfile(profileName string) error
}

ProfilesAPI the API to manipulate configuration profiles

type ProvisioningUtilsAPI

type ProvisioningUtilsAPI interface {
	GetRequisitionNames() (*model.RequisitionsList, error)
	RequisitionExists(foreignSource string) bool

	GetAvailableAssets() (*model.ElementList, error)
	GetAvailableDetectors() (*model.PluginList, error)
	GetAvailablePolicies() (*model.PluginList, error)
}

ProvisioningUtilsAPI The API for common Provisioning operations

type RequisitionsAPI

type RequisitionsAPI interface {
	GetRequisitionsStats() (*model.RequisitionsStats, error)

	CreateRequisition(foreignSource string) error
	GetRequisition(foreignSource string) (*model.Requisition, error)
	SetRequisition(req model.Requisition) error
	DeleteRequisition(foreignSource string) error
	ImportRequisition(foreignSource string, rescanExisting string) error

	GetNode(foreignSource string, foreignID string) (*model.RequisitionNode, error)
	SetNode(foreignSource string, node model.RequisitionNode) error
	DeleteNode(foreignSource string, foreignID string) error

	GetInterface(foreignSource string, foreignID string, ipAddress string) (*model.RequisitionInterface, error)
	SetInterface(foreignSource string, foreignID string, intf model.RequisitionInterface) error
	DeleteInterface(foreignSource string, foreignID string, ipAddress string) error

	SetService(foreignSource string, foreignID string, ipAddress string, svc model.RequisitionMonitoredService) error
	DeleteService(foreignSource string, foreignID string, ipAddress string, serviceName string) error

	SetCategory(foreignSource string, foreignID string, category model.RequisitionCategory) error
	DeleteCategory(foreignSource string, foreignID string, categoryName string) error

	SetAsset(foreignSource string, foreignID string, asset model.RequisitionAsset) error
	DeleteAsset(foreignSource string, foreignID string, assetName string) error
}

RequisitionsAPI the API to manipulate Requisitions

type ResourcesAPI

type ResourcesAPI interface {
	GetResourceForNode(nodeCriteria string) (*model.Resource, error)
	GetResources() (*model.ResourceList, error)
	GetResource(resourceID string) (*model.Resource, error)
	DeleteResource(resourceID string) error
}

ResourcesAPI the API to manipulate Resources

type RestAPI

type RestAPI interface {
	Get(path string) ([]byte, error)
	Post(path string, jsonBytes []byte) error
	PostRaw(path string, jsonBytes []byte) (*http.Response, error)
	Delete(path string) error
	Put(path string, dataBytes []byte, contentType string) error
}

RestAPI the API for ReST Operations

type SnmpAPI

type SnmpAPI interface {
	GetConfig(ipAddress string, location string) (*model.SnmpInfo, error)
	SetConfig(ipAddress string, config model.SnmpInfo) error
}

SnmpAPI the API to manipulate SNMP Configuration

Jump to

Keyboard shortcuts

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