event

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2022 License: MPL-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package event is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_testing_event_v1_event_proto protoreflect.FileDescriptor
View Source
var TestAuthMethodService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "testing.event.v1.TestAuthMethodService",
	HandlerType: (*TestAuthMethodServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "TestAuthenticate",
			Handler:    _TestAuthMethodService_TestAuthenticate_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "testing/event/v1/event.proto",
}

TestAuthMethodService_ServiceDesc is the grpc.ServiceDesc for TestAuthMethodService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterTestAuthMethodServiceHandler

func RegisterTestAuthMethodServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterTestAuthMethodServiceHandler registers the http handlers for service TestAuthMethodService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterTestAuthMethodServiceHandlerClient

func RegisterTestAuthMethodServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TestAuthMethodServiceClient) error

RegisterTestAuthMethodServiceHandlerClient registers the http handlers for service TestAuthMethodService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "TestAuthMethodServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "TestAuthMethodServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "TestAuthMethodServiceClient" to call the correct interceptors.

func RegisterTestAuthMethodServiceHandlerFromEndpoint

func RegisterTestAuthMethodServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterTestAuthMethodServiceHandlerFromEndpoint is same as RegisterTestAuthMethodServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterTestAuthMethodServiceHandlerServer

func RegisterTestAuthMethodServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server TestAuthMethodServiceServer) error

RegisterTestAuthMethodServiceHandlerServer registers the http handlers for service TestAuthMethodService to "mux". UnaryRPC :call TestAuthMethodServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterTestAuthMethodServiceHandlerFromEndpoint instead.

func RegisterTestAuthMethodServiceServer

func RegisterTestAuthMethodServiceServer(s grpc.ServiceRegistrar, srv TestAuthMethodServiceServer)

Types

type TestAuthMethodServiceClient

type TestAuthMethodServiceClient interface {
	// TestAuthenticate validates credentials provided and returns an Auth Token.
	TestAuthenticate(ctx context.Context, in *TestAuthenticateRequest, opts ...grpc.CallOption) (*TestAuthenticateResponse, error)
}

TestAuthMethodServiceClient is the client API for TestAuthMethodService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type TestAuthMethodServiceServer

type TestAuthMethodServiceServer interface {
	// TestAuthenticate validates credentials provided and returns an Auth Token.
	TestAuthenticate(context.Context, *TestAuthenticateRequest) (*TestAuthenticateResponse, error)
	// contains filtered or unexported methods
}

TestAuthMethodServiceServer is the server API for TestAuthMethodService service. All implementations must embed UnimplementedTestAuthMethodServiceServer for forward compatibility

type TestAuthenticateRequest

type TestAuthenticateRequest struct {

	// The ID of the Auth Method in the system that should be used for authentication.
	// @inject_tag: `class:"public"`
	AuthMethodId string `protobuf:"bytes,1,opt,name=auth_method_id,proto3" json:"auth_method_id,omitempty" class:"public"`
	// This can be "cookie" or "token". If not provided, "token" will be used. "cookie" activates a split-cookie method where the token is split partially between http-only and regular cookies in order
	// to keep it safe from rogue JS in the browser. Deprecated, use "type" instead.
	// @inject_tag: `class:"public"`
	//
	// Deprecated: Do not use.
	TokenType string `protobuf:"bytes,2,opt,name=token_type,proto3" json:"token_type,omitempty" class:"public"`
	// This can be "cookie" or "token". If not provided, "token" will be used. "cookie" activates a split-cookie method where the token is split partially between http-only and regular cookies in order
	// to keep it safe from rogue JS in the browser.
	// @inject_tag: `class:"public"`
	Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty" class:"public"`
	// Attributes are passed to the Auth Method; the valid keys and values depend on the type of Auth Method as well as the command.
	Attributes *structpb.Struct `protobuf:"bytes,4,opt,name=attributes,proto3" json:"attributes,omitempty"`
	// The command to perform.
	// @inject_tag: `class:"public"`
	Command string `protobuf:"bytes,5,opt,name=command,proto3" json:"command,omitempty" class:"public"`
	// contains filtered or unexported fields
}

func (*TestAuthenticateRequest) Descriptor deprecated

func (*TestAuthenticateRequest) Descriptor() ([]byte, []int)

Deprecated: Use TestAuthenticateRequest.ProtoReflect.Descriptor instead.

func (*TestAuthenticateRequest) GetAttributes

func (x *TestAuthenticateRequest) GetAttributes() *structpb.Struct

func (*TestAuthenticateRequest) GetAuthMethodId

func (x *TestAuthenticateRequest) GetAuthMethodId() string

func (*TestAuthenticateRequest) GetCommand

func (x *TestAuthenticateRequest) GetCommand() string

func (*TestAuthenticateRequest) GetTokenType deprecated

func (x *TestAuthenticateRequest) GetTokenType() string

Deprecated: Do not use.

func (*TestAuthenticateRequest) GetType added in v0.8.0

func (x *TestAuthenticateRequest) GetType() string

func (*TestAuthenticateRequest) ProtoMessage

func (*TestAuthenticateRequest) ProtoMessage()

func (*TestAuthenticateRequest) ProtoReflect

func (x *TestAuthenticateRequest) ProtoReflect() protoreflect.Message

func (*TestAuthenticateRequest) Reset

func (x *TestAuthenticateRequest) Reset()

func (*TestAuthenticateRequest) String

func (x *TestAuthenticateRequest) String() string

func (*TestAuthenticateRequest) Tags

Tags implements the encrypt.Taggable interface which allows TestEventAuthenRequest Attributes to be classified for the encrypt filter.

type TestAuthenticateResponse

type TestAuthenticateResponse struct {

	// Valid keys and values depend on the type of Auth Method as well as the command.
	Attributes *structpb.Struct `protobuf:"bytes,4,opt,name=attributes,proto3" json:"attributes,omitempty"`
	// The command that was performed.
	// @inject_tag: `class:"public"`
	Command string `protobuf:"bytes,5,opt,name=command,proto3" json:"command,omitempty" class:"public"`
	// contains filtered or unexported fields
}

func (*TestAuthenticateResponse) Descriptor deprecated

func (*TestAuthenticateResponse) Descriptor() ([]byte, []int)

Deprecated: Use TestAuthenticateResponse.ProtoReflect.Descriptor instead.

func (*TestAuthenticateResponse) GetAttributes

func (x *TestAuthenticateResponse) GetAttributes() *structpb.Struct

func (*TestAuthenticateResponse) GetCommand

func (x *TestAuthenticateResponse) GetCommand() string

func (*TestAuthenticateResponse) ProtoMessage

func (*TestAuthenticateResponse) ProtoMessage()

func (*TestAuthenticateResponse) ProtoReflect

func (x *TestAuthenticateResponse) ProtoReflect() protoreflect.Message

func (*TestAuthenticateResponse) Reset

func (x *TestAuthenticateResponse) Reset()

func (*TestAuthenticateResponse) String

func (x *TestAuthenticateResponse) String() string

func (*TestAuthenticateResponse) Tags

Tags implements the encrypt.Taggable interface which allows TestEventAuthenResponse Attributes to be classified for the encrypt filter.

type UnimplementedTestAuthMethodServiceServer

type UnimplementedTestAuthMethodServiceServer struct {
}

UnimplementedTestAuthMethodServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedTestAuthMethodServiceServer) TestAuthenticate

type UnsafeTestAuthMethodServiceServer

type UnsafeTestAuthMethodServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeTestAuthMethodServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TestAuthMethodServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

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