Documentation ¶
Overview ¶
Package assertion is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterAssertionHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterAssertionHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AssertionClient) error
- func RegisterAssertionHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterAssertionHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AssertionServer) error
- func RegisterAssertionServer(s grpc.ServiceRegistrar, srv AssertionServer)
- type Assert
- func (*Assert) Descriptor() ([]byte, []int)deprecated
- func (x *Assert) GetCheck() *v31.CheckRequest
- func (x *Assert) GetCheckPermission() *v31.CheckPermissionRequest
- func (x *Assert) GetCheckRelation() *v31.CheckRelationRequest
- func (x *Assert) GetDescription() string
- func (x *Assert) GetExpected() bool
- func (x *Assert) GetId() uint32
- func (m *Assert) GetMsg() isAssert_Msg
- func (*Assert) ProtoMessage()
- func (x *Assert) ProtoReflect() protoreflect.Message
- func (x *Assert) Reset()
- func (x *Assert) String() string
- type Assert_Check
- type Assert_CheckPermission
- type Assert_CheckRelation
- type AssertionClient
- type AssertionServer
- type DeleteAssertionRequest
- func (*DeleteAssertionRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteAssertionRequest) GetId() uint32
- func (*DeleteAssertionRequest) ProtoMessage()
- func (x *DeleteAssertionRequest) ProtoReflect() protoreflect.Message
- func (x *DeleteAssertionRequest) Reset()
- func (x *DeleteAssertionRequest) String() string
- type DeleteAssertionResponse
- func (*DeleteAssertionResponse) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteAssertionResponse) GetResult() *emptypb.Empty
- func (*DeleteAssertionResponse) ProtoMessage()
- func (x *DeleteAssertionResponse) ProtoReflect() protoreflect.Message
- func (x *DeleteAssertionResponse) Reset()
- func (x *DeleteAssertionResponse) String() string
- type GetAssertionRequest
- func (*GetAssertionRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetAssertionRequest) GetId() uint32
- func (*GetAssertionRequest) ProtoMessage()
- func (x *GetAssertionRequest) ProtoReflect() protoreflect.Message
- func (x *GetAssertionRequest) Reset()
- func (x *GetAssertionRequest) String() string
- type GetAssertionResponse
- func (*GetAssertionResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetAssertionResponse) GetResult() *Assert
- func (*GetAssertionResponse) ProtoMessage()
- func (x *GetAssertionResponse) ProtoReflect() protoreflect.Message
- func (x *GetAssertionResponse) Reset()
- func (x *GetAssertionResponse) String() string
- type ListAssertionsRequest
- func (*ListAssertionsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListAssertionsRequest) GetPage() *v3.PaginationRequest
- func (*ListAssertionsRequest) ProtoMessage()
- func (x *ListAssertionsRequest) ProtoReflect() protoreflect.Message
- func (x *ListAssertionsRequest) Reset()
- func (x *ListAssertionsRequest) String() string
- type ListAssertionsResponse
- func (*ListAssertionsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListAssertionsResponse) GetPage() *v3.PaginationResponse
- func (x *ListAssertionsResponse) GetResults() []*Assert
- func (*ListAssertionsResponse) ProtoMessage()
- func (x *ListAssertionsResponse) ProtoReflect() protoreflect.Message
- func (x *ListAssertionsResponse) Reset()
- func (x *ListAssertionsResponse) String() string
- type SetAssertionRequest
- func (*SetAssertionRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SetAssertionRequest) GetAssert() *Assert
- func (*SetAssertionRequest) ProtoMessage()
- func (x *SetAssertionRequest) ProtoReflect() protoreflect.Message
- func (x *SetAssertionRequest) Reset()
- func (x *SetAssertionRequest) String() string
- type SetAssertionResponse
- func (*SetAssertionResponse) Descriptor() ([]byte, []int)deprecated
- func (x *SetAssertionResponse) GetResult() *Assert
- func (*SetAssertionResponse) ProtoMessage()
- func (x *SetAssertionResponse) ProtoReflect() protoreflect.Message
- func (x *SetAssertionResponse) Reset()
- func (x *SetAssertionResponse) String() string
- type UnimplementedAssertionServer
- func (UnimplementedAssertionServer) DeleteAssertion(context.Context, *DeleteAssertionRequest) (*DeleteAssertionResponse, error)
- func (UnimplementedAssertionServer) GetAssertion(context.Context, *GetAssertionRequest) (*GetAssertionResponse, error)
- func (UnimplementedAssertionServer) ListAssertions(context.Context, *ListAssertionsRequest) (*ListAssertionsResponse, error)
- func (UnimplementedAssertionServer) SetAssertion(context.Context, *SetAssertionRequest) (*SetAssertionResponse, error)
- type UnsafeAssertionServer
Constants ¶
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 ¶
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)
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. This client ignores the HTTP middlewares.
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. 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 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"` // description Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"` // contains filtered or unexported fields }
func (*Assert) Descriptor
deprecated
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) GetDescription ¶ added in v0.31.12
func (*Assert) GetExpected ¶
func (*Assert) ProtoMessage ¶
func (*Assert) ProtoMessage()
func (*Assert) ProtoReflect ¶
func (x *Assert) ProtoReflect() protoreflect.Message
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 ¶
type AssertionServer interface { GetAssertion(context.Context, *GetAssertionRequest) (*GetAssertionResponse, error) ListAssertions(context.Context, *ListAssertionsRequest) (*ListAssertionsResponse, error) SetAssertion(context.Context, *SetAssertionRequest) (*SetAssertionResponse, error) DeleteAssertion(context.Context, *DeleteAssertionRequest) (*DeleteAssertionResponse, error) }
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 (x *ListAssertionsRequest) GetPage() *v3.PaginationRequest
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 (x *ListAssertionsResponse) GetPage() *v3.PaginationResponse
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.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedAssertionServer) DeleteAssertion ¶
func (UnimplementedAssertionServer) DeleteAssertion(context.Context, *DeleteAssertionRequest) (*DeleteAssertionResponse, error)
func (UnimplementedAssertionServer) GetAssertion ¶
func (UnimplementedAssertionServer) GetAssertion(context.Context, *GetAssertionRequest) (*GetAssertionResponse, error)
func (UnimplementedAssertionServer) ListAssertions ¶
func (UnimplementedAssertionServer) ListAssertions(context.Context, *ListAssertionsRequest) (*ListAssertionsResponse, error)
func (UnimplementedAssertionServer) SetAssertion ¶
func (UnimplementedAssertionServer) SetAssertion(context.Context, *SetAssertionRequest) (*SetAssertionResponse, error)
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.