policy

package
v0.0.0-...-0490640 Latest Latest
Warning

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

Go to latest
Published: May 16, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExpandParameterizedResource

func ExpandParameterizedResource(s string, mapping func(string) string) string

func GetInfoMap

func GetInfoMap() map[string]pairs.Info

GetInfoMap returns a map of API method names to method metadata.

func InfoForMethod

func InfoForMethod(methodName string, in interface{}) *pairs.Info

InfoForMethod retrieves metadata for an API method. The second parameter is used to fill in a placeholder in the resource (though not all resources will have placeholders).

func MapMethodTo

func MapMethodTo(methodName, resource, action, httpMethod, httpEndpoint string, expandFunc ExpansionFunc)

MapMethodTo records details about API methods at startup in a central repository to allow convenient access via InfoForMethod.

func Reset

func Reset()

Reset initializes the state of Policy. This may not be needed other than for unit tests, but is vital for that purpose to be able to start with a clean slate for each test.

Types

type ExpansionFunc

type ExpansionFunc func(pat string, req interface{}) string

ExpansionFunc dictates how a parameter is filled in to a resource placeholder.

Jump to

Keyboard shortcuts

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