grpcjson

package
v1.16.0-beta25 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ExtensionName for the grpc to json Transcoder plugin
	ExtensionName = "gprc_json"
)

Variables

View Source
var (
	NoConfigMapRefError = func() error {
		return eris.Errorf("a configmap ref must be provided")
	}
	ConfigMapNotFoundError = func(configRef *grpc_json.GrpcJsonTranscoder_DescriptorConfigMap) error {
		return eris.Errorf("configmap %s:%s cannot be found", configRef.GetConfigMapRef().GetNamespace(), configRef.GetConfigMapRef().GetName())
	}
	ConfigMapNoValuesError = func(configRef *grpc_json.GrpcJsonTranscoder_DescriptorConfigMap) error {
		return eris.Errorf("configmap %s:%s does not contain any values", configRef.GetConfigMapRef().GetNamespace(), configRef.GetConfigMapRef().GetName())
	}
	NoConfigMapKeyError = func(configRef *grpc_json.GrpcJsonTranscoder_DescriptorConfigMap, numValues int) error {
		return eris.Errorf("key must be provided for configmap %s:%s which contains %d values",
			configRef.GetConfigMapRef().GetNamespace(), configRef.GetConfigMapRef().GetName(), numValues)
	}
	NoDataError = func(configRef *grpc_json.GrpcJsonTranscoder_DescriptorConfigMap, key string) error {
		return eris.Errorf("configmap %s:%s does not contain a value for key %s", configRef.GetConfigMapRef().GetNamespace(), configRef.GetConfigMapRef().GetName(), key)
	}
	DecodingError = func(configRef *grpc_json.GrpcJsonTranscoder_DescriptorConfigMap, key string) error {
		return eris.Errorf("config map %s:%s contains a value for key %s but is not base64-encoded",
			configRef.GetConfigMapRef().GetNamespace(), configRef.GetConfigMapRef().GetName(), key)
	}
)

Functions

func NewPlugin

func NewPlugin() *plugin

Types

This section is empty.

Jump to

Keyboard shortcuts

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