svc

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2025 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Version is the version of the service.
	Version = "devel"
	// CommitHash is the commit hash of the service.
	CommitHash = ""
)
View Source
const (
	// MinimalRetrievedMissingCandlesticks is the minimal quantity of candlesticks
	// that will be retrieved in case of miss. It will avoid too many request on
	// candlesticks if few candlesticks are requested regularly.
	MinimalRetrievedMissingCandlesticks = 100
)

Variables

View Source
var (
	// ErrCandlesticksWorkflow is returned when an error occurs in the candlesticks workflow.
	ErrCandlesticksWorkflow = errors.New("error during candlesticks workflow")
	// ErrNoExchange is returned when no exchange is found.
	ErrNoExchange = fmt.Errorf("%w: no exchange", ErrCandlesticksWorkflow)
	// ErrNoPair is returned when no pair is found.
	ErrNoPair = fmt.Errorf("%w: no pair", ErrCandlesticksWorkflow)
	// ErrNoPeriod is returned when no period is found.
	ErrNoPeriod = fmt.Errorf("%w: no period", ErrCandlesticksWorkflow)
)

Functions

func ServiceInfoWorkflow

func ServiceInfoWorkflow(_ workflow.Context, _ api.ServiceInfoParams) (api.ServiceInfoResults, error)

ServiceInfoWorkflow returns the service information.

Types

type Candlesticks

type Candlesticks interface {
	Register(w worker.Worker)

	ListCandlesticksWorkflow(
		ctx workflow.Context,
		params api.ListCandlesticksWorkflowParams,
	) (api.ListCandlesticksWorkflowResults, error)
}

Candlesticks is the interface that describe the candlesticks workflows.

func New

func New(db db.DB, exchanges exchanges.Exchanges) Candlesticks

New creates a new candlesticks workflows.

Directories

Path Synopsis
db
Package db is a generated GoMock package.
Package db is a generated GoMock package.
sql
Package exchanges is a generated GoMock package.
Package exchanges is a generated GoMock package.

Jump to

Keyboard shortcuts

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