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: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Datastore

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

func NewSql

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

type Message

type Message interface {
	ListByIds(ctx context.Context, appId string, ids []string) ([]entities.Message, error)
	GetByIds(ctx context.Context, appId string, ids []string) ([]entities.Message, error)
	Scan(ctx context.Context, appId string, query *entities.ScanningQuery) ([]entities.Message, error)
	Get(ctx context.Context, appId, id string) (*entities.Message, error)
}

type MessageRequestMaps

type MessageRequestMaps struct {
	Maps   map[string][]entities.Request
	MsgIds []string
}

type MessageResponsetMaps

type MessageResponsetMaps struct {
	Maps    map[string][]entities.Response
	Success map[string]string
}

type Request

type Request interface {
	ScanMessages(ctx context.Context, epId string, query *entities.ScanningQuery) (*MessageRequestMaps, error)
	GetMessage(ctx context.Context, epId, msgId string) (*MessageRequestMaps, error)
	Scan(ctx context.Context, epId string, query *entities.ScanningQuery) ([]entities.Request, error)
}

type Response

type Response interface {
	ListMessages(ctx context.Context, epId string, msgIds []string) (*MessageResponsetMaps, error)
	GetMessages(ctx context.Context, epId string, msgIds []string) (*MessageResponsetMaps, error)
}

type SqlMessage

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

func (*SqlMessage) Get

func (sql *SqlMessage) Get(ctx context.Context, appId, id string) (*entities.Message, error)

func (*SqlMessage) GetByIds

func (sql *SqlMessage) GetByIds(ctx context.Context, appId string, ids []string) ([]entities.Message, error)

func (*SqlMessage) ListByIds

func (sql *SqlMessage) ListByIds(ctx context.Context, appId string, ids []string) ([]entities.Message, error)

func (*SqlMessage) Scan

func (sql *SqlMessage) Scan(ctx context.Context, appId string, query *entities.ScanningQuery) ([]entities.Message, error)

type SqlRequest

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

func (*SqlRequest) GetMessage

func (sql *SqlRequest) GetMessage(ctx context.Context, epId, msgId string) (*MessageRequestMaps, error)

func (*SqlRequest) Scan

func (sql *SqlRequest) Scan(ctx context.Context, epId string, query *entities.ScanningQuery) ([]entities.Request, error)

func (*SqlRequest) ScanMessages

func (sql *SqlRequest) ScanMessages(ctx context.Context, epId string, query *entities.ScanningQuery) (*MessageRequestMaps, error)

type SqlResponse

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

func (*SqlResponse) GetMessages

func (sql *SqlResponse) GetMessages(ctx context.Context, epId string, msgIds []string) (*MessageResponsetMaps, error)

func (*SqlResponse) ListMessages

func (sql *SqlResponse) ListMessages(ctx context.Context, epId string, msgIds []string) (*MessageResponsetMaps, error)

Jump to

Keyboard shortcuts

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