Documentation ¶
Index ¶
Constants ¶
const ( AssetTypeIp AssetType = "IP" AssetTypeDomainName = "DomainName" AssetTypeHostname = "Hostname" AssetTypeAwsAccount = "AWSAccount" AssetTypeIpRange = "IPRange" AssetTypeDockerImage = "DockerImage" AssetTypeWebAddress = "WebAddress" AssetTypeGitRepository = "GitRepository" )
const AssetsEntityName = "assets"
AssetsEntityName defines the key for the assets entity used by an EventStreamClient to determine the topic where the assets are send.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Annotation ¶
Annotation represents a Annotation model.
type AssetPayload ¶
type AssetPayload struct { Id string Team *Team Alias string Rolfp string Scannable bool AssetType *AssetType Identifier string Annotations []*Annotation }
AssetPayload represents a AssetPayload model.
type EventStreamClient ¶
EventStreamClient represent a client of an event stream system, like Kafka or AWS FIFO SQS queues.
type LevelLogger ¶ added in v1.2.0
LevelLogger implements the logger used by the Vulcan async API using an underlaying go-kit logger.
func (LevelLogger) Debugf ¶ added in v1.2.0
func (l LevelLogger) Debugf(s string, params ...any)
Debugf logs a debug message.
func (LevelLogger) Errorf ¶ added in v1.2.0
func (l LevelLogger) Errorf(s string, params ...any)
Errorf logs an error message.
func (LevelLogger) Infof ¶ added in v1.2.0
func (l LevelLogger) Infof(s string, params ...any)
Infof logs an information message.
type NullVulcan ¶ added in v1.2.0
type NullVulcan struct { }
NullVulcan implements an Async Vulcan API interface that does not send the events to any EventStreamClient. It's intended to be used when the async API is disabled but other components still need to fullfill a dependency with the Vulcan Async Server.
func (*NullVulcan) DeleteAsset ¶ added in v1.2.0
func (v *NullVulcan) DeleteAsset(asset AssetPayload) error
DeleteAsset acepts an event indicating that an asset has been deleted and just ignores it.
func (*NullVulcan) PushAsset ¶ added in v1.2.0
func (v *NullVulcan) PushAsset(asset AssetPayload) error
PushAsset acepts an event indicating that an asset has been modified or created and just ignores it.
type Vulcan ¶
type Vulcan struct {
// contains filtered or unexported fields
}
Vulcan implements the asynchorus API of Vulcan.
func NewVulcan ¶
func NewVulcan(client EventStreamClient, log Logger) *Vulcan
NewVulcan returns a Vulcan async server that uses the given EventStreamClient and Logger.
func (*Vulcan) DeleteAsset ¶ added in v1.2.0
func (v *Vulcan) DeleteAsset(asset AssetPayload) error
DeleteAsset publishes an event to the underlying EventStreamClient indicating that an asset has been deleted.
func (*Vulcan) PushAsset ¶
func (v *Vulcan) PushAsset(asset AssetPayload) error
PushAsset publishes the state of an asset in the current point of time to the underlying EventStreamClient.