modifier

package
v0.0.0-...-b7d53eb Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewOPVBodyModifierFromJSON

func NewOPVBodyModifierFromJSON(b []byte) (*parse.Result, error)

Types

type OPVBodyModifier

type OPVBodyModifier struct {
	Scope []parse.ModifierType  `json:"scope" validate:"gt=0,dive,oneof=request response"`
	Items []OPVBodyModifierItem `json:"items"`

	OPVDataplaneGrantToken        string `json:"-" validate:"required"`
	OPVDataplaneGrantTokenFromEnv string `json:"opv_dataplane_grant_token_from_env"`
	OPVDataplaneBaseURL           string `json:"opv_dataplane_base_url"`
}

func (*OPVBodyModifier) ModifyRequest

func (o *OPVBodyModifier) ModifyRequest(req *http.Request) error

func (*OPVBodyModifier) ModifyResponse

func (o *OPVBodyModifier) ModifyResponse(res *http.Response) error

func (*OPVBodyModifier) Render

func (o *OPVBodyModifier) Render(contentType string, body io.Reader) ([]byte, error)

type OPVBodyModifierItem

type OPVBodyModifierItem struct {
	JSONPointerPath string `json:"json_pointer_path" validate:"required"`
	FactTypeSlug    string `json:"fact_type_slug" validate:"required"`
	Action          string `json:"action" validate:"required,oneof=tokenize detokenize"`
}

Jump to

Keyboard shortcuts

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