fswalker

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 5 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Notification_Severity_name = map[int32]string{
		0: "UNKNOWN",
		1: "INFO",
		2: "WARNING",
		3: "ERROR",
	}
	Notification_Severity_value = map[string]int32{
		"UNKNOWN": 0,
		"INFO":    1,
		"WARNING": 2,
		"ERROR":   3,
	}
)

Enum value maps for Notification_Severity.

View Source
var (
	Fingerprint_Method_name = map[int32]string{
		0: "UNKNOWN",
		1: "SHA256",
	}
	Fingerprint_Method_value = map[string]int32{
		"UNKNOWN": 0,
		"SHA256":  1,
	}
)

Enum value maps for Fingerprint_Method.

View Source
var File_fswalker_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type File

type File struct {

	// version is the version of the proto structure.
	Version uint32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
	// path is the full file path including the file name.
	Path string    `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
	Info *FileInfo `protobuf:"bytes,3,opt,name=info,proto3" json:"info,omitempty"`
	Stat *FileStat `protobuf:"bytes,4,opt,name=stat,proto3" json:"stat,omitempty"`
	// fingerprint is optionally set when requested for the specific file.
	Fingerprint []*Fingerprint `protobuf:"bytes,5,rep,name=fingerprint,proto3" json:"fingerprint,omitempty"`
	// contains filtered or unexported fields
}

func (*File) Descriptor deprecated

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

Deprecated: Use File.ProtoReflect.Descriptor instead.

func (*File) GetFingerprint

func (x *File) GetFingerprint() []*Fingerprint

func (*File) GetInfo

func (x *File) GetInfo() *FileInfo

func (*File) GetPath

func (x *File) GetPath() string

func (*File) GetStat

func (x *File) GetStat() *FileStat

func (*File) GetVersion

func (x *File) GetVersion() uint32

func (*File) ProtoMessage

func (*File) ProtoMessage()

func (*File) ProtoReflect added in v0.3.3

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

func (*File) Reset

func (x *File) Reset()

func (*File) String

func (x *File) String() string

type FileInfo

type FileInfo struct {

	// base name of the file
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// length in bytes for regular files; system-dependent for others
	Size int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
	// file mode bits
	Mode uint32 `protobuf:"varint,3,opt,name=mode,proto3" json:"mode,omitempty"`
	// modification time
	Modified *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=modified,proto3" json:"modified,omitempty"`
	// abbreviation for Mode().IsDir()
	IsDir bool `protobuf:"varint,5,opt,name=is_dir,json=isDir,proto3" json:"is_dir,omitempty"`
	// contains filtered or unexported fields
}

func (*FileInfo) Descriptor deprecated

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

Deprecated: Use FileInfo.ProtoReflect.Descriptor instead.

func (*FileInfo) GetIsDir

func (x *FileInfo) GetIsDir() bool

func (*FileInfo) GetMode

func (x *FileInfo) GetMode() uint32

func (*FileInfo) GetModified

func (x *FileInfo) GetModified() *timestamppb.Timestamp

func (*FileInfo) GetName

func (x *FileInfo) GetName() string

func (*FileInfo) GetSize

func (x *FileInfo) GetSize() int64

func (*FileInfo) ProtoMessage

func (*FileInfo) ProtoMessage()

func (*FileInfo) ProtoReflect added in v0.3.3

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

func (*FileInfo) Reset

func (x *FileInfo) Reset()

func (*FileInfo) String

func (x *FileInfo) String() string

type FileStat

type FileStat struct {
	Dev     uint64                 `protobuf:"varint,1,opt,name=dev,proto3" json:"dev,omitempty"`
	Inode   uint64                 `protobuf:"varint,2,opt,name=inode,proto3" json:"inode,omitempty"`
	Nlink   uint64                 `protobuf:"varint,3,opt,name=nlink,proto3" json:"nlink,omitempty"`
	Mode    uint32                 `protobuf:"varint,4,opt,name=mode,proto3" json:"mode,omitempty"`
	Uid     uint32                 `protobuf:"varint,5,opt,name=uid,proto3" json:"uid,omitempty"`
	Gid     uint32                 `protobuf:"varint,6,opt,name=gid,proto3" json:"gid,omitempty"`
	Rdev    uint64                 `protobuf:"varint,7,opt,name=rdev,proto3" json:"rdev,omitempty"`
	Size    int64                  `protobuf:"varint,8,opt,name=size,proto3" json:"size,omitempty"`
	Blksize int64                  `protobuf:"varint,9,opt,name=blksize,proto3" json:"blksize,omitempty"`
	Blocks  int64                  `protobuf:"varint,10,opt,name=blocks,proto3" json:"blocks,omitempty"`
	Atime   *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=atime,proto3" json:"atime,omitempty"`
	Mtime   *timestamppb.Timestamp `protobuf:"bytes,12,opt,name=mtime,proto3" json:"mtime,omitempty"`
	Ctime   *timestamppb.Timestamp `protobuf:"bytes,13,opt,name=ctime,proto3" json:"ctime,omitempty"`
	// contains filtered or unexported fields
}

func (*FileStat) Descriptor deprecated

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

Deprecated: Use FileStat.ProtoReflect.Descriptor instead.

func (*FileStat) GetAtime

func (x *FileStat) GetAtime() *timestamppb.Timestamp

func (*FileStat) GetBlksize

func (x *FileStat) GetBlksize() int64

func (*FileStat) GetBlocks

func (x *FileStat) GetBlocks() int64

func (*FileStat) GetCtime

func (x *FileStat) GetCtime() *timestamppb.Timestamp

func (*FileStat) GetDev

func (x *FileStat) GetDev() uint64

func (*FileStat) GetGid

func (x *FileStat) GetGid() uint32

func (*FileStat) GetInode

func (x *FileStat) GetInode() uint64

func (*FileStat) GetMode

func (x *FileStat) GetMode() uint32

func (*FileStat) GetMtime

func (x *FileStat) GetMtime() *timestamppb.Timestamp
func (x *FileStat) GetNlink() uint64

func (*FileStat) GetRdev

func (x *FileStat) GetRdev() uint64

func (*FileStat) GetSize

func (x *FileStat) GetSize() int64

func (*FileStat) GetUid

func (x *FileStat) GetUid() uint32

func (*FileStat) ProtoMessage

func (*FileStat) ProtoMessage()

func (*FileStat) ProtoReflect added in v0.3.3

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

func (*FileStat) Reset

func (x *FileStat) Reset()

func (*FileStat) String

func (x *FileStat) String() string

type Fingerprint

type Fingerprint struct {
	Method Fingerprint_Method `protobuf:"varint,1,opt,name=method,proto3,enum=fswalker.Fingerprint_Method" json:"method,omitempty"`
	Value  string             `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

Fingerprint is a unique identifier for a given File. It consists of a Method (e.g. SHA256) and a value.

func (*Fingerprint) Descriptor deprecated

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

Deprecated: Use Fingerprint.ProtoReflect.Descriptor instead.

func (*Fingerprint) GetMethod

func (x *Fingerprint) GetMethod() Fingerprint_Method

func (*Fingerprint) GetValue

func (x *Fingerprint) GetValue() string

func (*Fingerprint) ProtoMessage

func (*Fingerprint) ProtoMessage()

func (*Fingerprint) ProtoReflect added in v0.3.3

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

func (*Fingerprint) Reset

func (x *Fingerprint) Reset()

func (*Fingerprint) String

func (x *Fingerprint) String() string

type Fingerprint_Method

type Fingerprint_Method int32
const (
	Fingerprint_UNKNOWN Fingerprint_Method = 0
	Fingerprint_SHA256  Fingerprint_Method = 1
)

func (Fingerprint_Method) Descriptor added in v0.3.3

func (Fingerprint_Method) Enum added in v0.3.3

func (Fingerprint_Method) EnumDescriptor deprecated

func (Fingerprint_Method) EnumDescriptor() ([]byte, []int)

Deprecated: Use Fingerprint_Method.Descriptor instead.

func (Fingerprint_Method) Number added in v0.3.3

func (Fingerprint_Method) String

func (x Fingerprint_Method) String() string

func (Fingerprint_Method) Type added in v0.3.3

type Notification

type Notification struct {
	Severity Notification_Severity `protobuf:"varint,1,opt,name=severity,proto3,enum=fswalker.Notification_Severity" json:"severity,omitempty"`
	// path where the notification occurred.
	Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
	// human readable message.
	Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*Notification) Descriptor deprecated

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

Deprecated: Use Notification.ProtoReflect.Descriptor instead.

func (*Notification) GetMessage

func (x *Notification) GetMessage() string

func (*Notification) GetPath

func (x *Notification) GetPath() string

func (*Notification) GetSeverity

func (x *Notification) GetSeverity() Notification_Severity

func (*Notification) ProtoMessage

func (*Notification) ProtoMessage()

func (*Notification) ProtoReflect added in v0.3.3

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

func (*Notification) Reset

func (x *Notification) Reset()

func (*Notification) String

func (x *Notification) String() string

type Notification_Severity

type Notification_Severity int32

Indicator for the severity of the notification.

const (
	Notification_UNKNOWN Notification_Severity = 0
	Notification_INFO    Notification_Severity = 1
	Notification_WARNING Notification_Severity = 2
	Notification_ERROR   Notification_Severity = 3
)

func (Notification_Severity) Descriptor added in v0.3.3

func (Notification_Severity) Enum added in v0.3.3

func (Notification_Severity) EnumDescriptor deprecated

func (Notification_Severity) EnumDescriptor() ([]byte, []int)

Deprecated: Use Notification_Severity.Descriptor instead.

func (Notification_Severity) Number added in v0.3.3

func (Notification_Severity) String

func (x Notification_Severity) String() string

func (Notification_Severity) Type added in v0.3.3

type Policy

type Policy struct {

	// version is the version of the proto structure.
	Version uint32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
	// include is a list of paths to use as roots for file walks.
	// Each walk can be done by a separate Go routine (if an idle one is
	// available). Important to note that the include paths SHOULD NOT contain
	// each other because that will lead to paths being visited more than once.
	Include []string `protobuf:"bytes,2,rep,name=include,proto3" json:"include,omitempty"`
	// exclude_pfx is a list of path prefixes which will be excluded from being
	// walked. Note that these are prefixes. Any path matching one of these
	// prefixes will be ignored.
	ExcludePfx []string `protobuf:"bytes,3,rep,name=exclude_pfx,json=excludePfx,proto3" json:"exclude_pfx,omitempty"`
	// hash_pfx is a list of path prefixes. If the discovered File path is not a
	// directory, matches one of the prefixes and is not larger than
	// max_hash_file_size, the file will be opened and a file hash built over its
	// content.
	HashPfx         []string `protobuf:"bytes,4,rep,name=hash_pfx,json=hashPfx,proto3" json:"hash_pfx,omitempty"`
	MaxHashFileSize int64    `protobuf:"varint,5,opt,name=max_hash_file_size,json=maxHashFileSize,proto3" json:"max_hash_file_size,omitempty"`
	// walk_cross_device controls whether files on different devices from the
	// include directories should be walked. I.e. if "/" is included, "/tmp" will
	// only be walked if it is not a separate mount point.
	WalkCrossDevice bool `protobuf:"varint,30,opt,name=walk_cross_device,json=walkCrossDevice,proto3" json:"walk_cross_device,omitempty"`
	// ignore_irregular_files controls whether irregular files (i.e. symlinks,
	// sockets, devices, etc) should be ignored.
	// Note that symlinks are NOT followed either way.
	IgnoreIrregularFiles bool `protobuf:"varint,31,opt,name=ignore_irregular_files,json=ignoreIrregularFiles,proto3" json:"ignore_irregular_files,omitempty"`
	// max_directory_depth controls how many levels of directories Walker should
	// walk into an included directory.
	// Defaults to no restriction on depth (i.e. go all the way).
	MaxDirectoryDepth uint32 `protobuf:"varint,32,opt,name=max_directory_depth,json=maxDirectoryDepth,proto3" json:"max_directory_depth,omitempty"`
	// contains filtered or unexported fields
}

func (*Policy) Descriptor deprecated

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

Deprecated: Use Policy.ProtoReflect.Descriptor instead.

func (*Policy) GetExcludePfx

func (x *Policy) GetExcludePfx() []string

func (*Policy) GetHashPfx

func (x *Policy) GetHashPfx() []string

func (*Policy) GetIgnoreIrregularFiles

func (x *Policy) GetIgnoreIrregularFiles() bool

func (*Policy) GetInclude

func (x *Policy) GetInclude() []string

func (*Policy) GetMaxDirectoryDepth

func (x *Policy) GetMaxDirectoryDepth() uint32

func (*Policy) GetMaxHashFileSize

func (x *Policy) GetMaxHashFileSize() int64

func (*Policy) GetVersion

func (x *Policy) GetVersion() uint32

func (*Policy) GetWalkCrossDevice

func (x *Policy) GetWalkCrossDevice() bool

func (*Policy) ProtoMessage

func (*Policy) ProtoMessage()

func (*Policy) ProtoReflect added in v0.3.3

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

func (*Policy) Reset

func (x *Policy) Reset()

func (*Policy) String

func (x *Policy) String() string

type ReportConfig

type ReportConfig struct {

	// version is the version of the proto structure.
	Version uint32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
	// exclude_pfx is a list of path prefixes which will be excluded from being
	// reported. Note that these are prefixes. Any path matching one of these
	// prefixes will be ignored. These are in addition to the exclusions in the
	// client policy so more things can be recorded (but ignored in the default
	// report).
	ExcludePfx []string `protobuf:"bytes,2,rep,name=exclude_pfx,json=excludePfx,proto3" json:"exclude_pfx,omitempty"`
	// contains filtered or unexported fields
}

func (*ReportConfig) Descriptor deprecated

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

Deprecated: Use ReportConfig.ProtoReflect.Descriptor instead.

func (*ReportConfig) GetExcludePfx

func (x *ReportConfig) GetExcludePfx() []string

func (*ReportConfig) GetVersion

func (x *ReportConfig) GetVersion() uint32

func (*ReportConfig) ProtoMessage

func (*ReportConfig) ProtoMessage()

func (*ReportConfig) ProtoReflect added in v0.3.3

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

func (*ReportConfig) Reset

func (x *ReportConfig) Reset()

func (*ReportConfig) String

func (x *ReportConfig) String() string

type Review

type Review struct {

	// The ID of the Walk that was reviewed and considered ok.
	// This will become the last known good.
	WalkId string `protobuf:"bytes,1,opt,name=walk_id,json=walkId,proto3" json:"walk_id,omitempty"`
	// Reference to the Walk source (e.g. absolute path).
	WalkReference string `protobuf:"bytes,2,opt,name=walk_reference,json=walkReference,proto3" json:"walk_reference,omitempty"`
	// Mandatory fingerprint of the walk file (to ensure integrity).
	Fingerprint *Fingerprint `protobuf:"bytes,3,opt,name=fingerprint,proto3" json:"fingerprint,omitempty"`
	// contains filtered or unexported fields
}

func (*Review) Descriptor deprecated

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

Deprecated: Use Review.ProtoReflect.Descriptor instead.

func (*Review) GetFingerprint

func (x *Review) GetFingerprint() *Fingerprint

func (*Review) GetWalkId

func (x *Review) GetWalkId() string

func (*Review) GetWalkReference

func (x *Review) GetWalkReference() string

func (*Review) ProtoMessage

func (*Review) ProtoMessage()

func (*Review) ProtoReflect added in v0.3.3

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

func (*Review) Reset

func (x *Review) Reset()

func (*Review) String

func (x *Review) String() string

type Reviews

type Reviews struct {
	Review map[string]*Review `` // Keyed by the FQDN of the host.
	/* 153-byte string literal not displayed */
	// contains filtered or unexported fields
}

Reviews is a collection of "known good" states, one per host. It is used to keep the default to compare newer reports against.

func (*Reviews) Descriptor deprecated

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

Deprecated: Use Reviews.ProtoReflect.Descriptor instead.

func (*Reviews) GetReview

func (x *Reviews) GetReview() map[string]*Review

func (*Reviews) ProtoMessage

func (*Reviews) ProtoMessage()

func (*Reviews) ProtoReflect added in v0.3.3

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

func (*Reviews) Reset

func (x *Reviews) Reset()

func (*Reviews) String

func (x *Reviews) String() string

type Walk

type Walk struct {

	// A unique string identifying this specific Walk.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// version is the version of the proto structure.
	Version uint32 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"`
	// policy is the Policy that was used for the file walk.
	Policy *Policy `protobuf:"bytes,3,opt,name=policy,proto3" json:"policy,omitempty"`
	// file is a list of all files including metadata that were discovered.
	File []*File `protobuf:"bytes,4,rep,name=file,proto3" json:"file,omitempty"`
	// notification is a list of notifications that occurred during a walk.
	Notification []*Notification `protobuf:"bytes,5,rep,name=notification,proto3" json:"notification,omitempty"`
	// hostname of the machine the walk originates from.
	Hostname string `protobuf:"bytes,10,opt,name=hostname,proto3" json:"hostname,omitempty"`
	// start and stop time of the walk.
	StartWalk *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=start_walk,json=startWalk,proto3" json:"start_walk,omitempty"`
	StopWalk  *timestamppb.Timestamp `protobuf:"bytes,12,opt,name=stop_walk,json=stopWalk,proto3" json:"stop_walk,omitempty"`
	// contains filtered or unexported fields
}

func (*Walk) Descriptor deprecated

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

Deprecated: Use Walk.ProtoReflect.Descriptor instead.

func (*Walk) GetFile

func (x *Walk) GetFile() []*File

func (*Walk) GetHostname

func (x *Walk) GetHostname() string

func (*Walk) GetId

func (x *Walk) GetId() string

func (*Walk) GetNotification

func (x *Walk) GetNotification() []*Notification

func (*Walk) GetPolicy

func (x *Walk) GetPolicy() *Policy

func (*Walk) GetStartWalk

func (x *Walk) GetStartWalk() *timestamppb.Timestamp

func (*Walk) GetStopWalk

func (x *Walk) GetStopWalk() *timestamppb.Timestamp

func (*Walk) GetVersion

func (x *Walk) GetVersion() uint32

func (*Walk) ProtoMessage

func (*Walk) ProtoMessage()

func (*Walk) ProtoReflect added in v0.3.3

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

func (*Walk) Reset

func (x *Walk) Reset()

func (*Walk) String

func (x *Walk) String() string

Jump to

Keyboard shortcuts

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