advantages

package
v0.0.0-...-7c18459 Latest Latest
Warning

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

Go to latest
Published: May 18, 2021 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandlerV1

func HandlerV1(response http.ResponseWriter, request *http.Request)

func HandlerV2

func HandlerV2(response http.ResponseWriter, request *http.Request)

func HandlerV3

func HandlerV3(response http.ResponseWriter, request *http.Request)

func Usage

func Usage()

func WriteLog

func WriteLog(writer io.Writer, message string) error

Types

type Animal

type Animal struct {
	Type string
	Name string
}

type AuthenticatedLoader

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

AuthenticatedLoader will load orders for based on the supplied owner

type LoadOrderHandler

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

LoadOrderHandler is a HTTP handler that loads orders based on the current user and supplied user ID

func NewLoadOrderHandler

func NewLoadOrderHandler(loader OrderLoader) *LoadOrderHandler

NewLoadOrderHandler creates a new instance of LoadOrderHandler

func (*LoadOrderHandler) ServeHTTP

func (l *LoadOrderHandler) ServeHTTP(response http.ResponseWriter, request *http.Request)

ServeHTTP implements http.Handler

type Order

type Order struct {
	OwnerID int
}

type OrderLoader

type OrderLoader interface {
	// contains filtered or unexported methods
}

Loads orders based on supplied owner and order ID

type Owner

type Owner interface {
	ID() int
}

type User

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

func (*User) ID

func (u *User) ID() int

Jump to

Keyboard shortcuts

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