resource

package
v0.0.0-...-be2bf4a Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2017 License: Apache-2.0 Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterCheckFunc

func RegisterCheckFunc(checkFunc CheckFunc)

func RegisterInFunc

func RegisterInFunc(inFunc InFunc)

func RegisterOutFunc

func RegisterOutFunc(outFunc OutFunc)

func RunCheck

func RunCheck(reqReader io.Reader, respWriter io.Writer, checkFunc CheckFunc) error

func RunCheckMain

func RunCheckMain(checkFunc CheckFunc) error

func RunIn

func RunIn(reqReader io.Reader, respWriter io.Writer, targetDir string, inFunc InFunc) error

func RunInMain

func RunInMain(inFunc InFunc) error

func RunMain

func RunMain() error

func RunMainExit

func RunMainExit()

func RunOut

func RunOut(reqReader io.Reader, respWriter io.Writer, targetDir string, outFunc OutFunc) error

func RunOutMain

func RunOutMain(outFunc OutFunc) error

func TestCheckFunc

func TestCheckFunc(t *testing.T, request interface{}, response interface{}, checkFunc CheckFunc) error

func TestInFunc

func TestInFunc(t *testing.T, request interface{}, response interface{}, targetDir string, inFunc InFunc) error

func TestOutFunc

func TestOutFunc(t *testing.T, request interface{}, response interface{}, targetDir string, outFunc OutFunc) error

Types

type CheckFunc

type CheckFunc func(req CheckRequest) error

type CheckRequest

type CheckRequest interface {
	Decode(source interface{}, version interface{}) error
	AddResponseVersion(version interface{})
}

type InFunc

type InFunc func(req InRequest) error

type InRequest

type InRequest interface {
	ResourceRequest
	Decode(source interface{}, version interface{}, params interface{}) error
}

type MainRunner

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

func (MainRunner) RunMain

func (r MainRunner) RunMain() error

func (*MainRunner) SetCheckFunc

func (r *MainRunner) SetCheckFunc(checkFunc CheckFunc)

func (*MainRunner) SetInFunc

func (r *MainRunner) SetInFunc(inFunc InFunc)

func (*MainRunner) SetOutFunc

func (r *MainRunner) SetOutFunc(outFunc OutFunc)

type MetadataField

type MetadataField struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type OutFunc

type OutFunc func(req OutRequest) error

type OutRequest

type OutRequest interface {
	ResourceRequest
	Decode(source interface{}, params interface{}) error
}

type ResourceRequest

type ResourceRequest interface {
	TargetDir() string
	ChdirTargetDir() error

	SetResponseVersion(version interface{})
	AddResponseMetadata(key, value string)
}

Jump to

Keyboard shortcuts

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