Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReportExecutionName ¶
ReportExecutionName returns the name of the report execution.
Types ¶
type AuditQuery ¶
type AuditQuery struct { // ResourceHeader is the resource header. header.ResourceHeader // Spec is the audit query specification. Spec AuditQuerySpec `json:"spec" yaml:"spec"` }
AuditQuery is the audit query resource.
func NewAuditQuery ¶
func NewAuditQuery(metadata header.Metadata, spec AuditQuerySpec) (*AuditQuery, error)
NewAuditQuery creates a new audit query.
func (*AuditQuery) CheckAndSetDefaults ¶
func (a *AuditQuery) CheckAndSetDefaults() error
CheckAndSetDefaults validates fields and populates empty fields with default values.
func (*AuditQuery) GetMetadata ¶
func (a *AuditQuery) GetMetadata() types.Metadata
GetMetadata returns metadata. This is specifically for conforming to the Resource interface, and should be removed when possible.
type AuditQuerySpec ¶
type AuditQuerySpec struct { // Name is the AuditQuery name. Name string `json:"name,omitempty" yaml:"name,omitempty"` // Title is the AuditQuery title. Title string `json:"title,omitempty" yaml:"title,omitempty"` // Description is the AuditQuery description. Description string `json:"description,omitempty" yaml:"description,omitempty"` // Query is the AuditQuery query. Query string `json:"query,omitempty" yaml:"query,omitempty"` }
AuditQuerySpec is the audit query specification.
type CostLimiter ¶
type CostLimiter struct { // ResourceHeader is the resource header. header.ResourceHeader // Spec is the security report state specification. Spec CostLimiterSpec `json:"spec,omitempty" yaml:"spec,omitempty"` }
CostLimiter is the security report state.
func NewCostLimiter ¶
func NewCostLimiter(metadata header.Metadata, spec CostLimiterSpec) (*CostLimiter, error)
NewCostLimiter creates a new const limiter.
func (*CostLimiter) CheckAndSetDefaults ¶
func (a *CostLimiter) CheckAndSetDefaults() error
CheckAndSetDefaults validates fields and populates empty fields with default values.
func (*CostLimiter) GetMetadata ¶
func (a *CostLimiter) GetMetadata() types.Metadata
GetMetadata returns metadata. This is specifically for conforming to the Resource interface, and should be removed when possible.
func (*CostLimiter) Reset ¶
func (a *CostLimiter) Reset(refillAt time.Time)
type CostLimiterSpec ¶
type CostLimiterSpec struct { // BytesScanned is the number of bytes scanned. BytesScanned uint64 `json:"bytes_scanned,omitempty"` // RefillAt is the time when the limiter should be refilled. RefillAt time.Time `json:"refill_at,omitempty"` // RefillAfter is time duration after which the limiter should be refilled. RefillAfter time.Duration `json:"refill_after,omitempty"` }
CostLimiterSpec is the security report cost limiter specification.
type Report ¶
type Report struct { // ResourceHeader is the resource header. header.ResourceHeader // Spec is the security report spec. Spec ReportSpec `json:"spec" yaml:"spec"` }
Report is security report.
func NewReport ¶
func NewReport(metadata header.Metadata, spec ReportSpec) (*Report, error)
NewReport creates a new security report.
func (*Report) CheckAndSetDefaults ¶
CheckAndSetDefaults validates fields and populates empty fields with default values.
func (*Report) GetMetadata ¶
GetMetadata returns metadata. This is specifically for conforming to the Resource interface, and should be removed when possible.
type ReportSpec ¶
type ReportSpec struct { // Name is the Report name. Name string `json:"name,omitempty" yaml:"name,omitempty"` // Title is the Report title. Title string `json:"title,omitempty" yaml:"title,omitempty"` // Description is the Report description. Description string `json:"desc,omitempty" yaml:"desc,omitempty"` // AuditQueries is the Report audit query. AuditQueries []*AuditQuerySpec `json:"audit_queries,omitempty" yaml:"queries,omitempty"` // Version is the Reports version. Version string `json:"version,omitempty" yaml:"version,omitempty"` }
ReportSpec is the security report spec.
type ReportState ¶
type ReportState struct { // ResourceHeader is the resource header. header.ResourceHeader // Spec is the security report state specification. Spec ReportStateSpec `json:"spec,omitempty" yaml:"spec,omitempty"` }
ReportState is the security report state.
func NewReportState ¶
func NewReportState(metadata header.Metadata, spec ReportStateSpec) (*ReportState, error)
NewReportState creates a new security report state.
func (*ReportState) CheckAndSetDefaults ¶
func (a *ReportState) CheckAndSetDefaults() error
CheckAndSetDefaults validates fields and populates empty fields with default values.
func (*ReportState) GetMetadata ¶
func (a *ReportState) GetMetadata() types.Metadata
GetMetadata returns metadata. This is specifically for conforming to the Resource interface, and should be removed when possible.
type ReportStateSpec ¶
type ReportStateSpec struct { // Name is the Report name. Status Status `json:"status,omitempty" yaml:"status,omitempty"` // UpdatedAt is the time the report was updated. UpdatedAt time.Time `json:"updated_at,omitempty" yaml:"updated_at,omitempty"` }
ReportStateSpec is the security report state specification.
type Status ¶
type Status string
Status is the status of the security report.
const ( // Running is the running status. This means the report is currently running. Running Status = "RUNNING" // Failed is the failed status. This means the report failed to run. Failed Status = "FAILED" // Ready is the ready status. This means the report is ready to be viewed. Ready Status = "READY" )