application

package
v0.0.0-...-0c5fcc7 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const OutOfService string = "OUT_OF_SERVICE"

Variables

This section is empty.

Functions

func HttpPost

func HttpPost(ctx context.Context, url string, b []byte) error

Types

type App

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

func New

func New(bigBellyApiUrl string, xToken string, diwiseApiUrl string) App

func (*App) GetAssets

func (a *App) GetAssets(ctx context.Context) ([]domain.Asset, error)

func (*App) MapToFillingLevels

func (a *App) MapToFillingLevels(ctx context.Context, assets []domain.Asset) ([]domain.FillingLevel, error)

func (*App) Send

func (a *App) Send(ctx context.Context, fillingLevels []domain.FillingLevel, sender SenderFunc) error

type BigBellyResponse

type BigBellyResponse struct {
	Assets    []domain.Asset `json:"assets"`
	ErrorCode string         `json:"errorCode"`
}

type SenderFunc

type SenderFunc = func(context.Context, string, []byte) error

Jump to

Keyboard shortcuts

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