modifier

package
v0.0.0-...-6aa0337 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConn

func NewConn(dpGrantToken string, dpURL string) *conn

func NewOPVBodyModifierFromJSON

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

Types

type FactSearch

type FactSearch struct {
	FactIds []string `json:"fact_ids"`
	Type    string   `json:"match_type"`
	Count   int      `json:"count"`
}

type OPVBodyModifier

type OPVBodyModifier struct {
	Scope                         []parse.ModifierType  `json:"scope" validate:"gt=0,dive,oneof=request response"`
	Items                         []OPVBodyModifierItem `json:"items"`
	Collection                    string                `json:"collection"`
	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"`
	ArrayPointerPath string `json:"array_pointer_path" validate:"omitempty,startswith=/,regex=^[a-z-_]+$"`
	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