assertion

package
v0.31.3 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 20 Imported by: 1

Documentation

Overview

Package assertion is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	Assertion_GetAssertion_FullMethodName    = "/aserto.directory.assertion.v3.Assertion/GetAssertion"
	Assertion_ListAssertions_FullMethodName  = "/aserto.directory.assertion.v3.Assertion/ListAssertions"
	Assertion_SetAssertion_FullMethodName    = "/aserto.directory.assertion.v3.Assertion/SetAssertion"
	Assertion_DeleteAssertion_FullMethodName = "/aserto.directory.assertion.v3.Assertion/DeleteAssertion"
)

Variables

View Source
var Assertion_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "aserto.directory.assertion.v3.Assertion",
	HandlerType: (*AssertionServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetAssertion",
			Handler:    _Assertion_GetAssertion_Handler,
		},
		{
			MethodName: "ListAssertions",
			Handler:    _Assertion_ListAssertions_Handler,
		},
		{
			MethodName: "SetAssertion",
			Handler:    _Assertion_SetAssertion_Handler,
		},
		{
			MethodName: "DeleteAssertion",
			Handler:    _Assertion_DeleteAssertion_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "aserto/directory/assertion/v3/assertion.proto",
}

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

View Source
var File_aserto_directory_assertion_v3_assertion_proto protoreflect.FileDescriptor

Functions

func RegisterAssertionHandler

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

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

func RegisterAssertionHandlerClient

func RegisterAssertionHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AssertionClient) error

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

func RegisterAssertionHandlerFromEndpoint

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

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

func RegisterAssertionHandlerServer

func RegisterAssertionHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AssertionServer) error

RegisterAssertionHandlerServer registers the http handlers for service Assertion to "mux". UnaryRPC :call AssertionServer 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 RegisterAssertionHandlerFromEndpoint instead.

func RegisterAssertionServer

func RegisterAssertionServer(s grpc.ServiceRegistrar, srv AssertionServer)

Types

type Assert

type Assert struct {

	// assertion identifier
	Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// expected outcome of assertion
	Expected bool `protobuf:"varint,2,opt,name=expected,proto3" json:"expected,omitempty"`
	// assertion request
	//
	// Types that are assignable to Msg:
	//
	//	*Assert_Check
	//	*Assert_CheckRelation
	//	*Assert_CheckPermission
	Msg isAssert_Msg `protobuf_oneof:"msg"`
	// contains filtered or unexported fields
}

func (*Assert) Descriptor deprecated

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

Deprecated: Use Assert.ProtoReflect.Descriptor instead.

func (*Assert) GetCheck

func (x *Assert) GetCheck() *v31.CheckRequest

func (*Assert) GetCheckPermission

func (x *Assert) GetCheckPermission() *v31.CheckPermissionRequest

func (*Assert) GetCheckRelation

func (x *Assert) GetCheckRelation() *v31.CheckRelationRequest

func (*Assert) GetExpected

func (x *Assert) GetExpected() bool

func (*Assert) GetId

func (x *Assert) GetId() uint32

func (*Assert) GetMsg

func (m *Assert) GetMsg() isAssert_Msg

func (*Assert) ProtoMessage

func (*Assert) ProtoMessage()

func (*Assert) ProtoReflect

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

func (*Assert) Reset

func (x *Assert) Reset()

func (*Assert) String

func (x *Assert) String() string

type Assert_Check

type Assert_Check struct {
	Check *v31.CheckRequest `protobuf:"bytes,3,opt,name=check,proto3,oneof"`
}

type Assert_CheckPermission

type Assert_CheckPermission struct {
	CheckPermission *v31.CheckPermissionRequest `protobuf:"bytes,5,opt,name=check_permission,json=checkPermission,proto3,oneof"`
}

type Assert_CheckRelation

type Assert_CheckRelation struct {
	CheckRelation *v31.CheckRelationRequest `protobuf:"bytes,4,opt,name=check_relation,json=checkRelation,proto3,oneof"`
}

type AssertionClient

type AssertionClient interface {
	GetAssertion(ctx context.Context, in *GetAssertionRequest, opts ...grpc.CallOption) (*GetAssertionResponse, error)
	ListAssertions(ctx context.Context, in *ListAssertionsRequest, opts ...grpc.CallOption) (*ListAssertionsResponse, error)
	SetAssertion(ctx context.Context, in *SetAssertionRequest, opts ...grpc.CallOption) (*SetAssertionResponse, error)
	DeleteAssertion(ctx context.Context, in *DeleteAssertionRequest, opts ...grpc.CallOption) (*DeleteAssertionResponse, error)
}

AssertionClient is the client API for Assertion 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 NewAssertionClient

func NewAssertionClient(cc grpc.ClientConnInterface) AssertionClient

type AssertionServer

AssertionServer is the server API for Assertion service. All implementations should embed UnimplementedAssertionServer for forward compatibility

type DeleteAssertionRequest

type DeleteAssertionRequest struct {

	// assertion identifier
	Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteAssertionRequest) Descriptor deprecated

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

Deprecated: Use DeleteAssertionRequest.ProtoReflect.Descriptor instead.

func (*DeleteAssertionRequest) GetId

func (x *DeleteAssertionRequest) GetId() uint32

func (*DeleteAssertionRequest) ProtoMessage

func (*DeleteAssertionRequest) ProtoMessage()

func (*DeleteAssertionRequest) ProtoReflect

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

func (*DeleteAssertionRequest) Reset

func (x *DeleteAssertionRequest) Reset()

func (*DeleteAssertionRequest) String

func (x *DeleteAssertionRequest) String() string

type DeleteAssertionResponse

type DeleteAssertionResponse struct {

	// empty result
	Result *emptypb.Empty `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteAssertionResponse) Descriptor deprecated

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

Deprecated: Use DeleteAssertionResponse.ProtoReflect.Descriptor instead.

func (*DeleteAssertionResponse) GetResult

func (x *DeleteAssertionResponse) GetResult() *emptypb.Empty

func (*DeleteAssertionResponse) ProtoMessage

func (*DeleteAssertionResponse) ProtoMessage()

func (*DeleteAssertionResponse) ProtoReflect

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

func (*DeleteAssertionResponse) Reset

func (x *DeleteAssertionResponse) Reset()

func (*DeleteAssertionResponse) String

func (x *DeleteAssertionResponse) String() string

type GetAssertionRequest

type GetAssertionRequest struct {

	// assertion identifier
	Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetAssertionRequest) Descriptor deprecated

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

Deprecated: Use GetAssertionRequest.ProtoReflect.Descriptor instead.

func (*GetAssertionRequest) GetId

func (x *GetAssertionRequest) GetId() uint32

func (*GetAssertionRequest) ProtoMessage

func (*GetAssertionRequest) ProtoMessage()

func (*GetAssertionRequest) ProtoReflect

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

func (*GetAssertionRequest) Reset

func (x *GetAssertionRequest) Reset()

func (*GetAssertionRequest) String

func (x *GetAssertionRequest) String() string

type GetAssertionResponse

type GetAssertionResponse struct {
	Result *Assert `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"`
	// contains filtered or unexported fields
}

func (*GetAssertionResponse) Descriptor deprecated

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

Deprecated: Use GetAssertionResponse.ProtoReflect.Descriptor instead.

func (*GetAssertionResponse) GetResult

func (x *GetAssertionResponse) GetResult() *Assert

func (*GetAssertionResponse) ProtoMessage

func (*GetAssertionResponse) ProtoMessage()

func (*GetAssertionResponse) ProtoReflect

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

func (*GetAssertionResponse) Reset

func (x *GetAssertionResponse) Reset()

func (*GetAssertionResponse) String

func (x *GetAssertionResponse) String() string

type ListAssertionsRequest

type ListAssertionsRequest struct {

	// pagination request
	Page *v3.PaginationRequest `protobuf:"bytes,1,opt,name=page,proto3" json:"page,omitempty"`
	// contains filtered or unexported fields
}

func (*ListAssertionsRequest) Descriptor deprecated

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

Deprecated: Use ListAssertionsRequest.ProtoReflect.Descriptor instead.

func (*ListAssertionsRequest) GetPage

func (*ListAssertionsRequest) ProtoMessage

func (*ListAssertionsRequest) ProtoMessage()

func (*ListAssertionsRequest) ProtoReflect

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

func (*ListAssertionsRequest) Reset

func (x *ListAssertionsRequest) Reset()

func (*ListAssertionsRequest) String

func (x *ListAssertionsRequest) String() string

type ListAssertionsResponse

type ListAssertionsResponse struct {
	Results []*Assert              `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"`
	Page    *v3.PaginationResponse `protobuf:"bytes,2,opt,name=page,proto3" json:"page,omitempty"`
	// contains filtered or unexported fields
}

func (*ListAssertionsResponse) Descriptor deprecated

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

Deprecated: Use ListAssertionsResponse.ProtoReflect.Descriptor instead.

func (*ListAssertionsResponse) GetPage

func (*ListAssertionsResponse) GetResults

func (x *ListAssertionsResponse) GetResults() []*Assert

func (*ListAssertionsResponse) ProtoMessage

func (*ListAssertionsResponse) ProtoMessage()

func (*ListAssertionsResponse) ProtoReflect

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

func (*ListAssertionsResponse) Reset

func (x *ListAssertionsResponse) Reset()

func (*ListAssertionsResponse) String

func (x *ListAssertionsResponse) String() string

type SetAssertionRequest

type SetAssertionRequest struct {
	Assert *Assert `protobuf:"bytes,1,opt,name=assert,proto3" json:"assert,omitempty"`
	// contains filtered or unexported fields
}

func (*SetAssertionRequest) Descriptor deprecated

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

Deprecated: Use SetAssertionRequest.ProtoReflect.Descriptor instead.

func (*SetAssertionRequest) GetAssert

func (x *SetAssertionRequest) GetAssert() *Assert

func (*SetAssertionRequest) ProtoMessage

func (*SetAssertionRequest) ProtoMessage()

func (*SetAssertionRequest) ProtoReflect

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

func (*SetAssertionRequest) Reset

func (x *SetAssertionRequest) Reset()

func (*SetAssertionRequest) String

func (x *SetAssertionRequest) String() string

type SetAssertionResponse

type SetAssertionResponse struct {
	Result *Assert `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"`
	// contains filtered or unexported fields
}

func (*SetAssertionResponse) Descriptor deprecated

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

Deprecated: Use SetAssertionResponse.ProtoReflect.Descriptor instead.

func (*SetAssertionResponse) GetResult

func (x *SetAssertionResponse) GetResult() *Assert

func (*SetAssertionResponse) ProtoMessage

func (*SetAssertionResponse) ProtoMessage()

func (*SetAssertionResponse) ProtoReflect

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

func (*SetAssertionResponse) Reset

func (x *SetAssertionResponse) Reset()

func (*SetAssertionResponse) String

func (x *SetAssertionResponse) String() string

type UnimplementedAssertionServer

type UnimplementedAssertionServer struct {
}

UnimplementedAssertionServer should be embedded to have forward compatible implementations.

func (UnimplementedAssertionServer) DeleteAssertion

func (UnimplementedAssertionServer) GetAssertion

func (UnimplementedAssertionServer) ListAssertions

func (UnimplementedAssertionServer) SetAssertion

type UnsafeAssertionServer

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

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

Jump to

Keyboard shortcuts

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