ds

package
v0.0.0-...-d386c04 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2024 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attempt

type Attempt interface {
	Scan(ctx context.Context, query *entities.ScanningQuery, next int64, count int) chan *entities.ScanningResult[[]entities.Attempt]
	ListRequests(ctx context.Context, attempts map[string]*entities.Attempt) (map[string]*entities.Request, error)
	Update(ctx context.Context, updates map[string]*entities.AttemptState) map[string]error
}

type Datastore

type Datastore interface {
	Request() Request
	Response() Response
	Attempt() Attempt
}

func NewSql

func NewSql(logger logging.Logger, ds datastore.Datastore) Datastore

type Request

type Request interface {
	Scan(ctx context.Context, epId string, query *entities.ScanningQuery) chan *entities.ScanningResult[[]entities.Request]
}

type Response

type Response interface {
	Check(ctx context.Context, epId string, msgIds []string) (map[string][]int, error)
}

type SqlAttempt

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

func (*SqlAttempt) ListRequests

func (sql *SqlAttempt) ListRequests(ctx context.Context, attempts map[string]*entities.Attempt) (map[string]*entities.Request, error)

func (*SqlAttempt) Scan

func (sql *SqlAttempt) Scan(ctx context.Context, query *entities.ScanningQuery, next int64, count int) chan *entities.ScanningResult[[]entities.Attempt]

func (*SqlAttempt) Update

func (sql *SqlAttempt) Update(ctx context.Context, updates map[string]*entities.AttemptState) map[string]error

type SqlRequest

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

func (*SqlRequest) Scan

type SqlResponse

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

func (*SqlResponse) Check

func (sql *SqlResponse) Check(ctx context.Context, epId string, msgIds []string) (map[string][]int, error)

Jump to

Keyboard shortcuts

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