svc

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2024 License: Unlicense Imports: 4 Imported by: 0

Documentation

Overview

Package svc demonstrates a client service layer built with giant

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CivilTime

type CivilTime time.Time

func (*CivilTime) Fmt

func (ct *CivilTime) Fmt() string

func (CivilTime) MarshalJSON

func (ct CivilTime) MarshalJSON() (data []byte, err error)

func (*CivilTime) UnmarshalJSON

func (ct *CivilTime) UnmarshalJSON(data []byte) (err error)

type Client

type Client interface {
	SendObject(ctx context.Context, method, path string, snd, rcv any) (err error)
}

type Hourly

type Hourly struct {
	Time     []CivilTime `json:"time"`
	Temp     []float64   `json:"temperature_2m"`
	Humidity []int       `json:"relativehumidity_2m"`
	Wind     []float64   `json:"windspeed_10m"`
}

func (*Hourly) Print

func (hourly *Hourly) Print()

type Svc

type Svc struct {
	Client Client
}

func (*Svc) GetHourly

func (svc *Svc) GetHourly(ctx context.Context, lat, lon float64) (hourly Hourly, err error)

Jump to

Keyboard shortcuts

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