rpc

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2026 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Scans_Create_FullMethodName  = "/scans.Scans/Create"
	Scans_Read_FullMethodName    = "/scans.Scans/Read"
	Scans_List_FullMethodName    = "/scans.Scans/List"
	Scans_Upsert_FullMethodName  = "/scans.Scans/Upsert"
	Scans_Delete_FullMethodName  = "/scans.Scans/Delete"
	Scans_Cleanup_FullMethodName = "/scans.Scans/Cleanup"
	Scans_Run_FullMethodName     = "/scans.Scans/Run"
	Scans_Jobs_FullMethodName    = "/scans.Scans/Jobs"
	Scans_Attach_FullMethodName  = "/scans.Scans/Attach"
	Scans_Stop_FullMethodName    = "/scans.Scans/Stop"
	Scans_Resume_FullMethodName  = "/scans.Scans/Resume"
)

Variables

View Source
var File_scan_pb_rpc_scans_proto protoreflect.FileDescriptor
View Source
var Scans_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "scans.Scans",
	HandlerType: (*ScansServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Create",
			Handler:    _Scans_Create_Handler,
		},
		{
			MethodName: "Read",
			Handler:    _Scans_Read_Handler,
		},
		{
			MethodName: "List",
			Handler:    _Scans_List_Handler,
		},
		{
			MethodName: "Upsert",
			Handler:    _Scans_Upsert_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _Scans_Delete_Handler,
		},
		{
			MethodName: "Cleanup",
			Handler:    _Scans_Cleanup_Handler,
		},
		{
			MethodName: "Jobs",
			Handler:    _Scans_Jobs_Handler,
		},
		{
			MethodName: "Stop",
			Handler:    _Scans_Stop_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Run",
			Handler:       _Scans_Run_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "Attach",
			Handler:       _Scans_Attach_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "Resume",
			Handler:       _Scans_Resume_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "scan/pb/rpc/scans.proto",
}

Scans_ServiceDesc is the grpc.ServiceDesc for Scans service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterScansServer

func RegisterScansServer(s grpc.ServiceRegistrar, srv ScansServer)

Types

type AttachRequest

type AttachRequest struct {
	JobId string `protobuf:"bytes,1,opt,name=JobId,proto3" json:"JobId,omitempty"`
	// contains filtered or unexported fields
}

func (*AttachRequest) Descriptor deprecated

func (*AttachRequest) Descriptor() ([]byte, []int)

Deprecated: Use AttachRequest.ProtoReflect.Descriptor instead.

func (*AttachRequest) GetJobId

func (x *AttachRequest) GetJobId() string

func (*AttachRequest) ProtoMessage

func (*AttachRequest) ProtoMessage()

func (*AttachRequest) ProtoReflect

func (x *AttachRequest) ProtoReflect() protoreflect.Message

func (*AttachRequest) Reset

func (x *AttachRequest) Reset()

func (*AttachRequest) String

func (x *AttachRequest) String() string

type CleanupScanRequest added in v0.2.0

type CleanupScanRequest struct {

	// DryRun computes and returns the plan without writing anything.
	DryRun bool `protobuf:"varint,1,opt,name=DryRun,proto3" json:"DryRun,omitempty"`
	// Prune additionally hard-deletes the byte-identical (same RawXML) subset instead of
	// tombstoning it — safe because those rows carry no unique information.
	Prune bool `protobuf:"varint,2,opt,name=Prune,proto3" json:"Prune,omitempty"`
	// contains filtered or unexported fields
}

CleanupScanRequest drives a lifecycle cleanup pass.

func (*CleanupScanRequest) Descriptor deprecated added in v0.2.0

func (*CleanupScanRequest) Descriptor() ([]byte, []int)

Deprecated: Use CleanupScanRequest.ProtoReflect.Descriptor instead.

func (*CleanupScanRequest) GetDryRun added in v0.2.0

func (x *CleanupScanRequest) GetDryRun() bool

func (*CleanupScanRequest) GetPrune added in v0.2.0

func (x *CleanupScanRequest) GetPrune() bool

func (*CleanupScanRequest) ProtoMessage added in v0.2.0

func (*CleanupScanRequest) ProtoMessage()

func (*CleanupScanRequest) ProtoReflect added in v0.2.0

func (x *CleanupScanRequest) ProtoReflect() protoreflect.Message

func (*CleanupScanRequest) Reset added in v0.2.0

func (x *CleanupScanRequest) Reset()

func (*CleanupScanRequest) String added in v0.2.0

func (x *CleanupScanRequest) String() string

type CleanupScanResponse added in v0.2.0

type CleanupScanResponse struct {

	// Tombstoned is the number of runs marked SupersededBy a head.
	Tombstoned int32 `protobuf:"varint,1,opt,name=Tombstoned,proto3" json:"Tombstoned,omitempty"`
	// Pruned is the number of byte-identical runs hard-deleted (only when Prune).
	Pruned int32 `protobuf:"varint,2,opt,name=Pruned,proto3" json:"Pruned,omitempty"`
	// Heads are the surviving series heads, each with its recomputed FormerRuns.
	Heads []*pb.Run `protobuf:"bytes,3,rep,name=Heads,proto3" json:"Heads,omitempty"`
	// contains filtered or unexported fields
}

CleanupScanResponse reports what a cleanup pass did (or would do, when DryRun).

func (*CleanupScanResponse) Descriptor deprecated added in v0.2.0

func (*CleanupScanResponse) Descriptor() ([]byte, []int)

Deprecated: Use CleanupScanResponse.ProtoReflect.Descriptor instead.

func (*CleanupScanResponse) GetHeads added in v0.2.0

func (x *CleanupScanResponse) GetHeads() []*pb.Run

func (*CleanupScanResponse) GetPruned added in v0.2.0

func (x *CleanupScanResponse) GetPruned() int32

func (*CleanupScanResponse) GetTombstoned added in v0.2.0

func (x *CleanupScanResponse) GetTombstoned() int32

func (*CleanupScanResponse) ProtoMessage added in v0.2.0

func (*CleanupScanResponse) ProtoMessage()

func (*CleanupScanResponse) ProtoReflect added in v0.2.0

func (x *CleanupScanResponse) ProtoReflect() protoreflect.Message

func (*CleanupScanResponse) Reset added in v0.2.0

func (x *CleanupScanResponse) Reset()

func (*CleanupScanResponse) String added in v0.2.0

func (x *CleanupScanResponse) String() string

type CreateScanRequest

type CreateScanRequest struct {
	Filters *RunFilters `protobuf:"bytes,1,opt,name=Filters,proto3" json:"Filters,omitempty"`
	Scans   []*pb.Run   `protobuf:"bytes,2,rep,name=Scans,proto3" json:"Scans,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateScanRequest) Descriptor deprecated

func (*CreateScanRequest) Descriptor() ([]byte, []int)

Deprecated: Use CreateScanRequest.ProtoReflect.Descriptor instead.

func (*CreateScanRequest) GetFilters

func (x *CreateScanRequest) GetFilters() *RunFilters

func (*CreateScanRequest) GetScans

func (x *CreateScanRequest) GetScans() []*pb.Run

func (*CreateScanRequest) ProtoMessage

func (*CreateScanRequest) ProtoMessage()

func (*CreateScanRequest) ProtoReflect

func (x *CreateScanRequest) ProtoReflect() protoreflect.Message

func (*CreateScanRequest) Reset

func (x *CreateScanRequest) Reset()

func (*CreateScanRequest) String

func (x *CreateScanRequest) String() string

type CreateScanResponse

type CreateScanResponse struct {
	Scans []*pb.Run `protobuf:"bytes,1,rep,name=Scans,proto3" json:"Scans,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateScanResponse) Descriptor deprecated

func (*CreateScanResponse) Descriptor() ([]byte, []int)

Deprecated: Use CreateScanResponse.ProtoReflect.Descriptor instead.

func (*CreateScanResponse) GetScans

func (x *CreateScanResponse) GetScans() []*pb.Run

func (*CreateScanResponse) ProtoMessage

func (*CreateScanResponse) ProtoMessage()

func (*CreateScanResponse) ProtoReflect

func (x *CreateScanResponse) ProtoReflect() protoreflect.Message

func (*CreateScanResponse) Reset

func (x *CreateScanResponse) Reset()

func (*CreateScanResponse) String

func (x *CreateScanResponse) String() string

type DeleteScanRequest

type DeleteScanRequest struct {
	Scans []*pb.Run `protobuf:"bytes,1,rep,name=Scans,proto3" json:"Scans,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteScanRequest) Descriptor deprecated

func (*DeleteScanRequest) Descriptor() ([]byte, []int)

Deprecated: Use DeleteScanRequest.ProtoReflect.Descriptor instead.

func (*DeleteScanRequest) GetScans

func (x *DeleteScanRequest) GetScans() []*pb.Run

func (*DeleteScanRequest) ProtoMessage

func (*DeleteScanRequest) ProtoMessage()

func (*DeleteScanRequest) ProtoReflect

func (x *DeleteScanRequest) ProtoReflect() protoreflect.Message

func (*DeleteScanRequest) Reset

func (x *DeleteScanRequest) Reset()

func (*DeleteScanRequest) String

func (x *DeleteScanRequest) String() string

type DeleteScanResponse

type DeleteScanResponse struct {
	Scans []*pb.Run `protobuf:"bytes,1,rep,name=Scans,proto3" json:"Scans,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteScanResponse) Descriptor deprecated

func (*DeleteScanResponse) Descriptor() ([]byte, []int)

Deprecated: Use DeleteScanResponse.ProtoReflect.Descriptor instead.

func (*DeleteScanResponse) GetScans

func (x *DeleteScanResponse) GetScans() []*pb.Run

func (*DeleteScanResponse) ProtoMessage

func (*DeleteScanResponse) ProtoMessage()

func (*DeleteScanResponse) ProtoReflect

func (x *DeleteScanResponse) ProtoReflect() protoreflect.Message

func (*DeleteScanResponse) Reset

func (x *DeleteScanResponse) Reset()

func (*DeleteScanResponse) String

func (x *DeleteScanResponse) String() string

type JobsRequest

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

func (*JobsRequest) Descriptor deprecated

func (*JobsRequest) Descriptor() ([]byte, []int)

Deprecated: Use JobsRequest.ProtoReflect.Descriptor instead.

func (*JobsRequest) ProtoMessage

func (*JobsRequest) ProtoMessage()

func (*JobsRequest) ProtoReflect

func (x *JobsRequest) ProtoReflect() protoreflect.Message

func (*JobsRequest) Reset

func (x *JobsRequest) Reset()

func (*JobsRequest) String

func (x *JobsRequest) String() string

type JobsResponse

type JobsResponse struct {
	Jobs []*ScanJob `protobuf:"bytes,1,rep,name=Jobs,proto3" json:"Jobs,omitempty"`
	// contains filtered or unexported fields
}

func (*JobsResponse) Descriptor deprecated

func (*JobsResponse) Descriptor() ([]byte, []int)

Deprecated: Use JobsResponse.ProtoReflect.Descriptor instead.

func (*JobsResponse) GetJobs

func (x *JobsResponse) GetJobs() []*ScanJob

func (*JobsResponse) ProtoMessage

func (*JobsResponse) ProtoMessage()

func (*JobsResponse) ProtoReflect

func (x *JobsResponse) ProtoReflect() protoreflect.Message

func (*JobsResponse) Reset

func (x *JobsResponse) Reset()

func (*JobsResponse) String

func (x *JobsResponse) String() string

type ReadScanManyRequest

type ReadScanManyRequest struct {
	Filters *RunFilters `protobuf:"bytes,1,opt,name=Filters,proto3" json:"Filters,omitempty"`
	Scan    *pb.Run     `protobuf:"bytes,2,opt,name=Scan,proto3" json:"Scan,omitempty"`
	// contains filtered or unexported fields
}

func (*ReadScanManyRequest) Descriptor deprecated

func (*ReadScanManyRequest) Descriptor() ([]byte, []int)

Deprecated: Use ReadScanManyRequest.ProtoReflect.Descriptor instead.

func (*ReadScanManyRequest) GetFilters

func (x *ReadScanManyRequest) GetFilters() *RunFilters

func (*ReadScanManyRequest) GetScan

func (x *ReadScanManyRequest) GetScan() *pb.Run

func (*ReadScanManyRequest) ProtoMessage

func (*ReadScanManyRequest) ProtoMessage()

func (*ReadScanManyRequest) ProtoReflect

func (x *ReadScanManyRequest) ProtoReflect() protoreflect.Message

func (*ReadScanManyRequest) Reset

func (x *ReadScanManyRequest) Reset()

func (*ReadScanManyRequest) String

func (x *ReadScanManyRequest) String() string

type ReadScanManyResponse

type ReadScanManyResponse struct {
	Scans []*pb.Run `protobuf:"bytes,1,rep,name=Scans,proto3" json:"Scans,omitempty"`
	// contains filtered or unexported fields
}

func (*ReadScanManyResponse) Descriptor deprecated

func (*ReadScanManyResponse) Descriptor() ([]byte, []int)

Deprecated: Use ReadScanManyResponse.ProtoReflect.Descriptor instead.

func (*ReadScanManyResponse) GetScans

func (x *ReadScanManyResponse) GetScans() []*pb.Run

func (*ReadScanManyResponse) ProtoMessage

func (*ReadScanManyResponse) ProtoMessage()

func (*ReadScanManyResponse) ProtoReflect

func (x *ReadScanManyResponse) ProtoReflect() protoreflect.Message

func (*ReadScanManyResponse) Reset

func (x *ReadScanManyResponse) Reset()

func (*ReadScanManyResponse) String

func (x *ReadScanManyResponse) String() string

type ReadScanRequest

type ReadScanRequest struct {
	Filters *RunFilters `protobuf:"bytes,1,opt,name=Filters,proto3" json:"Filters,omitempty"`
	Scan    *pb.Run     `protobuf:"bytes,2,opt,name=Scan,proto3" json:"Scan,omitempty"`
	// contains filtered or unexported fields
}

func (*ReadScanRequest) Descriptor deprecated

func (*ReadScanRequest) Descriptor() ([]byte, []int)

Deprecated: Use ReadScanRequest.ProtoReflect.Descriptor instead.

func (*ReadScanRequest) GetFilters

func (x *ReadScanRequest) GetFilters() *RunFilters

func (*ReadScanRequest) GetScan

func (x *ReadScanRequest) GetScan() *pb.Run

func (*ReadScanRequest) ProtoMessage

func (*ReadScanRequest) ProtoMessage()

func (*ReadScanRequest) ProtoReflect

func (x *ReadScanRequest) ProtoReflect() protoreflect.Message

func (*ReadScanRequest) Reset

func (x *ReadScanRequest) Reset()

func (*ReadScanRequest) String

func (x *ReadScanRequest) String() string

type ReadScanResponse

type ReadScanResponse struct {
	Scans []*pb.Run `protobuf:"bytes,1,rep,name=Scans,proto3" json:"Scans,omitempty"`
	// contains filtered or unexported fields
}

func (*ReadScanResponse) Descriptor deprecated

func (*ReadScanResponse) Descriptor() ([]byte, []int)

Deprecated: Use ReadScanResponse.ProtoReflect.Descriptor instead.

func (*ReadScanResponse) GetScans

func (x *ReadScanResponse) GetScans() []*pb.Run

func (*ReadScanResponse) ProtoMessage

func (*ReadScanResponse) ProtoMessage()

func (*ReadScanResponse) ProtoReflect

func (x *ReadScanResponse) ProtoReflect() protoreflect.Message

func (*ReadScanResponse) Reset

func (x *ReadScanResponse) Reset()

func (*ReadScanResponse) String

func (x *ReadScanResponse) String() string

type ResumeScanRequest added in v0.3.0

type ResumeScanRequest struct {

	// Id is the interrupted run to resume. The server re-scans only its uncompleted targets.
	Id string `protobuf:"bytes,1,opt,name=Id,proto3" json:"Id,omitempty"`
	// Background detaches the resumed job, like RunScanRequest.Background.
	Background bool `protobuf:"varint,2,opt,name=Background,proto3" json:"Background,omitempty"`
	// contains filtered or unexported fields
}

ResumeScanRequest asks the server to continue an interrupted run by its Id.

func (*ResumeScanRequest) Descriptor deprecated added in v0.3.0

func (*ResumeScanRequest) Descriptor() ([]byte, []int)

Deprecated: Use ResumeScanRequest.ProtoReflect.Descriptor instead.

func (*ResumeScanRequest) GetBackground added in v0.3.0

func (x *ResumeScanRequest) GetBackground() bool

func (*ResumeScanRequest) GetId added in v0.3.0

func (x *ResumeScanRequest) GetId() string

func (*ResumeScanRequest) ProtoMessage added in v0.3.0

func (*ResumeScanRequest) ProtoMessage()

func (*ResumeScanRequest) ProtoReflect added in v0.3.0

func (x *ResumeScanRequest) ProtoReflect() protoreflect.Message

func (*ResumeScanRequest) Reset added in v0.3.0

func (x *ResumeScanRequest) Reset()

func (*ResumeScanRequest) String added in v0.3.0

func (x *ResumeScanRequest) String() string

type RunFilters

type RunFilters struct {
	MaxResults int64 `protobuf:"varint,1,opt,name=MaxResults,proto3" json:"MaxResults,omitempty"`
	Hosts      bool  `protobuf:"varint,2,opt,name=Hosts,proto3" json:"Hosts,omitempty"`
	Ports      bool  `protobuf:"varint,3,opt,name=Ports,proto3" json:"Ports,omitempty"`
	// Source: if set, scope the read to only the runs of this tool (matched against the
	// run's Scanner, which is the producing tool). Empty means all runs.
	Source string `protobuf:"bytes,4,opt,name=Source,proto3" json:"Source,omitempty"`
	// IncludeSuperseded: by default a read returns only surviving series heads (tombstoned runs are
	// hidden — see Run.SupersededBy). Set true to return every run, superseded ones included (used
	// by `scan list --all`, and by id-addressed reads like `show`/`rm`/`diff` that must reach a
	// tombstoned run).
	IncludeSuperseded bool `protobuf:"varint,5,opt,name=IncludeSuperseded,proto3" json:"IncludeSuperseded,omitempty"`
	// SupersededBy: if set, return exactly the runs tombstoned under this head Id — the server-side
	// query behind `scan history <head>`, so a series is fetched directly instead of read-all-and-filter.
	SupersededBy string `protobuf:"bytes,6,opt,name=SupersededBy,proto3" json:"SupersededBy,omitempty"`
	// contains filtered or unexported fields
}

func (*RunFilters) Descriptor deprecated

func (*RunFilters) Descriptor() ([]byte, []int)

Deprecated: Use RunFilters.ProtoReflect.Descriptor instead.

func (*RunFilters) GetHosts

func (x *RunFilters) GetHosts() bool

func (*RunFilters) GetIncludeSuperseded added in v0.2.0

func (x *RunFilters) GetIncludeSuperseded() bool

func (*RunFilters) GetMaxResults

func (x *RunFilters) GetMaxResults() int64

func (*RunFilters) GetPorts

func (x *RunFilters) GetPorts() bool

func (*RunFilters) GetSource

func (x *RunFilters) GetSource() string

func (*RunFilters) GetSupersededBy added in v0.2.0

func (x *RunFilters) GetSupersededBy() string

func (*RunFilters) ProtoMessage

func (*RunFilters) ProtoMessage()

func (*RunFilters) ProtoReflect

func (x *RunFilters) ProtoReflect() protoreflect.Message

func (*RunFilters) Reset

func (x *RunFilters) Reset()

func (*RunFilters) String

func (x *RunFilters) String() string

type RunScanRequest

type RunScanRequest struct {

	// Scanner is the tool to drive (e.g. "nmap"); it names a server-side Scanner adapter.
	Scanner string `protobuf:"bytes,1,opt,name=Scanner,proto3" json:"Scanner,omitempty"`
	// Args are extra tool arguments (raw passthrough), placed before the target specs.
	Args []string `protobuf:"bytes,2,rep,name=Args,proto3" json:"Args,omitempty"`
	// Targets are the scan targets (typically derived from stored hosts).
	Targets []*pb.Target `protobuf:"bytes,3,rep,name=Targets,proto3" json:"Targets,omitempty"`
	// Background detaches the job: the server returns the JobId frame and keeps running.
	Background bool `protobuf:"varint,4,opt,name=Background,proto3" json:"Background,omitempty"`
	// contains filtered or unexported fields
}

RunScanRequest asks the server to run a scanner against targets (and/or raw args).

func (*RunScanRequest) Descriptor deprecated

func (*RunScanRequest) Descriptor() ([]byte, []int)

Deprecated: Use RunScanRequest.ProtoReflect.Descriptor instead.

func (*RunScanRequest) GetArgs

func (x *RunScanRequest) GetArgs() []string

func (*RunScanRequest) GetBackground

func (x *RunScanRequest) GetBackground() bool

func (*RunScanRequest) GetScanner

func (x *RunScanRequest) GetScanner() string

func (*RunScanRequest) GetTargets

func (x *RunScanRequest) GetTargets() []*pb.Target

func (*RunScanRequest) ProtoMessage

func (*RunScanRequest) ProtoMessage()

func (*RunScanRequest) ProtoReflect

func (x *RunScanRequest) ProtoReflect() protoreflect.Message

func (*RunScanRequest) Reset

func (x *RunScanRequest) Reset()

func (*RunScanRequest) String

func (x *RunScanRequest) String() string

type RunUpdate

type RunUpdate struct {

	// Types that are assignable to Update:
	//
	//	*RunUpdate_JobId
	//	*RunUpdate_Progress
	//	*RunUpdate_Host
	//	*RunUpdate_Final
	//	*RunUpdate_Error
	//	*RunUpdate_Warning
	Update isRunUpdate_Update `protobuf_oneof:"update"`
	// contains filtered or unexported fields
}

RunUpdate is one frame of a running scan's stream: exactly one of the fields is set.

func (*RunUpdate) Descriptor deprecated

func (*RunUpdate) Descriptor() ([]byte, []int)

Deprecated: Use RunUpdate.ProtoReflect.Descriptor instead.

func (*RunUpdate) GetError

func (x *RunUpdate) GetError() string

func (*RunUpdate) GetFinal

func (x *RunUpdate) GetFinal() *pb.Run

func (*RunUpdate) GetHost

func (x *RunUpdate) GetHost() *pb1.Host

func (*RunUpdate) GetJobId

func (x *RunUpdate) GetJobId() string

func (*RunUpdate) GetProgress

func (x *RunUpdate) GetProgress() *pb.TaskProgress

func (*RunUpdate) GetUpdate

func (m *RunUpdate) GetUpdate() isRunUpdate_Update

func (*RunUpdate) GetWarning added in v0.3.0

func (x *RunUpdate) GetWarning() string

func (*RunUpdate) ProtoMessage

func (*RunUpdate) ProtoMessage()

func (*RunUpdate) ProtoReflect

func (x *RunUpdate) ProtoReflect() protoreflect.Message

func (*RunUpdate) Reset

func (x *RunUpdate) Reset()

func (*RunUpdate) String

func (x *RunUpdate) String() string

type RunUpdate_Error

type RunUpdate_Error struct {
	// Error carries a fatal scan error (the stream ends after it).
	Error string `protobuf:"bytes,5,opt,name=Error,proto3,oneof"`
}

type RunUpdate_Final

type RunUpdate_Final struct {
	// Final is the completed, stored run; sent as the last frame of a foreground stream.
	Final *pb.Run `protobuf:"bytes,4,opt,name=Final,proto3,oneof"`
}

type RunUpdate_Host

type RunUpdate_Host struct {
	// Host is a host the scan has finished, streamed as it is found.
	Host *pb1.Host `protobuf:"bytes,3,opt,name=Host,proto3,oneof"`
}

type RunUpdate_JobId

type RunUpdate_JobId struct {
	// JobId identifies the server-side job; sent as the first frame.
	JobId string `protobuf:"bytes,1,opt,name=JobId,proto3,oneof"`
}

type RunUpdate_Progress

type RunUpdate_Progress struct {
	// Progress is a taskprogress frame from the scanner.
	Progress *pb.TaskProgress `protobuf:"bytes,2,opt,name=Progress,proto3,oneof"`
}

type RunUpdate_Warning added in v0.3.0

type RunUpdate_Warning struct {
	// Warning is a live, non-fatal scanner notice (a raw nmap/masscan stderr line) streamed as
	// it is emitted, so a long scan that is plainly busy is not shown as silent. The client
	// classifies/colours it; the stream continues after it.
	Warning string `protobuf:"bytes,6,opt,name=Warning,proto3,oneof"`
}

type ScanJob

type ScanJob struct {
	Id        string       `protobuf:"bytes,1,opt,name=Id,proto3" json:"Id,omitempty"`
	Scanner   string       `protobuf:"bytes,2,opt,name=Scanner,proto3" json:"Scanner,omitempty"`
	Args      []string     `protobuf:"bytes,3,rep,name=Args,proto3" json:"Args,omitempty"`
	StartedAt int64        `protobuf:"varint,4,opt,name=StartedAt,proto3" json:"StartedAt,omitempty"`
	Targets   []*pb.Target `protobuf:"bytes,5,rep,name=Targets,proto3" json:"Targets,omitempty"`
	// contains filtered or unexported fields
}

ScanJob describes one running server-side scan.

func (*ScanJob) Descriptor deprecated

func (*ScanJob) Descriptor() ([]byte, []int)

Deprecated: Use ScanJob.ProtoReflect.Descriptor instead.

func (*ScanJob) GetArgs

func (x *ScanJob) GetArgs() []string

func (*ScanJob) GetId

func (x *ScanJob) GetId() string

func (*ScanJob) GetScanner

func (x *ScanJob) GetScanner() string

func (*ScanJob) GetStartedAt

func (x *ScanJob) GetStartedAt() int64

func (*ScanJob) GetTargets

func (x *ScanJob) GetTargets() []*pb.Target

func (*ScanJob) ProtoMessage

func (*ScanJob) ProtoMessage()

func (*ScanJob) ProtoReflect

func (x *ScanJob) ProtoReflect() protoreflect.Message

func (*ScanJob) Reset

func (x *ScanJob) Reset()

func (*ScanJob) String

func (x *ScanJob) String() string

type ScansClient

type ScansClient interface {
	Create(ctx context.Context, in *CreateScanRequest, opts ...grpc.CallOption) (*CreateScanResponse, error)
	Read(ctx context.Context, in *ReadScanRequest, opts ...grpc.CallOption) (*ReadScanResponse, error)
	List(ctx context.Context, in *ReadScanRequest, opts ...grpc.CallOption) (*ReadScanResponse, error)
	Upsert(ctx context.Context, in *UpsertScanRequest, opts ...grpc.CallOption) (*UpsertScanResponse, error)
	Delete(ctx context.Context, in *DeleteScanRequest, opts ...grpc.CallOption) (*DeleteScanResponse, error)
	// Cleanup collapses repeated runs of the same scan definition (same scanner + args + targets)
	// into a single visible head per series, tombstoning the older siblings (SupersededBy) rather
	// than deleting them so drift history (`scan diff`) and cross-run host sharing survive. DryRun
	// returns the plan without writing; Prune additionally hard-deletes the byte-identical subset.
	Cleanup(ctx context.Context, in *CleanupScanRequest, opts ...grpc.CallOption) (*CleanupScanResponse, error)
	// Run executes a scanner server-side against the given targets and streams progress,
	// hosts, and the final stored run back as RunUpdate frames. Foreground clients consume the
	// stream to completion; background clients (Background=true) get the JobId frame and may
	// disconnect while the server-side job keeps running.
	Run(ctx context.Context, in *RunScanRequest, opts ...grpc.CallOption) (Scans_RunClient, error)
	// Jobs lists the scans currently running server-side.
	Jobs(ctx context.Context, in *JobsRequest, opts ...grpc.CallOption) (*JobsResponse, error)
	// Attach re-subscribes to a running job's stream, yielding the same RunUpdate frames as Run.
	Attach(ctx context.Context, in *AttachRequest, opts ...grpc.CallOption) (Scans_AttachClient, error)
	// Stop cancels a running job, killing its scanner process.
	Stop(ctx context.Context, in *StopRequest, opts ...grpc.CallOption) (*StopResponse, error)
	// Resume continues an interrupted run: it re-invokes the scanner over only the targets that
	// run never completed (its per-target completion record), folding the results into a new run
	// that links back to the interrupted one (ResumedFrom) and tombstones it. Streams the same
	// RunUpdate frames as Run.
	Resume(ctx context.Context, in *ResumeScanRequest, opts ...grpc.CallOption) (Scans_ResumeClient, error)
}

ScansClient is the client API for Scans service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewScansClient

func NewScansClient(cc grpc.ClientConnInterface) ScansClient

type ScansServer

type ScansServer interface {
	Create(context.Context, *CreateScanRequest) (*CreateScanResponse, error)
	Read(context.Context, *ReadScanRequest) (*ReadScanResponse, error)
	List(context.Context, *ReadScanRequest) (*ReadScanResponse, error)
	Upsert(context.Context, *UpsertScanRequest) (*UpsertScanResponse, error)
	Delete(context.Context, *DeleteScanRequest) (*DeleteScanResponse, error)
	// Cleanup collapses repeated runs of the same scan definition (same scanner + args + targets)
	// into a single visible head per series, tombstoning the older siblings (SupersededBy) rather
	// than deleting them so drift history (`scan diff`) and cross-run host sharing survive. DryRun
	// returns the plan without writing; Prune additionally hard-deletes the byte-identical subset.
	Cleanup(context.Context, *CleanupScanRequest) (*CleanupScanResponse, error)
	// Run executes a scanner server-side against the given targets and streams progress,
	// hosts, and the final stored run back as RunUpdate frames. Foreground clients consume the
	// stream to completion; background clients (Background=true) get the JobId frame and may
	// disconnect while the server-side job keeps running.
	Run(*RunScanRequest, Scans_RunServer) error
	// Jobs lists the scans currently running server-side.
	Jobs(context.Context, *JobsRequest) (*JobsResponse, error)
	// Attach re-subscribes to a running job's stream, yielding the same RunUpdate frames as Run.
	Attach(*AttachRequest, Scans_AttachServer) error
	// Stop cancels a running job, killing its scanner process.
	Stop(context.Context, *StopRequest) (*StopResponse, error)
	// Resume continues an interrupted run: it re-invokes the scanner over only the targets that
	// run never completed (its per-target completion record), folding the results into a new run
	// that links back to the interrupted one (ResumedFrom) and tombstones it. Streams the same
	// RunUpdate frames as Run.
	Resume(*ResumeScanRequest, Scans_ResumeServer) error
	// contains filtered or unexported methods
}

ScansServer is the server API for Scans service. All implementations must embed UnimplementedScansServer for forward compatibility

type Scans_AttachClient

type Scans_AttachClient interface {
	Recv() (*RunUpdate, error)
	grpc.ClientStream
}

type Scans_AttachServer

type Scans_AttachServer interface {
	Send(*RunUpdate) error
	grpc.ServerStream
}

type Scans_ResumeClient added in v0.3.0

type Scans_ResumeClient interface {
	Recv() (*RunUpdate, error)
	grpc.ClientStream
}

type Scans_ResumeServer added in v0.3.0

type Scans_ResumeServer interface {
	Send(*RunUpdate) error
	grpc.ServerStream
}

type Scans_RunClient

type Scans_RunClient interface {
	Recv() (*RunUpdate, error)
	grpc.ClientStream
}

type Scans_RunServer

type Scans_RunServer interface {
	Send(*RunUpdate) error
	grpc.ServerStream
}

type StopRequest

type StopRequest struct {
	JobId string `protobuf:"bytes,1,opt,name=JobId,proto3" json:"JobId,omitempty"`
	// contains filtered or unexported fields
}

func (*StopRequest) Descriptor deprecated

func (*StopRequest) Descriptor() ([]byte, []int)

Deprecated: Use StopRequest.ProtoReflect.Descriptor instead.

func (*StopRequest) GetJobId

func (x *StopRequest) GetJobId() string

func (*StopRequest) ProtoMessage

func (*StopRequest) ProtoMessage()

func (*StopRequest) ProtoReflect

func (x *StopRequest) ProtoReflect() protoreflect.Message

func (*StopRequest) Reset

func (x *StopRequest) Reset()

func (*StopRequest) String

func (x *StopRequest) String() string

type StopResponse

type StopResponse struct {
	JobId   string `protobuf:"bytes,1,opt,name=JobId,proto3" json:"JobId,omitempty"`
	Stopped bool   `protobuf:"varint,2,opt,name=Stopped,proto3" json:"Stopped,omitempty"`
	// contains filtered or unexported fields
}

func (*StopResponse) Descriptor deprecated

func (*StopResponse) Descriptor() ([]byte, []int)

Deprecated: Use StopResponse.ProtoReflect.Descriptor instead.

func (*StopResponse) GetJobId

func (x *StopResponse) GetJobId() string

func (*StopResponse) GetStopped

func (x *StopResponse) GetStopped() bool

func (*StopResponse) ProtoMessage

func (*StopResponse) ProtoMessage()

func (*StopResponse) ProtoReflect

func (x *StopResponse) ProtoReflect() protoreflect.Message

func (*StopResponse) Reset

func (x *StopResponse) Reset()

func (*StopResponse) String

func (x *StopResponse) String() string

type UnimplementedScansServer

type UnimplementedScansServer struct {
}

UnimplementedScansServer must be embedded to have forward compatible implementations.

func (UnimplementedScansServer) Attach

func (UnimplementedScansServer) Cleanup added in v0.2.0

func (UnimplementedScansServer) Create

func (UnimplementedScansServer) Delete

func (UnimplementedScansServer) Jobs

func (UnimplementedScansServer) List

func (UnimplementedScansServer) Read

func (UnimplementedScansServer) Resume added in v0.3.0

func (UnimplementedScansServer) Run

func (UnimplementedScansServer) Stop

func (UnimplementedScansServer) Upsert

type UnsafeScansServer

type UnsafeScansServer interface {
	// contains filtered or unexported methods
}

UnsafeScansServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ScansServer will result in compilation errors.

type UpsertScanRequest

type UpsertScanRequest struct {
	Scans []*pb.Run `protobuf:"bytes,1,rep,name=Scans,proto3" json:"Scans,omitempty"`
	// contains filtered or unexported fields
}

func (*UpsertScanRequest) Descriptor deprecated

func (*UpsertScanRequest) Descriptor() ([]byte, []int)

Deprecated: Use UpsertScanRequest.ProtoReflect.Descriptor instead.

func (*UpsertScanRequest) GetScans

func (x *UpsertScanRequest) GetScans() []*pb.Run

func (*UpsertScanRequest) ProtoMessage

func (*UpsertScanRequest) ProtoMessage()

func (*UpsertScanRequest) ProtoReflect

func (x *UpsertScanRequest) ProtoReflect() protoreflect.Message

func (*UpsertScanRequest) Reset

func (x *UpsertScanRequest) Reset()

func (*UpsertScanRequest) String

func (x *UpsertScanRequest) String() string

type UpsertScanResponse

type UpsertScanResponse struct {
	Scans []*pb.Run `protobuf:"bytes,1,rep,name=Scans,proto3" json:"Scans,omitempty"`
	// contains filtered or unexported fields
}

func (*UpsertScanResponse) Descriptor deprecated

func (*UpsertScanResponse) Descriptor() ([]byte, []int)

Deprecated: Use UpsertScanResponse.ProtoReflect.Descriptor instead.

func (*UpsertScanResponse) GetScans

func (x *UpsertScanResponse) GetScans() []*pb.Run

func (*UpsertScanResponse) ProtoMessage

func (*UpsertScanResponse) ProtoMessage()

func (*UpsertScanResponse) ProtoReflect

func (x *UpsertScanResponse) ProtoReflect() protoreflect.Message

func (*UpsertScanResponse) Reset

func (x *UpsertScanResponse) Reset()

func (*UpsertScanResponse) String

func (x *UpsertScanResponse) String() string

Jump to

Keyboard shortcuts

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