ocp

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: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildOutputOCPFail

func BuildOutputOCPFail(response http.ResponseWriter, format string, person Person)

func BuildOutputOCPSuccess

func BuildOutputOCPSuccess(response http.ResponseWriter, formatter PersonFormatter, person Person)

func DeleteUserHandlerV1

func DeleteUserHandlerV1(resp http.ResponseWriter, req *http.Request)

func DeleteUserHandlerV2

func DeleteUserHandlerV2(resp http.ResponseWriter, req *http.Request)

func GetUserHandlerV1

func GetUserHandlerV1(resp http.ResponseWriter, req *http.Request)

func GetUserHandlerV2

func GetUserHandlerV2(resp http.ResponseWriter, req *http.Request)

Types

type CSVPersonFormatter

type CSVPersonFormatter struct{}

output the person as CSV

func (*CSVPersonFormatter) Format

func (c *CSVPersonFormatter) Format(writer io.Writer, person Person) error

Format implements the PersonFormatter interface

type JSONPersonFormatter

type JSONPersonFormatter struct{}

output the person as JSON

func (*JSONPersonFormatter) Format

func (j *JSONPersonFormatter) Format(writer io.Writer, person Person) error

Format implements the PersonFormatter interface

type LoadAll

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

type LoadPerson

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

func (*LoadPerson) All

func (loader *LoadPerson) All() ([]Person, error)

func (*LoadPerson) ByID

func (loader *LoadPerson) ByID(id int) (Person, error)

type Person

type Person struct {
	Name  string
	Email string
}

A data transfer object that represents a person

type PersonFormatter

type PersonFormatter interface {
	Format(writer io.Writer, person Person) error
}

Jump to

Keyboard shortcuts

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