validation

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ValidationGoTSRPCProxyListModelTypes    = "ListModelTypes"
	ValidationGoTSRPCProxyValidateEntity    = "ValidateEntity"
	ValidationGoTSRPCProxyValidationResult  = "ValidationResult"
	ValidationGoTSRPCProxyValidationResults = "ValidationResults"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPValidationGoTSRPCClient

type HTTPValidationGoTSRPCClient struct {
	URL      string
	EndPoint string
	Client   gotsrpc.Client
}

func NewDefaultValidationGoTSRPCClient

func NewDefaultValidationGoTSRPCClient(url string) *HTTPValidationGoTSRPCClient

func NewValidationGoTSRPCClient

func NewValidationGoTSRPCClient(url string, endpoint string) *HTTPValidationGoTSRPCClient

func NewValidationGoTSRPCClientWithClient

func NewValidationGoTSRPCClientWithClient(url string, endpoint string, client *go_net_http.Client) *HTTPValidationGoTSRPCClient

func (*HTTPValidationGoTSRPCClient) ListModelTypes

func (tsc *HTTPValidationGoTSRPCClient) ListModelTypes(ctx go_context.Context) (availableModelTypes []*github_com_foomo_contentfulvalidation_validator.ModelTypeInfo, clientErr error)

type Validation

type Validation interface {
	ValidationResult(w http.ResponseWriter, r *http.Request, modelType validator.ModelType, modelID validator.ModelID) (validationResult *validator.ValidationResult, validationError *errors.ValidationError)
	ValidationResults(w http.ResponseWriter, r *http.Request, modelType validator.ModelType) (validationResults map[validator.ModelID]*validator.ValidationResult, validationError *errors.ValidationError)
	ValidateEntity(w http.ResponseWriter, r *http.Request, modelType validator.ModelType, modelID validator.ModelID, commit bool) (validationResult *validator.ValidationResult, validationError *errors.ValidationError)
	ListModelTypes(w http.ResponseWriter, r *http.Request) (availableModelTypes []*validator.ModelTypeInfo)
}

type ValidationGoTSRPCProxy

type ValidationGoTSRPCProxy struct {
	EndPoint string
	// contains filtered or unexported fields
}

func NewDefaultValidationGoTSRPCProxy

func NewDefaultValidationGoTSRPCProxy(service Validation) *ValidationGoTSRPCProxy

func NewValidationGoTSRPCProxy

func NewValidationGoTSRPCProxy(service Validation, endpoint string) *ValidationGoTSRPCProxy

func (*ValidationGoTSRPCProxy) ServeHTTP

ServeHTTP exposes your service

Jump to

Keyboard shortcuts

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