queries

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attachment

type Attachment struct {
	ID        int64
	MessageID sql.NullInt64
	Name      string
	Mime      string
	Extension string
}

type DBTX

type DBTX interface {
	ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
	PrepareContext(context.Context, string) (*sql.Stmt, error)
	QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
	QueryRowContext(context.Context, string, ...interface{}) *sql.Row
}

type DeleteEnvelopeUntilCountParams

type DeleteEnvelopeUntilCountParams struct {
	Limit     int64
	CreatedAt time.Time
}

type Endpoint

type Endpoint struct {
	ID                int64
	Internal          bool
	InternalID        string
	Name              string
	AttachmentDisable bool
	TextDisable       bool
	BodyTemplate      string
	Kind              string
	Config            interface{}
	UpdatedAt         time.Time
	CreatedAt         time.Time
}

type Message

type Message struct {
	ID        int64
	From      string
	To        interface{}
	Subject   string
	Text      string
	Html      string
	Date      time.Time
	CreatedAt time.Time
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) DeleteEnvelopeOlderThan

func (q *Queries) DeleteEnvelopeOlderThan(ctx context.Context, createdAt time.Time) (int64, error)

func (*Queries) DeleteEnvelopeUntilCount

func (q *Queries) DeleteEnvelopeUntilCount(ctx context.Context, arg DeleteEnvelopeUntilCountParams) (int64, error)

func (*Queries) GetEnvelopeMessageHTML

func (q *Queries) GetEnvelopeMessageHTML(ctx context.Context, id int64) (string, error)

func (*Queries) IsRuleInternal

func (q *Queries) IsRuleInternal(ctx context.Context, id int64) (bool, error)

func (*Queries) UpsertInternalEndpoint

func (q *Queries) UpsertInternalEndpoint(ctx context.Context, arg UpsertInternalEndpointParams) error

autocmd BufWritePost query.sql !sqlc generate

func (*Queries) UpsertInternalRule

func (q *Queries) UpsertInternalRule(ctx context.Context, arg UpsertInternalRuleParams) error

func (*Queries) UpsertInternalRuleToEndpoint

func (q *Queries) UpsertInternalRuleToEndpoint(ctx context.Context, arg UpsertInternalRuleToEndpointParams) (int64, error)

func (*Queries) WithTx

func (q *Queries) WithTx(tx *sql.Tx) *Queries

type Rule

type Rule struct {
	ID         int64
	Internal   bool
	InternalID string
	Name       string
	Expression string
	Enable     bool
	UpdatedAt  time.Time
	CreatedAt  time.Time
}

type RulesToEndpoint

type RulesToEndpoint struct {
	Internal   bool
	RuleID     int64
	EndpointID string
	UpdatedAt  time.Time
	CreatedAt  time.Time
}

type UpsertInternalEndpointParams

type UpsertInternalEndpointParams struct {
	InternalID        string
	Name              string
	AttachmentDisable bool
	TextDisable       bool
	BodyTemplate      string
	Kind              string
	Config            interface{}
	UpdatedAt         time.Time
}

type UpsertInternalRuleParams

type UpsertInternalRuleParams struct {
	InternalID string
	Name       string
	Expression string
	UpdatedAt  time.Time
	Enable     bool
}

type UpsertInternalRuleToEndpointParams

type UpsertInternalRuleToEndpointParams struct {
	UpdatedAt    time.Time
	InternalID   string
	InternalID_2 string
}

Jump to

Keyboard shortcuts

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