modifiers

package
v0.0.0-...-045890f Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2019 License: Apache-2.0 Imports: 2 Imported by: 3

README

modifiers

import "github.com/go-orion/Orion/orion/modifiers"

Overview

Imported Packages

Index

Package files

modifiers.go types.go

Constants

const (
    RequestHTTP = "OrionRequestHTTP"
    RequestGRPC = "OrionRequestGRPC"

    JSON        = "JSON"
    JSONPB      = "JSONPB"
    ProtoBuf    = "PROTO"
    IgnoreError = "IGNORE_ERROR"
)

constatnts for specific serializers

func DontLogError

func DontLogError(ctx context.Context)

DontLogError makes sure, error returned is not reported to external services

func GetSerialization

func GetSerialization(ctx context.Context) (string, bool)

GetSerialization gets the serialization type for the given response

func HasDontLogError

func HasDontLogError(ctx context.Context) bool

HasDontLogError check ifs the error should be reported or not

func IsGRPCRequest

func IsGRPCRequest(ctx context.Context) bool

IsGRPCRequest returns true if this is pure grpc request

func IsHTTPRequest

func IsHTTPRequest(ctx context.Context) bool

IsHTTPRequest returns true if this is pure http request

func SerializeOutJSON

func SerializeOutJSON(ctx context.Context)

SerializeOutJSON forces the output to be json.Marshal for http request

func SerializeOutJSONPB

func SerializeOutJSONPB(ctx context.Context)

SerializeOutJSONPB forces the output to be jsonpb.Marshal for http request

func SerializeOutProtoBuf

func SerializeOutProtoBuf(ctx context.Context)

SerializeOutProtoBuf forces the output to be protobuf binary for http request


Generated by godoc2ghmd

Documentation

Index

Constants

View Source
const (
	RequestHTTP = "OrionRequestHTTP"
	RequestGRPC = "OrionRequestGRPC"

	JSON        = "JSON"
	JSONPB      = "JSONPB"
	ProtoBuf    = "PROTO"
	IgnoreError = "IGNORE_ERROR"
)

constatnts for specific serializers

Variables

This section is empty.

Functions

func DontLogError

func DontLogError(ctx context.Context)

DontLogError makes sure, error returned is not reported to external services

func GetSerialization

func GetSerialization(ctx context.Context) (string, bool)

GetSerialization gets the serialization type for the given response

func HasDontLogError

func HasDontLogError(ctx context.Context) bool

HasDontLogError check ifs the error should be reported or not

func IsGRPCRequest

func IsGRPCRequest(ctx context.Context) bool

IsGRPCRequest returns true if this is pure grpc request

func IsHTTPRequest

func IsHTTPRequest(ctx context.Context) bool

IsHTTPRequest returns true if this is pure http request

func SerializeOutJSON

func SerializeOutJSON(ctx context.Context)

SerializeOutJSON forces the output to be json.Marshal for http request

func SerializeOutJSONPB

func SerializeOutJSONPB(ctx context.Context)

SerializeOutJSONPB forces the output to be jsonpb.Marshal for http request

func SerializeOutProtoBuf

func SerializeOutProtoBuf(ctx context.Context)

SerializeOutProtoBuf forces the output to be protobuf binary for http request

Types

This section is empty.

Jump to

Keyboard shortcuts

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