handlers

package
v0.0.0-...-9d7f1dd Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConstructAPIURL

func ConstructAPIURL() (string, error)

ConstructAPIURL constructs the URL to fetch exchange rates.

func FetchExchangeRateData

func FetchExchangeRateData(apiURL string) ([]models.CurrencyInfo, error)

FetchExchangeRateData fetches the exchange rate data and returns it.

func RatesHandler

func RatesHandler(w http.ResponseWriter, r *http.Request)

RatesHandler handles requests for the /rates route.

func SubscribeHandler

func SubscribeHandler(w http.ResponseWriter, r *http.Request)

Types

type EmailRequest

type EmailRequest struct {
	Email string `json:"email"`
}

EmailRequest represents the JSON structure for the email request

Jump to

Keyboard shortcuts

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