services

package
v0.0.0-...-f015c5b Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init()

func SendTask

func SendTask(proofOfTask string, data string, taskDefinitionId int)

Types

type CustomError

type CustomError struct {
	Error   bool        `json:"error"`
	Message string      `json:"message"`
	Data    interface{} `json:"data"`
}

CustomError struct to represent an error response

func NewCustomError

func NewCustomError(message string, data interface{}) CustomError

NewCustomError creates a new instance of CustomError

type CustomResponse

type CustomResponse struct {
	Data    interface{} `json:"data"`
	Error   bool        `json:"error"`
	Message string      `json:"message"`
}

CustomResponse struct to represent a successful response

func NewCustomResponse

func NewCustomResponse(data interface{}, message string) CustomResponse

NewCustomResponse creates a new instance of CustomResponse

type Params

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

type PriceResponse

type PriceResponse struct {
	Symbol string `json:"symbol"`
	Price  string `json:"price"`
}

func GetPrice

func GetPrice(pair string) (*PriceResponse, error)

Jump to

Keyboard shortcuts

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