repo

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoRows = qrm.ErrNoRows

Functions

func AttachmentCount

func AttachmentCount(ctx context.Context, db database.Querier) (int, error)

func AttachmentGet

func AttachmentGet(ctx context.Context, db database.Querier, id int64) (models.Attachment, error)

func AttachmentListByMessage

func AttachmentListByMessage(ctx context.Context, db database.Querier, messageID int64) ([]models.Attachment, error)

func AttachmentListOrphan

func AttachmentListOrphan(ctx context.Context, db database.Querier, limit int) ([]models.Attachment, error)

func AttachmentRemoveOrphan added in v0.14.0

func AttachmentRemoveOrphan(ctx context.Context, db database.Querier, id int64) error

AttachmentRemoveOrphan should only be called after the associated file has been deleted from the FileStore.

func EndpointCreate added in v0.14.0

func EndpointCreate(ctx context.Context, db database.Querier, end models.Endpoint) (int64, error)

func EndpointDelete

func EndpointDelete(ctx context.Context, db database.Querier, id int64) error

func EndpointGet

func EndpointGet(ctx context.Context, db database.Querier, id int64) (models.Endpoint, error)

func EndpointList

func EndpointList(ctx context.Context, db database.Querier) ([]models.Endpoint, error)

func EndpointUpdate added in v0.14.0

func EndpointUpdate(ctx context.Context, db database.Querier, end models.Endpoint) error

func EnvelopeCount

func EnvelopeCount(ctx context.Context, db database.Querier) (int, error)

func EnvelopeCreate

func EnvelopeCreate(ctx context.Context, db database.Querier, msg models.Message, atts []models.Attachment) (int64, error)

func EnvelopeDelete

func EnvelopeDelete(ctx context.Context, db database.Querier, id int64) error

func EnvelopeDrop

func EnvelopeDrop(ctx context.Context, db database.Querier) (int64, error)

func EnvelopeGet

func EnvelopeGet(ctx context.Context, db database.Querier, id int64) (models.Envelope, error)

func EnvelopeTrim

func EnvelopeTrim(ctx context.Context, db database.Querier, age time.Time, keep int) (int64, error)

func InternalSync

func InternalSync(
	ctx context.Context,
	db database.Querier,
	endpoints []models.Endpoint,
	rules []models.Rule,
	ruleToEndpoints map[string][]string,
) error

func MailmanDequeue

func MailmanDequeue(ctx context.Context, db database.Querier) (int64, error)

func MailmanEnqueue

func MailmanEnqueue(ctx context.Context, db database.Querier, envelopeID int64) error

func MessageGet

func MessageGet(ctx context.Context, db database.Querier, id int64) (models.Message, error)

func MessageHTMLGet

func MessageHTMLGet(ctx context.Context, db database.Querier, id int64) (string, error)

func RuleCreate

func RuleCreate(ctx context.Context, db database.Querier, rule models.Rule, endpoints []int64) (int64, error)

func RuleDelete

func RuleDelete(ctx context.Context, db database.Querier, id int64) error

func RuleEndpointsGet

func RuleEndpointsGet(ctx context.Context, db database.Querier, id int64) (models.RuleEndpoints, error)

func RuleEndpointsList

func RuleEndpointsList(ctx context.Context, db database.Querier) ([]models.RuleEndpoints, error)

func RuleEndpointsSet

func RuleEndpointsSet(ctx context.Context, db database.Querier, ruleID int64, endpointIDs []int64) error

func RuleGet

func RuleGet(ctx context.Context, db database.Querier, id int64) (models.Rule, error)

func RuleList

func RuleList(ctx context.Context, db database.Querier) ([]models.Rule, error)

func RuleUpdate

func RuleUpdate(ctx context.Context, db database.Querier, rule models.Rule) error

func Size

func Size(ctx context.Context, db database.Querier) (int64, error)

func TraceCreate

func TraceCreate(ctx context.Context, db database.Querier, r models.Trace) (int64, error)

func TraceDrop

func TraceDrop(ctx context.Context, db database.Querier) (int64, error)

func TraceTrim

func TraceTrim(ctx context.Context, db database.Querier, age time.Time) (int64, error)

func Vacuum

func Vacuum(ctx context.Context, db database.Querier) error

Types

type TraceStore

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

func NewTraceStore

func NewTraceStore(db database.Querier) TraceStore

func (TraceStore) Save

func (r TraceStore) Save(ctx context.Context, trace models.Trace) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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