db

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2023 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EndpointGet

func EndpointGet(cc *core.Context, id int64) (endpoints.Endpoint, error)

func EndpointList

func EndpointList(cc *core.Context) ([]endpoints.Endpoint, error)

func EndpointListByRule

func EndpointListByRule(cc *core.Context, id int64) ([]endpoints.Endpoint, error)

func EnvelopeAttachmentCount

func EnvelopeAttachmentCount(cc *core.Context) (int, error)

func EnvelopeAttachmentDelete

func EnvelopeAttachmentDelete(cc *core.Context, att *envelope.Attachment) error

func EnvelopeAttachmentListOrphan

func EnvelopeAttachmentListOrphan(cc *core.Context, limit int) ([]*envelope.Attachment, error)

func EnvelopeCount

func EnvelopeCount(cc *core.Context) (int, error)

func EnvelopeCreate

func EnvelopeCreate(cc *core.Context, msg *envelope.Message, atts []*envelope.Attachment) (int64, []int64, error)

func EnvelopeDelete

func EnvelopeDelete(cc *core.Context, id int64) error

func EnvelopeDeleteAll

func EnvelopeDeleteAll(cc *core.Context) error

func EnvelopeDeleteOlderThan

func EnvelopeDeleteOlderThan(cc *core.Context, olderThan time.Time) (int64, error)

func EnvelopeDeleteUntilCount

func EnvelopeDeleteUntilCount(cc *core.Context, keep int, olderThan time.Time) (int64, error)

func EnvelopeGet

func EnvelopeGet(cc *core.Context, id int64) (envelope.Envelope, error)

func EnvelopeMessageHTMLGet

func EnvelopeMessageHTMLGet(cc *core.Context, id int64) (string, error)

func InternalDeleteOlderThan

func InternalDeleteOlderThan(cc *core.Context, date time.Time) error

func InternalEndpointUpsert

func InternalEndpointUpsert(cc *core.Context, end endpoints.Endpoint, updatedAt time.Time) error

func InternalRuleEndpointsUpsert

func InternalRuleEndpointsUpsert(cc *core.Context, ruleInternalID string, endpointInternalIDs []string, updatedAt time.Time) error

func InternalRuleUpsert

func InternalRuleUpsert(cc *core.Context, r rules.Rule, updatedAt time.Time) error

func Migrate

func Migrate(cc context.Context, bunDB *bun.DB) error

func New

func New(dbPath string) (*bun.DB, error)

func RuleEndpointList

func RuleEndpointList(cc *core.Context, ruleID int64) ([]rules.Endpoint, error)

func RuleIsInternal

func RuleIsInternal(cc *core.Context, ruleID int64) (bool, error)

func RuleList

func RuleList(cc *core.Context) ([]rules.Rule, error)

func RuleListEnable

func RuleListEnable(cc *core.Context) ([]rules.Rule, error)

func RuleUpdate

func RuleUpdate(cc *core.Context, ruleID int64, enable bool) (rules.Rule, error)

func Size

func Size(cc *core.Context) (int64, error)

func Vacuum

func Vacuum(cc *core.Context) error

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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