idpplugin

package
v0.8.63 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: Apache-2.0 Imports: 19 Imported by: 5

Documentation

Overview

Package idpplugin is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	Plugin_Info_FullMethodName     = "/aserto.idpplugin.v1.Plugin/Info"
	Plugin_Import_FullMethodName   = "/aserto.idpplugin.v1.Plugin/Import"
	Plugin_Export_FullMethodName   = "/aserto.idpplugin.v1.Plugin/Export"
	Plugin_Delete_FullMethodName   = "/aserto.idpplugin.v1.Plugin/Delete"
	Plugin_Validate_FullMethodName = "/aserto.idpplugin.v1.Plugin/Validate"
)

Variables

View Source
var (
	OperationType_name = map[int32]string{
		0: "OPERATION_TYPE_UNKNOWN",
		1: "OPERATION_TYPE_IMPORT",
		2: "OPERATION_TYPE_EXPORT",
		3: "OPERATION_TYPE_DELETE",
	}
	OperationType_value = map[string]int32{
		"OPERATION_TYPE_UNKNOWN": 0,
		"OPERATION_TYPE_IMPORT":  1,
		"OPERATION_TYPE_EXPORT":  2,
		"OPERATION_TYPE_DELETE":  3,
	}
)

Enum value maps for OperationType.

View Source
var File_aserto_idpplugin_v1_idpplugin_proto protoreflect.FileDescriptor
View Source
var Plugin_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "aserto.idpplugin.v1.Plugin",
	HandlerType: (*PluginServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Info",
			Handler:    _Plugin_Info_Handler,
		},
		{
			MethodName: "Validate",
			Handler:    _Plugin_Validate_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Import",
			Handler:       _Plugin_Import_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
		{
			StreamName:    "Export",
			Handler:       _Plugin_Export_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "Delete",
			Handler:       _Plugin_Delete_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "aserto/idpplugin/v1/idpplugin.proto",
}

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

Functions

func RegisterPluginHandler

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

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

func RegisterPluginHandlerClient

func RegisterPluginHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PluginClient) error

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

func RegisterPluginHandlerFromEndpoint

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

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

func RegisterPluginHandlerServer

func RegisterPluginHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PluginServer) error

RegisterPluginHandlerServer registers the http handlers for service Plugin to "mux". UnaryRPC :call PluginServer 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 RegisterPluginHandlerFromEndpoint instead.

func RegisterPluginServer

func RegisterPluginServer(s grpc.ServiceRegistrar, srv PluginServer)

Types

type DeleteRequest

type DeleteRequest struct {

	// Types that are assignable to Data:
	//
	//	*DeleteRequest_Config
	//	*DeleteRequest_UserId
	Data isDeleteRequest_Data `protobuf_oneof:"data"`
	// contains filtered or unexported fields
}

func (*DeleteRequest) Descriptor deprecated

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

Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.

func (*DeleteRequest) GetConfig

func (x *DeleteRequest) GetConfig() *structpb.Struct

func (*DeleteRequest) GetData

func (m *DeleteRequest) GetData() isDeleteRequest_Data

func (*DeleteRequest) GetUserId

func (x *DeleteRequest) GetUserId() string

func (*DeleteRequest) ProtoMessage

func (*DeleteRequest) ProtoMessage()

func (*DeleteRequest) ProtoReflect

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

func (*DeleteRequest) Reset

func (x *DeleteRequest) Reset()

func (*DeleteRequest) String

func (x *DeleteRequest) String() string

type DeleteRequest_Config

type DeleteRequest_Config struct {
	Config *structpb.Struct `protobuf:"bytes,1,opt,name=config,proto3,oneof"`
}

type DeleteRequest_UserId

type DeleteRequest_UserId struct {
	UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3,oneof"`
}

type DeleteResponse

type DeleteResponse struct {
	Error *status.Status `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteResponse) Descriptor deprecated

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

Deprecated: Use DeleteResponse.ProtoReflect.Descriptor instead.

func (*DeleteResponse) GetError

func (x *DeleteResponse) GetError() *status.Status

func (*DeleteResponse) ProtoMessage

func (*DeleteResponse) ProtoMessage()

func (*DeleteResponse) ProtoReflect

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

func (*DeleteResponse) Reset

func (x *DeleteResponse) Reset()

func (*DeleteResponse) String

func (x *DeleteResponse) String() string

type ExportRequest

type ExportRequest struct {
	Config *structpb.Struct `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"`
	// contains filtered or unexported fields
}

func (*ExportRequest) Descriptor deprecated

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

Deprecated: Use ExportRequest.ProtoReflect.Descriptor instead.

func (*ExportRequest) GetConfig

func (x *ExportRequest) GetConfig() *structpb.Struct

func (*ExportRequest) ProtoMessage

func (*ExportRequest) ProtoMessage()

func (*ExportRequest) ProtoReflect

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

func (*ExportRequest) Reset

func (x *ExportRequest) Reset()

func (*ExportRequest) String

func (x *ExportRequest) String() string

type ExportResponse

type ExportResponse struct {

	// Types that are assignable to Data:
	//
	//	*ExportResponse_User
	//	*ExportResponse_UserExt
	//	*ExportResponse_Error
	Data isExportResponse_Data `protobuf_oneof:"data"`
	// contains filtered or unexported fields
}

func (*ExportResponse) Descriptor deprecated

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

Deprecated: Use ExportResponse.ProtoReflect.Descriptor instead.

func (*ExportResponse) GetData

func (m *ExportResponse) GetData() isExportResponse_Data

func (*ExportResponse) GetError

func (x *ExportResponse) GetError() *status.Status

func (*ExportResponse) GetUser

func (x *ExportResponse) GetUser() *v11.User

func (*ExportResponse) GetUserExt

func (x *ExportResponse) GetUserExt() *v11.UserExt

func (*ExportResponse) ProtoMessage

func (*ExportResponse) ProtoMessage()

func (*ExportResponse) ProtoReflect

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

func (*ExportResponse) Reset

func (x *ExportResponse) Reset()

func (*ExportResponse) String

func (x *ExportResponse) String() string

type ExportResponse_Error

type ExportResponse_Error struct {
	Error *status.Status `protobuf:"bytes,3,opt,name=error,proto3,oneof"`
}

type ExportResponse_User

type ExportResponse_User struct {
	User *v11.User `protobuf:"bytes,1,opt,name=user,proto3,oneof"`
}

type ExportResponse_UserExt

type ExportResponse_UserExt struct {
	UserExt *v11.UserExt `protobuf:"bytes,2,opt,name=user_ext,json=userExt,proto3,oneof"`
}

type ImportRequest

type ImportRequest struct {

	// Types that are assignable to Data:
	//
	//	*ImportRequest_Config
	//	*ImportRequest_User
	//	*ImportRequest_UserExt
	Data isImportRequest_Data `protobuf_oneof:"data"`
	// contains filtered or unexported fields
}

func (*ImportRequest) Descriptor deprecated

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

Deprecated: Use ImportRequest.ProtoReflect.Descriptor instead.

func (*ImportRequest) GetConfig

func (x *ImportRequest) GetConfig() *structpb.Struct

func (*ImportRequest) GetData

func (m *ImportRequest) GetData() isImportRequest_Data

func (*ImportRequest) GetUser

func (x *ImportRequest) GetUser() *v11.User

func (*ImportRequest) GetUserExt

func (x *ImportRequest) GetUserExt() *v11.UserExt

func (*ImportRequest) ProtoMessage

func (*ImportRequest) ProtoMessage()

func (*ImportRequest) ProtoReflect

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

func (*ImportRequest) Reset

func (x *ImportRequest) Reset()

func (*ImportRequest) String

func (x *ImportRequest) String() string

type ImportRequest_Config

type ImportRequest_Config struct {
	Config *structpb.Struct `protobuf:"bytes,1,opt,name=config,proto3,oneof"`
}

type ImportRequest_User

type ImportRequest_User struct {
	User *v11.User `protobuf:"bytes,2,opt,name=user,proto3,oneof"`
}

type ImportRequest_UserExt

type ImportRequest_UserExt struct {
	UserExt *v11.UserExt `protobuf:"bytes,3,opt,name=user_ext,json=userExt,proto3,oneof"`
}

type ImportResponse

type ImportResponse struct {
	Error *status.Status        `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
	Stats *v11.UserProcessStats `protobuf:"bytes,2,opt,name=stats,proto3" json:"stats,omitempty"`
	// contains filtered or unexported fields
}

func (*ImportResponse) Descriptor deprecated

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

Deprecated: Use ImportResponse.ProtoReflect.Descriptor instead.

func (*ImportResponse) GetError

func (x *ImportResponse) GetError() *status.Status

func (*ImportResponse) GetStats

func (x *ImportResponse) GetStats() *v11.UserProcessStats

func (*ImportResponse) ProtoMessage

func (*ImportResponse) ProtoMessage()

func (*ImportResponse) ProtoReflect

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

func (*ImportResponse) Reset

func (x *ImportResponse) Reset()

func (*ImportResponse) String

func (x *ImportResponse) String() string

type InfoRequest

type InfoRequest struct {
	// contains filtered or unexported fields
}

func (*InfoRequest) Descriptor deprecated

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

Deprecated: Use InfoRequest.ProtoReflect.Descriptor instead.

func (*InfoRequest) ProtoMessage

func (*InfoRequest) ProtoMessage()

func (*InfoRequest) ProtoReflect

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

func (*InfoRequest) Reset

func (x *InfoRequest) Reset()

func (*InfoRequest) String

func (x *InfoRequest) String() string

type InfoResponse

type InfoResponse struct {
	Build       *v1.BuildInfo        `protobuf:"bytes,1,opt,name=build,proto3" json:"build,omitempty"`
	Description string               `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	Configs     []*v11.ConfigElement `protobuf:"bytes,3,rep,name=configs,proto3" json:"configs,omitempty"`
	// contains filtered or unexported fields
}

func (*InfoResponse) Descriptor deprecated

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

Deprecated: Use InfoResponse.ProtoReflect.Descriptor instead.

func (*InfoResponse) GetBuild

func (x *InfoResponse) GetBuild() *v1.BuildInfo

func (*InfoResponse) GetConfigs

func (x *InfoResponse) GetConfigs() []*v11.ConfigElement

func (*InfoResponse) GetDescription

func (x *InfoResponse) GetDescription() string

func (*InfoResponse) ProtoMessage

func (*InfoResponse) ProtoMessage()

func (*InfoResponse) ProtoReflect

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

func (*InfoResponse) Reset

func (x *InfoResponse) Reset()

func (*InfoResponse) String

func (x *InfoResponse) String() string

type OperationType

type OperationType int32
const (
	OperationType_OPERATION_TYPE_UNKNOWN OperationType = 0
	OperationType_OPERATION_TYPE_IMPORT  OperationType = 1
	OperationType_OPERATION_TYPE_EXPORT  OperationType = 2
	OperationType_OPERATION_TYPE_DELETE  OperationType = 3
)

func (OperationType) Descriptor

func (OperationType) Enum

func (x OperationType) Enum() *OperationType

func (OperationType) EnumDescriptor deprecated

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

Deprecated: Use OperationType.Descriptor instead.

func (OperationType) Number

func (OperationType) String

func (x OperationType) String() string

func (OperationType) Type

type PluginClient

type PluginClient interface {
	Info(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*InfoResponse, error)
	Import(ctx context.Context, opts ...grpc.CallOption) (Plugin_ImportClient, error)
	Export(ctx context.Context, in *ExportRequest, opts ...grpc.CallOption) (Plugin_ExportClient, error)
	Delete(ctx context.Context, opts ...grpc.CallOption) (Plugin_DeleteClient, error)
	Validate(ctx context.Context, in *ValidateRequest, opts ...grpc.CallOption) (*ValidateResponse, error)
}

PluginClient is the client API for Plugin 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.

func NewPluginClient

func NewPluginClient(cc grpc.ClientConnInterface) PluginClient

type PluginServer

PluginServer is the server API for Plugin service. All implementations should embed UnimplementedPluginServer for forward compatibility

type Plugin_DeleteClient

type Plugin_DeleteClient interface {
	Send(*DeleteRequest) error
	Recv() (*DeleteResponse, error)
	grpc.ClientStream
}

type Plugin_DeleteServer

type Plugin_DeleteServer interface {
	Send(*DeleteResponse) error
	Recv() (*DeleteRequest, error)
	grpc.ServerStream
}

type Plugin_ExportClient

type Plugin_ExportClient interface {
	Recv() (*ExportResponse, error)
	grpc.ClientStream
}

type Plugin_ExportServer

type Plugin_ExportServer interface {
	Send(*ExportResponse) error
	grpc.ServerStream
}

type Plugin_ImportClient

type Plugin_ImportClient interface {
	Send(*ImportRequest) error
	Recv() (*ImportResponse, error)
	grpc.ClientStream
}

type Plugin_ImportServer

type Plugin_ImportServer interface {
	Send(*ImportResponse) error
	Recv() (*ImportRequest, error)
	grpc.ServerStream
}

type UnimplementedPluginServer

type UnimplementedPluginServer struct {
}

UnimplementedPluginServer should be embedded to have forward compatible implementations.

func (UnimplementedPluginServer) Delete

func (UnimplementedPluginServer) Export

func (UnimplementedPluginServer) Import

func (UnimplementedPluginServer) Info

func (UnimplementedPluginServer) Validate

type UnsafePluginServer

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

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

type ValidateRequest

type ValidateRequest struct {
	Config *structpb.Struct `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"`
	OpType OperationType    `protobuf:"varint,2,opt,name=op_type,json=opType,proto3,enum=aserto.idpplugin.v1.OperationType" json:"op_type,omitempty"`
	// contains filtered or unexported fields
}

func (*ValidateRequest) Descriptor deprecated

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

Deprecated: Use ValidateRequest.ProtoReflect.Descriptor instead.

func (*ValidateRequest) GetConfig

func (x *ValidateRequest) GetConfig() *structpb.Struct

func (*ValidateRequest) GetOpType

func (x *ValidateRequest) GetOpType() OperationType

func (*ValidateRequest) ProtoMessage

func (*ValidateRequest) ProtoMessage()

func (*ValidateRequest) ProtoReflect

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

func (*ValidateRequest) Reset

func (x *ValidateRequest) Reset()

func (*ValidateRequest) String

func (x *ValidateRequest) String() string

type ValidateResponse

type ValidateResponse struct {
	Status *status.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*ValidateResponse) Descriptor deprecated

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

Deprecated: Use ValidateResponse.ProtoReflect.Descriptor instead.

func (*ValidateResponse) GetStatus

func (x *ValidateResponse) GetStatus() *status.Status

func (*ValidateResponse) ProtoMessage

func (*ValidateResponse) ProtoMessage()

func (*ValidateResponse) ProtoReflect

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

func (*ValidateResponse) Reset

func (x *ValidateResponse) Reset()

func (*ValidateResponse) String

func (x *ValidateResponse) String() string

Jump to

Keyboard shortcuts

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