handlers

package
v0.0.0-...-3e14ff0 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clone

func Clone[T any](inCh chan T, size int) <-chan <-chan T

func ExtractPageAfter

func ExtractPageAfter(inputURL string) (string, error)

Types

type AccountHandler

type AccountHandler struct {
	*BaseHandler
}

func NewAccountHandler

func NewAccountHandler(log *log.Logger, upclient *upclient.APIClient, auth context.Context) *AccountHandler

func (*AccountHandler) Get

func (*AccountHandler) GetAccounts

func (h *AccountHandler) GetAccounts(accountChannel chan upclient.AccountResource, ownershipType upclient.OwnershipTypeEnum)

func (*AccountHandler) Post

type BaseHandler

type BaseHandler struct {
	Uri         string
	Log         *log.Logger
	UpClient    *upclient.APIClient
	UpAuth      context.Context
	Handler     Handler // Embed the Handler interface
	MaxPageSize int32
}

func (*BaseHandler) ServeHTTP

func (h *BaseHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Handler

type Handler interface {
	Post(w http.ResponseWriter, r *http.Request)
	Get(w http.ResponseWriter, r *http.Request)
}

type StaticFileHandler

type StaticFileHandler struct {
	*BaseHandler
}

func NewStaticFileHandler

func NewStaticFileHandler(log *log.Logger) *StaticFileHandler

func (*StaticFileHandler) Get

func (*StaticFileHandler) Post

type TransactionsCsvHandler

type TransactionsCsvHandler struct {
	*BaseHandler
	*TransactionsHandler
}

func NewTransactionCsvHandler

func NewTransactionCsvHandler(log *log.Logger, upclient *upclient.APIClient, auth context.Context, transactionsHandler *TransactionsHandler) *TransactionsCsvHandler

func (*TransactionsCsvHandler) Get

func (*TransactionsCsvHandler) Post

type TransactionsHandler

type TransactionsHandler struct {
	*BaseHandler
	*AccountHandler
}

func NewTransactionHandler

func NewTransactionHandler(log *log.Logger, upclient *upclient.APIClient, auth context.Context, accountHandler *AccountHandler) *TransactionsHandler

func (*TransactionsHandler) Get

func (*TransactionsHandler) Post

Jump to

Keyboard shortcuts

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