repo

package
v0.13.2 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2023 License: MIT Imports: 11 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 AttachmentRemove

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

AttachmentRemove should only be called when it's MessageID is null and the associated file has been deleted from the FileStore.

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 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

Jump to

Keyboard shortcuts

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