Documentation
¶
Index ¶
- type Postgresql
- func (h *Postgresql) Initialize(ctx context.Context) (err error)
- func (h *Postgresql) ReadReport(ctx context.Context, id int64) (rs dmarc.Rows, err error)
- func (h *Postgresql) ReadReports(ctx context.Context, offset int, pagesize int) (rs []dmarc.Report, err error)
- func (h *Postgresql) Write(ctx context.Context, f dmarc.Feedback) (err error)
- type Storage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Postgresql ¶
type Postgresql struct { URL string // contains filtered or unexported fields }
Postgresql storage
func (*Postgresql) Initialize ¶
func (h *Postgresql) Initialize(ctx context.Context) (err error)
Initialize creates the tables
func (*Postgresql) ReadReport ¶
ReadReport fetches a report
func (*Postgresql) ReadReports ¶
func (h *Postgresql) ReadReports(ctx context.Context, offset int, pagesize int) (rs []dmarc.Report, err error)
ReadReports fetches the list of reports paginated
type Storage ¶
type Storage interface { Initialize(ctx context.Context) error Write(ctx context.Context, f dmarc.Feedback) error ReadReports(ctx context.Context, offset int, pagesize int) ([]dmarc.Report, error) ReadReport(ctx context.Context, id int64) (dmarc.Rows, error) }
Storage is the interface type so we can use different drivers TODO: The name storage.Storage is redundant
Click to show internal directories.
Click to hide internal directories.