v1

package
v0.30.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2026 License: Apache-2.0 Imports: 18 Imported by: 7

Documentation

Overview

Package v1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	ProxyService_ProxyRequest_FullMethodName = "/sgnl.grpc_proxy.v1.ProxyService/ProxyRequest"
)

Variables

View Source
var (
	LDAPModifyOperation_name = map[int32]string{
		0: "LDAP_MODIFY_OPERATION_ADD",
		1: "LDAP_MODIFY_OPERATION_DELETE",
		2: "LDAP_MODIFY_OPERATION_REPLACE",
	}
	LDAPModifyOperation_value = map[string]int32{
		"LDAP_MODIFY_OPERATION_ADD":     0,
		"LDAP_MODIFY_OPERATION_DELETE":  1,
		"LDAP_MODIFY_OPERATION_REPLACE": 2,
	}
)

Enum value maps for LDAPModifyOperation.

View Source
var (
	LDAPSearchScope_name = map[int32]string{
		0: "LDAP_SEARCH_SCOPE_BASE",
		1: "LDAP_SEARCH_SCOPE_ONE_LEVEL",
		2: "LDAP_SEARCH_SCOPE_SUBTREE",
	}
	LDAPSearchScope_value = map[string]int32{
		"LDAP_SEARCH_SCOPE_BASE":      0,
		"LDAP_SEARCH_SCOPE_ONE_LEVEL": 1,
		"LDAP_SEARCH_SCOPE_SUBTREE":   2,
	}
)

Enum value maps for LDAPSearchScope.

View Source
var File_proto_grpc_proxy_v1_grpc_proxy_proto protoreflect.FileDescriptor
View Source
var File_proto_grpc_proxy_v1_http_proto protoreflect.FileDescriptor
View Source
var File_proto_grpc_proxy_v1_ldap_proto protoreflect.FileDescriptor
View Source
var File_proto_grpc_proxy_v1_sql_proto protoreflect.FileDescriptor
View Source
var ProxyService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "sgnl.grpc_proxy.v1.ProxyService",
	HandlerType: (*ProxyServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ProxyRequest",
			Handler:    _ProxyService_ProxyRequest_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/grpc_proxy/v1/grpc_proxy.proto",
}

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

Functions

func RegisterProxyServiceHandler added in v0.24.0

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

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

func RegisterProxyServiceHandlerClient added in v0.24.0

func RegisterProxyServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ProxyServiceClient) error

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

func RegisterProxyServiceHandlerFromEndpoint added in v0.24.0

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

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

func RegisterProxyServiceHandlerServer added in v0.24.0

func RegisterProxyServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ProxyServiceServer) error

RegisterProxyServiceHandlerServer registers the http handlers for service ProxyService to "mux". UnaryRPC :call ProxyServiceServer 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 RegisterProxyServiceHandlerFromEndpoint instead. GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.

func RegisterProxyServiceServer

func RegisterProxyServiceServer(s grpc.ServiceRegistrar, srv ProxyServiceServer)

Types

type HTTPRequest

type HTTPRequest struct {
	Method  string                   `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"`
	Url     string                   `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"`
	Headers map[string]*StringValues `` /* 141-byte string literal not displayed */
	Body    []byte                   `protobuf:"bytes,4,opt,name=body,proto3" json:"body,omitempty"`
	// contains filtered or unexported fields
}

HTTPRequest represents an HTTP request to be proxied

func (*HTTPRequest) Descriptor deprecated

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

Deprecated: Use HTTPRequest.ProtoReflect.Descriptor instead.

func (*HTTPRequest) GetBody

func (x *HTTPRequest) GetBody() []byte

func (*HTTPRequest) GetHeaders

func (x *HTTPRequest) GetHeaders() map[string]*StringValues

func (*HTTPRequest) GetMethod

func (x *HTTPRequest) GetMethod() string

func (*HTTPRequest) GetUrl

func (x *HTTPRequest) GetUrl() string

func (*HTTPRequest) ProtoMessage

func (*HTTPRequest) ProtoMessage()

func (*HTTPRequest) ProtoReflect

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

func (*HTTPRequest) Reset

func (x *HTTPRequest) Reset()

func (*HTTPRequest) String

func (x *HTTPRequest) String() string

type HTTPResponse

type HTTPResponse struct {
	StatusCode int32                    `protobuf:"varint,1,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"`
	Headers    map[string]*StringValues `` /* 141-byte string literal not displayed */
	Body       []byte                   `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"`
	// contains filtered or unexported fields
}

HTTPResponse represents an HTTP response from the proxy

func (*HTTPResponse) Descriptor deprecated

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

Deprecated: Use HTTPResponse.ProtoReflect.Descriptor instead.

func (*HTTPResponse) GetBody

func (x *HTTPResponse) GetBody() []byte

func (*HTTPResponse) GetHeaders

func (x *HTTPResponse) GetHeaders() map[string]*StringValues

func (*HTTPResponse) GetStatusCode

func (x *HTTPResponse) GetStatusCode() int32

func (*HTTPResponse) ProtoMessage

func (*HTTPResponse) ProtoMessage()

func (*HTTPResponse) ProtoReflect

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

func (*HTTPResponse) Reset

func (x *HTTPResponse) Reset()

func (*HTTPResponse) String

func (x *HTTPResponse) String() string

type LDAPAddRequest added in v0.27.0

type LDAPAddRequest struct {
	Dn         string           `protobuf:"bytes,1,opt,name=dn,proto3" json:"dn,omitempty"`
	Attributes []*LDAPAttribute `protobuf:"bytes,2,rep,name=attributes,proto3" json:"attributes,omitempty"`
	// contains filtered or unexported fields
}

LDAPAddRequest represents a request to add a new LDAP entry. Maps to ldap.AddRequest.

func (*LDAPAddRequest) Descriptor deprecated added in v0.27.0

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

Deprecated: Use LDAPAddRequest.ProtoReflect.Descriptor instead.

func (*LDAPAddRequest) GetAttributes added in v0.27.0

func (x *LDAPAddRequest) GetAttributes() []*LDAPAttribute

func (*LDAPAddRequest) GetDn added in v0.27.0

func (x *LDAPAddRequest) GetDn() string

func (*LDAPAddRequest) ProtoMessage added in v0.27.0

func (*LDAPAddRequest) ProtoMessage()

func (*LDAPAddRequest) ProtoReflect added in v0.27.0

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

func (*LDAPAddRequest) Reset added in v0.27.0

func (x *LDAPAddRequest) Reset()

func (*LDAPAddRequest) String added in v0.27.0

func (x *LDAPAddRequest) String() string

type LDAPAttribute added in v0.27.0

type LDAPAttribute struct {
	Type   string   `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
	Values [][]byte `protobuf:"bytes,2,rep,name=values,proto3" json:"values,omitempty"`
	// contains filtered or unexported fields
}

LDAPAttribute represents an LDAP attribute with a type name and values. Maps to both ldap.Attribute (used in add) and ldap.PartialAttribute (used in modify). Values use bytes (not string) because LDAP attribute values can be arbitrary binary data (e.g., objectGUID, certificates) that may not be valid UTF-8.

func (*LDAPAttribute) Descriptor deprecated added in v0.27.0

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

Deprecated: Use LDAPAttribute.ProtoReflect.Descriptor instead.

func (*LDAPAttribute) GetType added in v0.27.0

func (x *LDAPAttribute) GetType() string

func (*LDAPAttribute) GetValues added in v0.27.0

func (x *LDAPAttribute) GetValues() [][]byte

func (*LDAPAttribute) ProtoMessage added in v0.27.0

func (*LDAPAttribute) ProtoMessage()

func (*LDAPAttribute) ProtoReflect added in v0.27.0

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

func (*LDAPAttribute) Reset added in v0.27.0

func (x *LDAPAttribute) Reset()

func (*LDAPAttribute) String added in v0.27.0

func (x *LDAPAttribute) String() string

type LDAPDeleteRequest added in v0.27.0

type LDAPDeleteRequest struct {
	Dn string `protobuf:"bytes,1,opt,name=dn,proto3" json:"dn,omitempty"`
	// contains filtered or unexported fields
}

LDAPDeleteRequest represents a request to delete an LDAP entry. Maps to ldap.DelRequest.

func (*LDAPDeleteRequest) Descriptor deprecated added in v0.27.0

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

Deprecated: Use LDAPDeleteRequest.ProtoReflect.Descriptor instead.

func (*LDAPDeleteRequest) GetDn added in v0.27.0

func (x *LDAPDeleteRequest) GetDn() string

func (*LDAPDeleteRequest) ProtoMessage added in v0.27.0

func (*LDAPDeleteRequest) ProtoMessage()

func (*LDAPDeleteRequest) ProtoReflect added in v0.27.0

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

func (*LDAPDeleteRequest) Reset added in v0.27.0

func (x *LDAPDeleteRequest) Reset()

func (*LDAPDeleteRequest) String added in v0.27.0

func (x *LDAPDeleteRequest) String() string

type LDAPModifyChange added in v0.27.0

type LDAPModifyChange struct {
	Operation    LDAPModifyOperation `protobuf:"varint,1,opt,name=operation,proto3,enum=sgnl.grpc_proxy.v1.LDAPModifyOperation" json:"operation,omitempty"`
	Modification *LDAPAttribute      `protobuf:"bytes,2,opt,name=modification,proto3" json:"modification,omitempty"`
	// contains filtered or unexported fields
}

LDAPModifyChange represents a single modification within a modify operation. Maps to ldap.Change.

func (*LDAPModifyChange) Descriptor deprecated added in v0.27.0

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

Deprecated: Use LDAPModifyChange.ProtoReflect.Descriptor instead.

func (*LDAPModifyChange) GetModification added in v0.27.0

func (x *LDAPModifyChange) GetModification() *LDAPAttribute

func (*LDAPModifyChange) GetOperation added in v0.27.0

func (x *LDAPModifyChange) GetOperation() LDAPModifyOperation

func (*LDAPModifyChange) ProtoMessage added in v0.27.0

func (*LDAPModifyChange) ProtoMessage()

func (*LDAPModifyChange) ProtoReflect added in v0.27.0

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

func (*LDAPModifyChange) Reset added in v0.27.0

func (x *LDAPModifyChange) Reset()

func (*LDAPModifyChange) String added in v0.27.0

func (x *LDAPModifyChange) String() string

type LDAPModifyDNRequest added in v0.27.0

type LDAPModifyDNRequest struct {
	Dn           string `protobuf:"bytes,1,opt,name=dn,proto3" json:"dn,omitempty"`
	NewRdn       string `protobuf:"bytes,2,opt,name=new_rdn,json=newRdn,proto3" json:"new_rdn,omitempty"`
	DeleteOldRdn bool   `protobuf:"varint,3,opt,name=delete_old_rdn,json=deleteOldRdn,proto3" json:"delete_old_rdn,omitempty"`
	NewSuperior  string `protobuf:"bytes,4,opt,name=new_superior,json=newSuperior,proto3" json:"new_superior,omitempty"`
	// contains filtered or unexported fields
}

LDAPModifyDNRequest represents a request to rename or move an LDAP entry. Maps to ldap.ModifyDNRequest.

func (*LDAPModifyDNRequest) Descriptor deprecated added in v0.27.0

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

Deprecated: Use LDAPModifyDNRequest.ProtoReflect.Descriptor instead.

func (*LDAPModifyDNRequest) GetDeleteOldRdn added in v0.27.0

func (x *LDAPModifyDNRequest) GetDeleteOldRdn() bool

func (*LDAPModifyDNRequest) GetDn added in v0.27.0

func (x *LDAPModifyDNRequest) GetDn() string

func (*LDAPModifyDNRequest) GetNewRdn added in v0.27.0

func (x *LDAPModifyDNRequest) GetNewRdn() string

func (*LDAPModifyDNRequest) GetNewSuperior added in v0.27.0

func (x *LDAPModifyDNRequest) GetNewSuperior() string

func (*LDAPModifyDNRequest) ProtoMessage added in v0.27.0

func (*LDAPModifyDNRequest) ProtoMessage()

func (*LDAPModifyDNRequest) ProtoReflect added in v0.27.0

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

func (*LDAPModifyDNRequest) Reset added in v0.27.0

func (x *LDAPModifyDNRequest) Reset()

func (*LDAPModifyDNRequest) String added in v0.27.0

func (x *LDAPModifyDNRequest) String() string

type LDAPModifyOperation added in v0.27.0

type LDAPModifyOperation int32

LDAPModifyOperation represents the type of modification to apply to an attribute. Values align with go-ldap/ldap/v3 constants: AddAttribute=0, DeleteAttribute=1, ReplaceAttribute=2.

const (
	LDAPModifyOperation_LDAP_MODIFY_OPERATION_ADD     LDAPModifyOperation = 0
	LDAPModifyOperation_LDAP_MODIFY_OPERATION_DELETE  LDAPModifyOperation = 1
	LDAPModifyOperation_LDAP_MODIFY_OPERATION_REPLACE LDAPModifyOperation = 2
)

func (LDAPModifyOperation) Descriptor added in v0.27.0

func (LDAPModifyOperation) Enum added in v0.27.0

func (LDAPModifyOperation) EnumDescriptor deprecated added in v0.27.0

func (LDAPModifyOperation) EnumDescriptor() ([]byte, []int)

Deprecated: Use LDAPModifyOperation.Descriptor instead.

func (LDAPModifyOperation) Number added in v0.27.0

func (LDAPModifyOperation) String added in v0.27.0

func (x LDAPModifyOperation) String() string

func (LDAPModifyOperation) Type added in v0.27.0

type LDAPModifyRequest added in v0.27.0

type LDAPModifyRequest struct {
	Dn      string              `protobuf:"bytes,1,opt,name=dn,proto3" json:"dn,omitempty"`
	Changes []*LDAPModifyChange `protobuf:"bytes,2,rep,name=changes,proto3" json:"changes,omitempty"`
	// contains filtered or unexported fields
}

LDAPModifyRequest represents a request to modify attributes of an existing LDAP entry. Maps to ldap.ModifyRequest.

func (*LDAPModifyRequest) Descriptor deprecated added in v0.27.0

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

Deprecated: Use LDAPModifyRequest.ProtoReflect.Descriptor instead.

func (*LDAPModifyRequest) GetChanges added in v0.27.0

func (x *LDAPModifyRequest) GetChanges() []*LDAPModifyChange

func (*LDAPModifyRequest) GetDn added in v0.27.0

func (x *LDAPModifyRequest) GetDn() string

func (*LDAPModifyRequest) ProtoMessage added in v0.27.0

func (*LDAPModifyRequest) ProtoMessage()

func (*LDAPModifyRequest) ProtoReflect added in v0.27.0

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

func (*LDAPModifyRequest) Reset added in v0.27.0

func (x *LDAPModifyRequest) Reset()

func (*LDAPModifyRequest) String added in v0.27.0

func (x *LDAPModifyRequest) String() string

type LDAPOperationRequest added in v0.27.0

type LDAPOperationRequest struct {
	Url          string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
	BindDn       string `protobuf:"bytes,2,opt,name=bind_dn,json=bindDn,proto3" json:"bind_dn,omitempty"`
	BindPassword string `protobuf:"bytes,3,opt,name=bind_password,json=bindPassword,proto3" json:"bind_password,omitempty"`
	// Types that are valid to be assigned to Operation:
	//
	//	*LDAPOperationRequest_AddRequest
	//	*LDAPOperationRequest_ModifyRequest
	//	*LDAPOperationRequest_DeleteRequest
	//	*LDAPOperationRequest_ModifyDnRequest
	//	*LDAPOperationRequest_SearchRequest
	Operation isLDAPOperationRequest_Operation `protobuf_oneof:"operation"`
	// contains filtered or unexported fields
}

LDAPOperationRequest wraps credentialed LDAP operations (including search and write-like operations) with connection credentials. Each request is self-contained (bind-per-operation pattern); the on-prem connector's SessionPool handles actual connection reuse.

func (*LDAPOperationRequest) Descriptor deprecated added in v0.27.0

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

Deprecated: Use LDAPOperationRequest.ProtoReflect.Descriptor instead.

func (*LDAPOperationRequest) GetAddRequest added in v0.27.0

func (x *LDAPOperationRequest) GetAddRequest() *LDAPAddRequest

func (*LDAPOperationRequest) GetBindDn added in v0.27.0

func (x *LDAPOperationRequest) GetBindDn() string

func (*LDAPOperationRequest) GetBindPassword added in v0.27.0

func (x *LDAPOperationRequest) GetBindPassword() string

func (*LDAPOperationRequest) GetDeleteRequest added in v0.27.0

func (x *LDAPOperationRequest) GetDeleteRequest() *LDAPDeleteRequest

func (*LDAPOperationRequest) GetModifyDnRequest added in v0.27.0

func (x *LDAPOperationRequest) GetModifyDnRequest() *LDAPModifyDNRequest

func (*LDAPOperationRequest) GetModifyRequest added in v0.27.0

func (x *LDAPOperationRequest) GetModifyRequest() *LDAPModifyRequest

func (*LDAPOperationRequest) GetOperation added in v0.27.0

func (x *LDAPOperationRequest) GetOperation() isLDAPOperationRequest_Operation

func (*LDAPOperationRequest) GetSearchRequest added in v0.28.0

func (x *LDAPOperationRequest) GetSearchRequest() *LDAPSearchOpRequest

func (*LDAPOperationRequest) GetUrl added in v0.27.0

func (x *LDAPOperationRequest) GetUrl() string

func (*LDAPOperationRequest) ProtoMessage added in v0.27.0

func (*LDAPOperationRequest) ProtoMessage()

func (*LDAPOperationRequest) ProtoReflect added in v0.27.0

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

func (*LDAPOperationRequest) Reset added in v0.27.0

func (x *LDAPOperationRequest) Reset()

func (*LDAPOperationRequest) String added in v0.27.0

func (x *LDAPOperationRequest) String() string

type LDAPOperationRequest_AddRequest added in v0.27.0

type LDAPOperationRequest_AddRequest struct {
	AddRequest *LDAPAddRequest `protobuf:"bytes,4,opt,name=add_request,json=addRequest,proto3,oneof"`
}

type LDAPOperationRequest_DeleteRequest added in v0.27.0

type LDAPOperationRequest_DeleteRequest struct {
	DeleteRequest *LDAPDeleteRequest `protobuf:"bytes,6,opt,name=delete_request,json=deleteRequest,proto3,oneof"`
}

type LDAPOperationRequest_ModifyDnRequest added in v0.27.0

type LDAPOperationRequest_ModifyDnRequest struct {
	ModifyDnRequest *LDAPModifyDNRequest `protobuf:"bytes,7,opt,name=modify_dn_request,json=modifyDnRequest,proto3,oneof"`
}

type LDAPOperationRequest_ModifyRequest added in v0.27.0

type LDAPOperationRequest_ModifyRequest struct {
	ModifyRequest *LDAPModifyRequest `protobuf:"bytes,5,opt,name=modify_request,json=modifyRequest,proto3,oneof"`
}

type LDAPOperationRequest_SearchRequest added in v0.28.0

type LDAPOperationRequest_SearchRequest struct {
	SearchRequest *LDAPSearchOpRequest `protobuf:"bytes,8,opt,name=search_request,json=searchRequest,proto3,oneof"`
}

type LDAPOperationResponse added in v0.27.0

type LDAPOperationResponse struct {
	Error      string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
	ResultCode int32  `protobuf:"varint,3,opt,name=result_code,json=resultCode,proto3" json:"result_code,omitempty"`
	MatchedDn  string `protobuf:"bytes,4,opt,name=matched_dn,json=matchedDn,proto3" json:"matched_dn,omitempty"`
	// contains filtered or unexported fields
}

LDAPOperationResponse represents the result of an LDAP write operation. Fields map to RFC 4511 LDAPResult and go-ldap's Error type. Success is derived from result_code == 0 (no explicit success field).

func (*LDAPOperationResponse) Descriptor deprecated added in v0.27.0

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

Deprecated: Use LDAPOperationResponse.ProtoReflect.Descriptor instead.

func (*LDAPOperationResponse) GetError added in v0.27.0

func (x *LDAPOperationResponse) GetError() string

func (*LDAPOperationResponse) GetMatchedDn added in v0.27.0

func (x *LDAPOperationResponse) GetMatchedDn() string

func (*LDAPOperationResponse) GetResultCode added in v0.27.0

func (x *LDAPOperationResponse) GetResultCode() int32

func (*LDAPOperationResponse) ProtoMessage added in v0.27.0

func (*LDAPOperationResponse) ProtoMessage()

func (*LDAPOperationResponse) ProtoReflect added in v0.27.0

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

func (*LDAPOperationResponse) Reset added in v0.27.0

func (x *LDAPOperationResponse) Reset()

func (*LDAPOperationResponse) String added in v0.27.0

func (x *LDAPOperationResponse) String() string

type LDAPSearchOpRequest added in v0.28.0

type LDAPSearchOpRequest struct {
	BaseDn string `protobuf:"bytes,1,opt,name=base_dn,json=baseDn,proto3" json:"base_dn,omitempty"`
	// Optional scope field to avoid dangerous proto3 default behavior.
	// If not set, server should apply SUBTREE scope as the safe default.
	// If explicitly set to BASE, the restrictive base-object-only search is intended.
	Scope      *LDAPSearchScope `protobuf:"varint,2,opt,name=scope,proto3,enum=sgnl.grpc_proxy.v1.LDAPSearchScope,oneof" json:"scope,omitempty"`
	Filter     string           `protobuf:"bytes,3,opt,name=filter,proto3" json:"filter,omitempty"`
	Attributes []string         `protobuf:"bytes,4,rep,name=attributes,proto3" json:"attributes,omitempty"`
	SizeLimit  int32            `protobuf:"varint,5,opt,name=size_limit,json=sizeLimit,proto3" json:"size_limit,omitempty"`
	TimeLimit  int32            `protobuf:"varint,6,opt,name=time_limit,json=timeLimit,proto3" json:"time_limit,omitempty"` // in seconds
	// contains filtered or unexported fields
}

LDAPSearchOpRequest represents a structured LDAP search operation request. Maps to ldap.SearchRequest for credentialed bind-per-operation LDAP searches.

func (*LDAPSearchOpRequest) Descriptor deprecated added in v0.28.0

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

Deprecated: Use LDAPSearchOpRequest.ProtoReflect.Descriptor instead.

func (*LDAPSearchOpRequest) GetAttributes added in v0.28.0

func (x *LDAPSearchOpRequest) GetAttributes() []string

func (*LDAPSearchOpRequest) GetBaseDn added in v0.28.0

func (x *LDAPSearchOpRequest) GetBaseDn() string

func (*LDAPSearchOpRequest) GetFilter added in v0.28.0

func (x *LDAPSearchOpRequest) GetFilter() string

func (*LDAPSearchOpRequest) GetScope added in v0.28.0

func (x *LDAPSearchOpRequest) GetScope() LDAPSearchScope

func (*LDAPSearchOpRequest) GetSizeLimit added in v0.28.0

func (x *LDAPSearchOpRequest) GetSizeLimit() int32

func (*LDAPSearchOpRequest) GetTimeLimit added in v0.28.0

func (x *LDAPSearchOpRequest) GetTimeLimit() int32

func (*LDAPSearchOpRequest) ProtoMessage added in v0.28.0

func (*LDAPSearchOpRequest) ProtoMessage()

func (*LDAPSearchOpRequest) ProtoReflect added in v0.28.0

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

func (*LDAPSearchOpRequest) Reset added in v0.28.0

func (x *LDAPSearchOpRequest) Reset()

func (*LDAPSearchOpRequest) String added in v0.28.0

func (x *LDAPSearchOpRequest) String() string

type LDAPSearchRequest

type LDAPSearchRequest struct {
	Request string `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"`
	// contains filtered or unexported fields
}

LDAPSearchRequest is a wrapper around a marshalled LDAP Adapter request to an on-premises connector.

func (*LDAPSearchRequest) Descriptor deprecated

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

Deprecated: Use LDAPSearchRequest.ProtoReflect.Descriptor instead.

func (*LDAPSearchRequest) GetRequest

func (x *LDAPSearchRequest) GetRequest() string

func (*LDAPSearchRequest) ProtoMessage

func (*LDAPSearchRequest) ProtoMessage()

func (*LDAPSearchRequest) ProtoReflect

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

func (*LDAPSearchRequest) Reset

func (x *LDAPSearchRequest) Reset()

func (*LDAPSearchRequest) String

func (x *LDAPSearchRequest) String() string

type LDAPSearchResponse

type LDAPSearchResponse struct {
	Response string `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"`
	Error    string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

LDAPSearchResponse is a wrapper around a marshalled LDAP processed response or any error (marshalled framework.Error) while processing the request from an on-premises connector.

func (*LDAPSearchResponse) Descriptor deprecated

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

Deprecated: Use LDAPSearchResponse.ProtoReflect.Descriptor instead.

func (*LDAPSearchResponse) GetError

func (x *LDAPSearchResponse) GetError() string

func (*LDAPSearchResponse) GetResponse

func (x *LDAPSearchResponse) GetResponse() string

func (*LDAPSearchResponse) ProtoMessage

func (*LDAPSearchResponse) ProtoMessage()

func (*LDAPSearchResponse) ProtoReflect

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

func (*LDAPSearchResponse) Reset

func (x *LDAPSearchResponse) Reset()

func (*LDAPSearchResponse) String

func (x *LDAPSearchResponse) String() string

type LDAPSearchScope added in v0.28.0

type LDAPSearchScope int32

LDAPSearchScope represents the scope of an LDAP search operation. Values align with go-ldap/ldap/v3 constants: ScopeBaseObject=0, ScopeSingleLevel=1, ScopeWholeSubtree=2.

const (
	LDAPSearchScope_LDAP_SEARCH_SCOPE_BASE      LDAPSearchScope = 0
	LDAPSearchScope_LDAP_SEARCH_SCOPE_ONE_LEVEL LDAPSearchScope = 1
	LDAPSearchScope_LDAP_SEARCH_SCOPE_SUBTREE   LDAPSearchScope = 2
)

func (LDAPSearchScope) Descriptor added in v0.28.0

func (LDAPSearchScope) Enum added in v0.28.0

func (x LDAPSearchScope) Enum() *LDAPSearchScope

func (LDAPSearchScope) EnumDescriptor deprecated added in v0.28.0

func (LDAPSearchScope) EnumDescriptor() ([]byte, []int)

Deprecated: Use LDAPSearchScope.Descriptor instead.

func (LDAPSearchScope) Number added in v0.28.0

func (LDAPSearchScope) String added in v0.28.0

func (x LDAPSearchScope) String() string

func (LDAPSearchScope) Type added in v0.28.0

type ProxyRequestMessage

type ProxyRequestMessage struct {
	Request     *Request `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"`
	ConnectorId string   `protobuf:"bytes,2,opt,name=connector_id,json=connectorId,proto3" json:"connector_id,omitempty"`
	ClientId    string   `protobuf:"bytes,3,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
	TenantId    string   `protobuf:"bytes,4,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"`
	// contains filtered or unexported fields
}

ProxyRequestMessage represents a request to be proxied to a specific connector

func (*ProxyRequestMessage) Descriptor deprecated

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

Deprecated: Use ProxyRequestMessage.ProtoReflect.Descriptor instead.

func (*ProxyRequestMessage) GetClientId

func (x *ProxyRequestMessage) GetClientId() string

func (*ProxyRequestMessage) GetConnectorId

func (x *ProxyRequestMessage) GetConnectorId() string

func (*ProxyRequestMessage) GetRequest

func (x *ProxyRequestMessage) GetRequest() *Request

func (*ProxyRequestMessage) GetTenantId

func (x *ProxyRequestMessage) GetTenantId() string

func (*ProxyRequestMessage) ProtoMessage

func (*ProxyRequestMessage) ProtoMessage()

func (*ProxyRequestMessage) ProtoReflect

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

func (*ProxyRequestMessage) Reset

func (x *ProxyRequestMessage) Reset()

func (*ProxyRequestMessage) String

func (x *ProxyRequestMessage) String() string

type ProxyServiceClient

type ProxyServiceClient interface {
	// ProxyRequest forwards a request through the proxy
	ProxyRequest(ctx context.Context, in *ProxyRequestMessage, opts ...grpc.CallOption) (*Response, error)
}

ProxyServiceClient is the client API for ProxyService 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.

ProxyService is a gRPC service implemented by the Connector Service to process proxied requests from the Adapters and Action Handlers and relaying them to the remote on-premises Connectors.

type ProxyServiceServer

type ProxyServiceServer interface {
	// ProxyRequest forwards a request through the proxy
	ProxyRequest(context.Context, *ProxyRequestMessage) (*Response, error)
	// contains filtered or unexported methods
}

ProxyServiceServer is the server API for ProxyService service. All implementations must embed UnimplementedProxyServiceServer for forward compatibility.

ProxyService is a gRPC service implemented by the Connector Service to process proxied requests from the Adapters and Action Handlers and relaying them to the remote on-premises Connectors.

type Request

type Request struct {

	// Types that are valid to be assigned to RequestType:
	//
	//	*Request_HttpRequest
	//	*Request_SqlQueryReq
	//	*Request_LdapSearchRequest
	//	*Request_LdapOperationRequest
	RequestType isRequest_RequestType `protobuf_oneof:"request_type"`
	// contains filtered or unexported fields
}

Request represents a request to be proxied

func (*Request) Descriptor deprecated

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

Deprecated: Use Request.ProtoReflect.Descriptor instead.

func (*Request) GetHttpRequest

func (x *Request) GetHttpRequest() *HTTPRequest

func (*Request) GetLdapOperationRequest added in v0.27.0

func (x *Request) GetLdapOperationRequest() *LDAPOperationRequest

func (*Request) GetLdapSearchRequest

func (x *Request) GetLdapSearchRequest() *LDAPSearchRequest

func (*Request) GetRequestType

func (x *Request) GetRequestType() isRequest_RequestType

func (*Request) GetSqlQueryReq

func (x *Request) GetSqlQueryReq() *SQLQueryRequest

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) ProtoReflect

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

func (*Request) Reset

func (x *Request) Reset()

func (*Request) String

func (x *Request) String() string

type Request_HttpRequest

type Request_HttpRequest struct {
	HttpRequest *HTTPRequest `protobuf:"bytes,1,opt,name=http_request,json=httpRequest,proto3,oneof"`
}

type Request_LdapOperationRequest added in v0.27.0

type Request_LdapOperationRequest struct {
	LdapOperationRequest *LDAPOperationRequest `protobuf:"bytes,4,opt,name=ldap_operation_request,json=ldapOperationRequest,proto3,oneof"`
}

type Request_LdapSearchRequest

type Request_LdapSearchRequest struct {
	LdapSearchRequest *LDAPSearchRequest `protobuf:"bytes,3,opt,name=ldap_search_request,json=ldapSearchRequest,proto3,oneof"`
}

type Request_SqlQueryReq

type Request_SqlQueryReq struct {
	SqlQueryReq *SQLQueryRequest `protobuf:"bytes,2,opt,name=sql_query_req,json=sqlQueryReq,proto3,oneof"`
}

type Response

type Response struct {
	Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
	// Types that are valid to be assigned to ResponseType:
	//
	//	*Response_HttpResponse
	//	*Response_SqlQueryResponse
	//	*Response_LdapSearchResponse
	//	*Response_LdapOperationResponse
	ResponseType isResponse_ResponseType `protobuf_oneof:"response_type"`
	// contains filtered or unexported fields
}

Response represents a response from the proxy

func (*Response) Descriptor deprecated

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

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetError

func (x *Response) GetError() string

func (*Response) GetHttpResponse

func (x *Response) GetHttpResponse() *HTTPResponse

func (*Response) GetLdapOperationResponse added in v0.27.0

func (x *Response) GetLdapOperationResponse() *LDAPOperationResponse

func (*Response) GetLdapSearchResponse

func (x *Response) GetLdapSearchResponse() *LDAPSearchResponse

func (*Response) GetResponseType

func (x *Response) GetResponseType() isResponse_ResponseType

func (*Response) GetSqlQueryResponse

func (x *Response) GetSqlQueryResponse() *SQLQueryResponse

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

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

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

type Response_HttpResponse

type Response_HttpResponse struct {
	HttpResponse *HTTPResponse `protobuf:"bytes,2,opt,name=http_response,json=httpResponse,proto3,oneof"`
}

type Response_LdapOperationResponse added in v0.27.0

type Response_LdapOperationResponse struct {
	LdapOperationResponse *LDAPOperationResponse `protobuf:"bytes,5,opt,name=ldap_operation_response,json=ldapOperationResponse,proto3,oneof"`
}

type Response_LdapSearchResponse

type Response_LdapSearchResponse struct {
	LdapSearchResponse *LDAPSearchResponse `protobuf:"bytes,4,opt,name=ldap_search_response,json=ldapSearchResponse,proto3,oneof"`
}

type Response_SqlQueryResponse

type Response_SqlQueryResponse struct {
	SqlQueryResponse *SQLQueryResponse `protobuf:"bytes,3,opt,name=sql_query_response,json=sqlQueryResponse,proto3,oneof"`
}

type SQLQueryRequest

type SQLQueryRequest struct {
	Request string `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"`
	// contains filtered or unexported fields
}

SQLQueryRequest is a wrapper around a marshalled SQL Adapter request to an on-premises connector.

func (*SQLQueryRequest) Descriptor deprecated

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

Deprecated: Use SQLQueryRequest.ProtoReflect.Descriptor instead.

func (*SQLQueryRequest) GetRequest

func (x *SQLQueryRequest) GetRequest() string

func (*SQLQueryRequest) ProtoMessage

func (*SQLQueryRequest) ProtoMessage()

func (*SQLQueryRequest) ProtoReflect

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

func (*SQLQueryRequest) Reset

func (x *SQLQueryRequest) Reset()

func (*SQLQueryRequest) String

func (x *SQLQueryRequest) String() string

type SQLQueryResponse

type SQLQueryResponse struct {
	Response string `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"`
	Error    string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

SQLQueryResponse is a wrapper around a marshalled SQL processed response or any error (marshalled framework.Error) while processing the request from an on-premises connector.

func (*SQLQueryResponse) Descriptor deprecated

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

Deprecated: Use SQLQueryResponse.ProtoReflect.Descriptor instead.

func (*SQLQueryResponse) GetError

func (x *SQLQueryResponse) GetError() string

func (*SQLQueryResponse) GetResponse

func (x *SQLQueryResponse) GetResponse() string

func (*SQLQueryResponse) ProtoMessage

func (*SQLQueryResponse) ProtoMessage()

func (*SQLQueryResponse) ProtoReflect

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

func (*SQLQueryResponse) Reset

func (x *SQLQueryResponse) Reset()

func (*SQLQueryResponse) String

func (x *SQLQueryResponse) String() string

type StringValues

type StringValues struct {
	Values []string `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"`
	// contains filtered or unexported fields
}

StringValues for a list of string values.

func (*StringValues) Descriptor deprecated

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

Deprecated: Use StringValues.ProtoReflect.Descriptor instead.

func (*StringValues) GetValues

func (x *StringValues) GetValues() []string

func (*StringValues) ProtoMessage

func (*StringValues) ProtoMessage()

func (*StringValues) ProtoReflect

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

func (*StringValues) Reset

func (x *StringValues) Reset()

func (*StringValues) String

func (x *StringValues) String() string

type UnimplementedProxyServiceServer

type UnimplementedProxyServiceServer struct{}

UnimplementedProxyServiceServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedProxyServiceServer) ProxyRequest

type UnsafeProxyServiceServer

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

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

Jump to

Keyboard shortcuts

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