Documentation ¶
Index ¶
- Variables
- func LiveReportExists(ctx context.Context, exec boil.ContextExecutor, iD string) (bool, error)
- func LiveReportExistsG(ctx context.Context, iD string) (bool, error)
- func LiveReports(mods ...qm.QueryMod) liveReportQuery
- func NewQuery(mods ...qm.QueryMod) *queries.Query
- func ScanReportExists(ctx context.Context, exec boil.ContextExecutor, iD string) (bool, error)
- func ScanReportExistsG(ctx context.Context, iD string) (bool, error)
- func ScanReports(mods ...qm.QueryMod) scanReportQuery
- type LiveReport
- func (o *LiveReport) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *LiveReport) DeleteG(ctx context.Context) (int64, error)
- func (o *LiveReport) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *LiveReport) InsertG(ctx context.Context, columns boil.Columns) error
- func (o *LiveReport) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *LiveReport) ReloadG(ctx context.Context) error
- func (o *LiveReport) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *LiveReport) UpdateG(ctx context.Context, columns boil.Columns) (int64, error)
- func (o *LiveReport) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- func (o *LiveReport) UpsertG(ctx context.Context, updateOnConflict bool, conflictColumns []string, ...) error
- type LiveReportSlice
- func (o LiveReportSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o LiveReportSlice) DeleteAllG(ctx context.Context) (int64, error)
- func (o *LiveReportSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error
- func (o *LiveReportSlice) ReloadAllG(ctx context.Context) error
- func (o LiveReportSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
- func (o LiveReportSlice) UpdateAllG(ctx context.Context, cols M) (int64, error)
- type LiveReportsRepository
- func (r *LiveReportsRepository) GetReport(ctx context.Context, reportID string) (model.Report, error)
- func (r *LiveReportsRepository) GetReportByTeamAndDateRange(ctx context.Context, teamID string, dateFrom string, dateTo string) (*model.LiveReport, error)
- func (r *LiveReportsRepository) Insert(ctx context.Context, report *model.LiveReport) error
- func (r *LiveReportsRepository) SaveReport(ctx context.Context, report model.Report) error
- func (r *LiveReportsRepository) Update(ctx context.Context, report *model.LiveReport) error
- type M
- type ReportsRepository
- type ScanReport
- func (o *ScanReport) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *ScanReport) DeleteG(ctx context.Context) (int64, error)
- func (o *ScanReport) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *ScanReport) InsertG(ctx context.Context, columns boil.Columns) error
- func (o *ScanReport) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *ScanReport) ReloadG(ctx context.Context) error
- func (o *ScanReport) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *ScanReport) UpdateG(ctx context.Context, columns boil.Columns) (int64, error)
- func (o *ScanReport) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- func (o *ScanReport) UpsertG(ctx context.Context, updateOnConflict bool, conflictColumns []string, ...) error
- type ScanReportSlice
- func (o ScanReportSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o ScanReportSlice) DeleteAllG(ctx context.Context) (int64, error)
- func (o *ScanReportSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error
- func (o *ScanReportSlice) ReloadAllG(ctx context.Context) error
- func (o ScanReportSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
- func (o ScanReportSlice) UpdateAllG(ctx context.Context, cols M) (int64, error)
Constants ¶
This section is empty.
Variables ¶
var ( // ErrInvalidRepositoryType indicates that the specified repository type is not valid. ErrInvalidRepositoryType = errors.New("Invalid repository type") // ErrInvalidReportData indicates that given report data is not valid. ErrInvalidReportData = errors.New("Invalid report data") // ErrReportNotFound indicates that the specified report was not found. ErrReportNotFound = errors.New("Report not found") )
var ErrSyncFail = errors.New("storage: failed to synchronize data after insert")
ErrSyncFail occurs during insert when the record could not be retrieved in order to populate default value information. This usually happens when LastInsertId fails or there was a primary key configuration that was not resolvable.
var LiveReportColumns = struct { ID string EmailSubject string EmailBody string TeamID string DateTo string DateFrom string DeliveredTo string UpdateStatusAt string Status string CreatedAt string UpdatedAt string }{ ID: "id", EmailSubject: "email_subject", EmailBody: "email_body", TeamID: "team_id", DateTo: "date_to", DateFrom: "date_from", DeliveredTo: "delivered_to", UpdateStatusAt: "update_status_at", Status: "status", CreatedAt: "created_at", UpdatedAt: "updated_at", }
var LiveReportRels = struct {
}{}
LiveReportRels is where relationship names are stored.
var LiveReportWhere = struct { ID whereHelperstring EmailSubject whereHelperstring EmailBody whereHelperstring TeamID whereHelperstring DateTo whereHelperstring DateFrom whereHelperstring DeliveredTo whereHelperstring UpdateStatusAt whereHelpertime_Time Status whereHelperstring CreatedAt whereHelpertime_Time UpdatedAt whereHelpertime_Time }{ ID: whereHelperstring{/* contains filtered or unexported fields */}, EmailSubject: whereHelperstring{/* contains filtered or unexported fields */}, EmailBody: whereHelperstring{/* contains filtered or unexported fields */}, TeamID: whereHelperstring{/* contains filtered or unexported fields */}, DateTo: whereHelperstring{/* contains filtered or unexported fields */}, DateFrom: whereHelperstring{/* contains filtered or unexported fields */}, DeliveredTo: whereHelperstring{/* contains filtered or unexported fields */}, UpdateStatusAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, Status: whereHelperstring{/* contains filtered or unexported fields */}, CreatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, UpdatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, }
var ScanReportColumns = struct { ID string ScanID string Report string ReportJSON string EmailSubject string EmailBody string DeliveredTo string UpdateStatusAt string Status string CreatedAt string UpdatedAt string ProgramName string Risk string }{ ID: "id", ScanID: "scan_id", Report: "report", ReportJSON: "report_json", EmailSubject: "email_subject", EmailBody: "email_body", DeliveredTo: "delivered_to", UpdateStatusAt: "update_status_at", Status: "status", CreatedAt: "created_at", UpdatedAt: "updated_at", ProgramName: "program_name", Risk: "risk", }
var ScanReportRels = struct {
}{}
ScanReportRels is where relationship names are stored.
var ScanReportWhere = struct { ID whereHelperstring ScanID whereHelperstring Report whereHelperstring ReportJSON whereHelperstring EmailSubject whereHelperstring EmailBody whereHelperstring DeliveredTo whereHelperstring UpdateStatusAt whereHelpertime_Time Status whereHelperstring CreatedAt whereHelpertime_Time UpdatedAt whereHelpertime_Time ProgramName whereHelperstring Risk whereHelperint }{ ID: whereHelperstring{/* contains filtered or unexported fields */}, ScanID: whereHelperstring{/* contains filtered or unexported fields */}, Report: whereHelperstring{/* contains filtered or unexported fields */}, ReportJSON: whereHelperstring{/* contains filtered or unexported fields */}, EmailSubject: whereHelperstring{/* contains filtered or unexported fields */}, EmailBody: whereHelperstring{/* contains filtered or unexported fields */}, DeliveredTo: whereHelperstring{/* contains filtered or unexported fields */}, UpdateStatusAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, Status: whereHelperstring{/* contains filtered or unexported fields */}, CreatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, UpdatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, ProgramName: whereHelperstring{/* contains filtered or unexported fields */}, Risk: whereHelperint{/* contains filtered or unexported fields */}, }
var TableNames = struct { LiveReports string ScanReports string }{ LiveReports: "live_reports", ScanReports: "scan_reports", }
Functions ¶
func LiveReportExists ¶
LiveReportExists checks if the LiveReport row exists.
func LiveReportExistsG ¶
LiveReportExistsG checks if the LiveReport row exists.
func LiveReports ¶
LiveReports retrieves all the records using an executor.
func ScanReportExists ¶
ScanReportExists checks if the ScanReport row exists.
func ScanReportExistsG ¶
ScanReportExistsG checks if the ScanReport row exists.
func ScanReports ¶
ScanReports retrieves all the records using an executor.
Types ¶
type LiveReport ¶
type LiveReport struct { ID string `boil:"id" json:"id" toml:"id" yaml:"id"` EmailSubject string `boil:"email_subject" json:"email_subject" toml:"email_subject" yaml:"email_subject"` EmailBody string `boil:"email_body" json:"email_body" toml:"email_body" yaml:"email_body"` TeamID string `boil:"team_id" json:"team_id" toml:"team_id" yaml:"team_id"` DateTo string `boil:"date_to" json:"date_to" toml:"date_to" yaml:"date_to"` DateFrom string `boil:"date_from" json:"date_from" toml:"date_from" yaml:"date_from"` DeliveredTo string `boil:"delivered_to" json:"delivered_to" toml:"delivered_to" yaml:"delivered_to"` UpdateStatusAt time.Time `boil:"update_status_at" json:"update_status_at" toml:"update_status_at" yaml:"update_status_at"` Status string `boil:"status" json:"status" toml:"status" yaml:"status"` CreatedAt time.Time `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"` UpdatedAt time.Time `boil:"updated_at" json:"updated_at" toml:"updated_at" yaml:"updated_at"` R *liveReportR `boil:"-" json:"-" toml:"-" yaml:"-"` L liveReportL `boil:"-" json:"-" toml:"-" yaml:"-"` }
LiveReport is an object representing the database table.
func FindLiveReport ¶
func FindLiveReport(ctx context.Context, exec boil.ContextExecutor, iD string, selectCols ...string) (*LiveReport, error)
FindLiveReport retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func FindLiveReportG ¶
FindLiveReportG retrieves a single record by ID.
func (*LiveReport) Delete ¶
func (o *LiveReport) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
Delete deletes a single LiveReport record with an executor. Delete will match against the primary key column to find the record to delete.
func (*LiveReport) DeleteG ¶
func (o *LiveReport) DeleteG(ctx context.Context) (int64, error)
DeleteG deletes a single LiveReport record. DeleteG will match against the primary key column to find the record to delete.
func (*LiveReport) Insert ¶
func (o *LiveReport) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*LiveReport) InsertG ¶
InsertG a single record. See Insert for whitelist behavior description.
func (*LiveReport) Reload ¶
func (o *LiveReport) Reload(ctx context.Context, exec boil.ContextExecutor) error
Reload refetches the object from the database using the primary keys with an executor.
func (*LiveReport) ReloadG ¶
func (o *LiveReport) ReloadG(ctx context.Context) error
ReloadG refetches the object from the database using the primary keys.
func (*LiveReport) Update ¶
func (o *LiveReport) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the LiveReport. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.
func (*LiveReport) UpdateG ¶
UpdateG a single LiveReport record using the global executor. See Update for more documentation.
func (*LiveReport) Upsert ¶
func (o *LiveReport) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns) error
Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.
type LiveReportSlice ¶
type LiveReportSlice []*LiveReport
LiveReportSlice is an alias for a slice of pointers to LiveReport. This should generally be used opposed to []LiveReport.
func (LiveReportSlice) DeleteAll ¶
func (o LiveReportSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (LiveReportSlice) DeleteAllG ¶
func (o LiveReportSlice) DeleteAllG(ctx context.Context) (int64, error)
DeleteAllG deletes all rows in the slice.
func (*LiveReportSlice) ReloadAll ¶
func (o *LiveReportSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error
ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.
func (*LiveReportSlice) ReloadAllG ¶
func (o *LiveReportSlice) ReloadAllG(ctx context.Context) error
ReloadAllG refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.
func (LiveReportSlice) UpdateAll ¶
func (o LiveReportSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.
func (LiveReportSlice) UpdateAllG ¶
UpdateAllG updates all rows with the specified column values.
type LiveReportsRepository ¶
type LiveReportsRepository struct {
// contains filtered or unexported fields
}
func (*LiveReportsRepository) GetReportByTeamAndDateRange ¶
func (r *LiveReportsRepository) GetReportByTeamAndDateRange(ctx context.Context, teamID string, dateFrom string, dateTo string) (*model.LiveReport, error)
func (*LiveReportsRepository) Insert ¶
func (r *LiveReportsRepository) Insert(ctx context.Context, report *model.LiveReport) error
func (*LiveReportsRepository) SaveReport ¶
func (*LiveReportsRepository) Update ¶
func (r *LiveReportsRepository) Update(ctx context.Context, report *model.LiveReport) error
type M ¶
type M map[string]interface{}
M type is for providing columns and column values to UpdateAll.
type ReportsRepository ¶
type ReportsRepository interface { GetReport(ctx context.Context, reportID string) (model.Report, error) SaveReport(ctx context.Context, report model.Report) error }
ReportsRepository represents the abstraction for a generic report repository.
func NewReportsRepository ¶
func NewReportsRepository(typ string, db *sql.DB) (ReportsRepository, error)
NewReportsRepository builds and returns a new ReportsRepository for the specified type.
type ScanReport ¶
type ScanReport struct { ID string `boil:"id" json:"id" toml:"id" yaml:"id"` ScanID string `boil:"scan_id" json:"scan_id" toml:"scan_id" yaml:"scan_id"` Report string `boil:"report" json:"report" toml:"report" yaml:"report"` ReportJSON string `boil:"report_json" json:"report_json" toml:"report_json" yaml:"report_json"` EmailSubject string `boil:"email_subject" json:"email_subject" toml:"email_subject" yaml:"email_subject"` EmailBody string `boil:"email_body" json:"email_body" toml:"email_body" yaml:"email_body"` DeliveredTo string `boil:"delivered_to" json:"delivered_to" toml:"delivered_to" yaml:"delivered_to"` UpdateStatusAt time.Time `boil:"update_status_at" json:"update_status_at" toml:"update_status_at" yaml:"update_status_at"` Status string `boil:"status" json:"status" toml:"status" yaml:"status"` CreatedAt time.Time `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"` UpdatedAt time.Time `boil:"updated_at" json:"updated_at" toml:"updated_at" yaml:"updated_at"` ProgramName string `boil:"program_name" json:"program_name" toml:"program_name" yaml:"program_name"` Risk int `boil:"risk" json:"risk" toml:"risk" yaml:"risk"` R *scanReportR `boil:"-" json:"-" toml:"-" yaml:"-"` L scanReportL `boil:"-" json:"-" toml:"-" yaml:"-"` }
ScanReport is an object representing the database table.
func FindScanReport ¶
func FindScanReport(ctx context.Context, exec boil.ContextExecutor, iD string, selectCols ...string) (*ScanReport, error)
FindScanReport retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func FindScanReportG ¶
FindScanReportG retrieves a single record by ID.
func (*ScanReport) Delete ¶
func (o *ScanReport) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
Delete deletes a single ScanReport record with an executor. Delete will match against the primary key column to find the record to delete.
func (*ScanReport) DeleteG ¶
func (o *ScanReport) DeleteG(ctx context.Context) (int64, error)
DeleteG deletes a single ScanReport record. DeleteG will match against the primary key column to find the record to delete.
func (*ScanReport) Insert ¶
func (o *ScanReport) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*ScanReport) InsertG ¶
InsertG a single record. See Insert for whitelist behavior description.
func (*ScanReport) Reload ¶
func (o *ScanReport) Reload(ctx context.Context, exec boil.ContextExecutor) error
Reload refetches the object from the database using the primary keys with an executor.
func (*ScanReport) ReloadG ¶
func (o *ScanReport) ReloadG(ctx context.Context) error
ReloadG refetches the object from the database using the primary keys.
func (*ScanReport) Update ¶
func (o *ScanReport) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the ScanReport. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.
func (*ScanReport) UpdateG ¶
UpdateG a single ScanReport record using the global executor. See Update for more documentation.
func (*ScanReport) Upsert ¶
func (o *ScanReport) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns) error
Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.
type ScanReportSlice ¶
type ScanReportSlice []*ScanReport
ScanReportSlice is an alias for a slice of pointers to ScanReport. This should generally be used opposed to []ScanReport.
func (ScanReportSlice) DeleteAll ¶
func (o ScanReportSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (ScanReportSlice) DeleteAllG ¶
func (o ScanReportSlice) DeleteAllG(ctx context.Context) (int64, error)
DeleteAllG deletes all rows in the slice.
func (*ScanReportSlice) ReloadAll ¶
func (o *ScanReportSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error
ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.
func (*ScanReportSlice) ReloadAllG ¶
func (o *ScanReportSlice) ReloadAllG(ctx context.Context) error
ReloadAllG refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.
func (ScanReportSlice) UpdateAll ¶
func (o ScanReportSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.
func (ScanReportSlice) UpdateAllG ¶
UpdateAllG updates all rows with the specified column values.