Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterPluginServer(s grpc.ServiceRegistrar, srv PluginServer)
- type AssessmentConfiguration
- func (*AssessmentConfiguration) Descriptor() ([]byte, []int)deprecated
- func (x *AssessmentConfiguration) GetParameters() map[string]string
- func (x *AssessmentConfiguration) GetPlanId() string
- func (x *AssessmentConfiguration) GetRequirementId() string
- func (*AssessmentConfiguration) ProtoMessage()
- func (x *AssessmentConfiguration) ProtoReflect() protoreflect.Message
- func (x *AssessmentConfiguration) Reset()
- func (x *AssessmentConfiguration) String() string
- type AssessmentLog
- func (*AssessmentLog) Descriptor() ([]byte, []int)deprecated
- func (x *AssessmentLog) GetConfidence() ConfidenceLevel
- func (x *AssessmentLog) GetMessage() string
- func (x *AssessmentLog) GetRequirementId() string
- func (x *AssessmentLog) GetSteps() []*Step
- func (*AssessmentLog) ProtoMessage()
- func (x *AssessmentLog) ProtoReflect() protoreflect.Message
- func (x *AssessmentLog) Reset()
- func (x *AssessmentLog) String() string
- type ConfidenceLevel
- func (ConfidenceLevel) Descriptor() protoreflect.EnumDescriptor
- func (x ConfidenceLevel) Enum() *ConfidenceLevel
- func (ConfidenceLevel) EnumDescriptor() ([]byte, []int)deprecated
- func (x ConfidenceLevel) Number() protoreflect.EnumNumber
- func (x ConfidenceLevel) String() string
- func (ConfidenceLevel) Type() protoreflect.EnumType
- type DescribeRequest
- type DescribeResponse
- func (*DescribeResponse) Descriptor() ([]byte, []int)deprecated
- func (x *DescribeResponse) GetErrorMessage() string
- func (x *DescribeResponse) GetHealthy() bool
- func (x *DescribeResponse) GetRequiredGlobalVariables() []string
- func (x *DescribeResponse) GetRequiredTargetVariables() []string
- func (x *DescribeResponse) GetVersion() string
- func (*DescribeResponse) ProtoMessage()
- func (x *DescribeResponse) ProtoReflect() protoreflect.Message
- func (x *DescribeResponse) Reset()
- func (x *DescribeResponse) String() string
- type GenerateRequest
- func (*GenerateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GenerateRequest) GetConfigurations() []*AssessmentConfiguration
- func (x *GenerateRequest) GetGlobalVariables() map[string]string
- func (x *GenerateRequest) GetTargetVariables() map[string]string
- func (*GenerateRequest) ProtoMessage()
- func (x *GenerateRequest) ProtoReflect() protoreflect.Message
- func (x *GenerateRequest) Reset()
- func (x *GenerateRequest) String() string
- type GenerateResponse
- func (*GenerateResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GenerateResponse) GetErrorMessage() string
- func (x *GenerateResponse) GetSuccess() bool
- func (*GenerateResponse) ProtoMessage()
- func (x *GenerateResponse) ProtoReflect() protoreflect.Message
- func (x *GenerateResponse) Reset()
- func (x *GenerateResponse) String() string
- type PluginClient
- type PluginServer
- type Result
- type ScanRequest
- type ScanResponse
- type Step
- type Target
- type UnimplementedPluginServer
- type UnsafePluginServer
Constants ¶
const ( Plugin_Generate_FullMethodName = "/complyctl.plugin.v1.Plugin/Generate" Plugin_Scan_FullMethodName = "/complyctl.plugin.v1.Plugin/Scan" Plugin_Describe_FullMethodName = "/complyctl.plugin.v1.Plugin/Describe" )
Variables ¶
var ( ConfidenceLevel_name = map[int32]string{ 0: "CONFIDENCE_LEVEL_NOT_SET", 1: "CONFIDENCE_LEVEL_UNDETERMINED", 2: "CONFIDENCE_LEVEL_LOW", 3: "CONFIDENCE_LEVEL_MEDIUM", 4: "CONFIDENCE_LEVEL_HIGH", } ConfidenceLevel_value = map[string]int32{ "CONFIDENCE_LEVEL_NOT_SET": 0, "CONFIDENCE_LEVEL_UNDETERMINED": 1, "CONFIDENCE_LEVEL_LOW": 2, "CONFIDENCE_LEVEL_MEDIUM": 3, "CONFIDENCE_LEVEL_HIGH": 4, } )
Enum value maps for ConfidenceLevel.
var ( Result_name = map[int32]string{ 0: "RESULT_UNSPECIFIED", 1: "RESULT_PASSED", 2: "RESULT_FAILED", 3: "RESULT_SKIPPED", 4: "RESULT_ERROR", } Result_value = map[string]int32{ "RESULT_UNSPECIFIED": 0, "RESULT_PASSED": 1, "RESULT_FAILED": 2, "RESULT_SKIPPED": 3, "RESULT_ERROR": 4, } )
Enum value maps for Result.
var File_plugin_proto protoreflect.FileDescriptor
var Plugin_ServiceDesc = grpc.ServiceDesc{ ServiceName: "complyctl.plugin.v1.Plugin", HandlerType: (*PluginServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Generate", Handler: _Plugin_Generate_Handler, }, { MethodName: "Scan", Handler: _Plugin_Scan_Handler, }, { MethodName: "Describe", Handler: _Plugin_Describe_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "plugin.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 RegisterPluginServer ¶
func RegisterPluginServer(s grpc.ServiceRegistrar, srv PluginServer)
Types ¶
type AssessmentConfiguration ¶
type AssessmentConfiguration struct {
// Assessment plan ID
PlanId string `protobuf:"bytes,1,opt,name=plan_id,json=planId,proto3" json:"plan_id,omitempty"`
// Requirement ID
RequirementId string `protobuf:"bytes,2,opt,name=requirement_id,json=requirementId,proto3" json:"requirement_id,omitempty"`
// Parameters map (key-value configuration) per requirement
Parameters map[string]string `` /* 147-byte string literal not displayed */
// contains filtered or unexported fields
}
AssessmentConfiguration defines general policy configuration extracted from assessment plan
func (*AssessmentConfiguration) Descriptor
deprecated
func (*AssessmentConfiguration) Descriptor() ([]byte, []int)
Deprecated: Use AssessmentConfiguration.ProtoReflect.Descriptor instead.
func (*AssessmentConfiguration) GetParameters ¶
func (x *AssessmentConfiguration) GetParameters() map[string]string
func (*AssessmentConfiguration) GetPlanId ¶
func (x *AssessmentConfiguration) GetPlanId() string
func (*AssessmentConfiguration) GetRequirementId ¶
func (x *AssessmentConfiguration) GetRequirementId() string
func (*AssessmentConfiguration) ProtoMessage ¶
func (*AssessmentConfiguration) ProtoMessage()
func (*AssessmentConfiguration) ProtoReflect ¶
func (x *AssessmentConfiguration) ProtoReflect() protoreflect.Message
func (*AssessmentConfiguration) Reset ¶
func (x *AssessmentConfiguration) Reset()
func (*AssessmentConfiguration) String ¶
func (x *AssessmentConfiguration) String() string
type AssessmentLog ¶
type AssessmentLog struct {
// Requirement ID that was evaluated
RequirementId string `protobuf:"bytes,1,opt,name=requirement_id,json=requirementId,proto3" json:"requirement_id,omitempty"`
// Steps executed during evaluation
Steps []*Step `protobuf:"bytes,2,rep,name=steps,proto3" json:"steps,omitempty"`
// Overall result message
Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
// Confidence in assessment result (mirrors go-gemara ConfidenceLevel)
Confidence ConfidenceLevel `protobuf:"varint,4,opt,name=confidence,proto3,enum=complyctl.plugin.v1.ConfidenceLevel" json:"confidence,omitempty"`
// contains filtered or unexported fields
}
AssessmentLog contains results for a single requirement evaluation
func (*AssessmentLog) Descriptor
deprecated
func (*AssessmentLog) Descriptor() ([]byte, []int)
Deprecated: Use AssessmentLog.ProtoReflect.Descriptor instead.
func (*AssessmentLog) GetConfidence ¶
func (x *AssessmentLog) GetConfidence() ConfidenceLevel
func (*AssessmentLog) GetMessage ¶
func (x *AssessmentLog) GetMessage() string
func (*AssessmentLog) GetRequirementId ¶
func (x *AssessmentLog) GetRequirementId() string
func (*AssessmentLog) GetSteps ¶
func (x *AssessmentLog) GetSteps() []*Step
func (*AssessmentLog) ProtoMessage ¶
func (*AssessmentLog) ProtoMessage()
func (*AssessmentLog) ProtoReflect ¶
func (x *AssessmentLog) ProtoReflect() protoreflect.Message
func (*AssessmentLog) Reset ¶
func (x *AssessmentLog) Reset()
func (*AssessmentLog) String ¶
func (x *AssessmentLog) String() string
type ConfidenceLevel ¶
type ConfidenceLevel int32
ConfidenceLevel indicates the evaluator's confidence in an assessment result. Mirrors go-gemara ConfidenceLevel enum (1:1 mapping, no lossy conversion).
const ( ConfidenceLevel_CONFIDENCE_LEVEL_NOT_SET ConfidenceLevel = 0 ConfidenceLevel_CONFIDENCE_LEVEL_UNDETERMINED ConfidenceLevel = 1 ConfidenceLevel_CONFIDENCE_LEVEL_LOW ConfidenceLevel = 2 ConfidenceLevel_CONFIDENCE_LEVEL_MEDIUM ConfidenceLevel = 3 ConfidenceLevel_CONFIDENCE_LEVEL_HIGH ConfidenceLevel = 4 )
func (ConfidenceLevel) Descriptor ¶
func (ConfidenceLevel) Descriptor() protoreflect.EnumDescriptor
func (ConfidenceLevel) Enum ¶
func (x ConfidenceLevel) Enum() *ConfidenceLevel
func (ConfidenceLevel) EnumDescriptor
deprecated
func (ConfidenceLevel) EnumDescriptor() ([]byte, []int)
Deprecated: Use ConfidenceLevel.Descriptor instead.
func (ConfidenceLevel) Number ¶
func (x ConfidenceLevel) Number() protoreflect.EnumNumber
func (ConfidenceLevel) String ¶
func (x ConfidenceLevel) String() string
func (ConfidenceLevel) Type ¶
func (ConfidenceLevel) Type() protoreflect.EnumType
type DescribeRequest ¶
type DescribeRequest struct {
// contains filtered or unexported fields
}
DescribeRequest is sent to discover plugin identity and requirements.
func (*DescribeRequest) Descriptor
deprecated
func (*DescribeRequest) Descriptor() ([]byte, []int)
Deprecated: Use DescribeRequest.ProtoReflect.Descriptor instead.
func (*DescribeRequest) ProtoMessage ¶
func (*DescribeRequest) ProtoMessage()
func (*DescribeRequest) ProtoReflect ¶
func (x *DescribeRequest) ProtoReflect() protoreflect.Message
func (*DescribeRequest) Reset ¶
func (x *DescribeRequest) Reset()
func (*DescribeRequest) String ¶
func (x *DescribeRequest) String() string
type DescribeResponse ¶
type DescribeResponse struct {
// Health status
Healthy bool `protobuf:"varint,1,opt,name=healthy,proto3" json:"healthy,omitempty"`
// Plugin version (optional)
Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
// Error message if unhealthy
ErrorMessage string `protobuf:"bytes,3,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
// Required global variable names — doctor validates these
// keys exist in config.variables (R51)
RequiredGlobalVariables []string `` /* 132-byte string literal not displayed */
// Required target variable names — doctor validates these
// keys exist in relevant config.targets[].variables (R51)
RequiredTargetVariables []string `` /* 132-byte string literal not displayed */
// contains filtered or unexported fields
}
DescribeResponse reports plugin identity, health, and declared variable requirements used by doctor diagnostics.
func (*DescribeResponse) Descriptor
deprecated
func (*DescribeResponse) Descriptor() ([]byte, []int)
Deprecated: Use DescribeResponse.ProtoReflect.Descriptor instead.
func (*DescribeResponse) GetErrorMessage ¶
func (x *DescribeResponse) GetErrorMessage() string
func (*DescribeResponse) GetHealthy ¶
func (x *DescribeResponse) GetHealthy() bool
func (*DescribeResponse) GetRequiredGlobalVariables ¶
func (x *DescribeResponse) GetRequiredGlobalVariables() []string
func (*DescribeResponse) GetRequiredTargetVariables ¶
func (x *DescribeResponse) GetRequiredTargetVariables() []string
func (*DescribeResponse) GetVersion ¶
func (x *DescribeResponse) GetVersion() string
func (*DescribeResponse) ProtoMessage ¶
func (*DescribeResponse) ProtoMessage()
func (*DescribeResponse) ProtoReflect ¶
func (x *DescribeResponse) ProtoReflect() protoreflect.Message
func (*DescribeResponse) Reset ¶
func (x *DescribeResponse) Reset()
func (*DescribeResponse) String ¶
func (x *DescribeResponse) String() string
type GenerateRequest ¶
type GenerateRequest struct {
// Workspace-level variables from complytime.yaml `variables` section.
// See R48: specs/001-gemara-native-workflow/research.md
GlobalVariables map[string]string `` /* 180-byte string literal not displayed */
// Per-requirement test configuration
Configurations []*AssessmentConfiguration `protobuf:"bytes,2,rep,name=configurations,proto3" json:"configurations,omitempty"`
// Per-target variables from complytime.yaml targets[].variables.
// Generate is invoked per (evaluator, target) pair so each call
// carries the variables for exactly one target.
TargetVariables map[string]string `` /* 180-byte string literal not displayed */
// contains filtered or unexported fields
}
GenerateRequest contains assessment plan configuration for policy preparation. Uses the three-tier variable model (R48):
Tier 1: global_variables — workspace-level variables Tier 2: target_variables — per-target variables from complytime.yaml targets[].variables Tier 3: test variables — per-requirement (in AssessmentConfiguration.parameters)
func (*GenerateRequest) Descriptor
deprecated
func (*GenerateRequest) Descriptor() ([]byte, []int)
Deprecated: Use GenerateRequest.ProtoReflect.Descriptor instead.
func (*GenerateRequest) GetConfigurations ¶
func (x *GenerateRequest) GetConfigurations() []*AssessmentConfiguration
func (*GenerateRequest) GetGlobalVariables ¶
func (x *GenerateRequest) GetGlobalVariables() map[string]string
func (*GenerateRequest) GetTargetVariables ¶
func (x *GenerateRequest) GetTargetVariables() map[string]string
func (*GenerateRequest) ProtoMessage ¶
func (*GenerateRequest) ProtoMessage()
func (*GenerateRequest) ProtoReflect ¶
func (x *GenerateRequest) ProtoReflect() protoreflect.Message
func (*GenerateRequest) Reset ¶
func (x *GenerateRequest) Reset()
func (*GenerateRequest) String ¶
func (x *GenerateRequest) String() string
type GenerateResponse ¶
type GenerateResponse struct {
// Success indicator
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
// Error message if preparation failed
ErrorMessage string `protobuf:"bytes,2,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
// contains filtered or unexported fields
}
GenerateResponse confirms policy preparation completion
func (*GenerateResponse) Descriptor
deprecated
func (*GenerateResponse) Descriptor() ([]byte, []int)
Deprecated: Use GenerateResponse.ProtoReflect.Descriptor instead.
func (*GenerateResponse) GetErrorMessage ¶
func (x *GenerateResponse) GetErrorMessage() string
func (*GenerateResponse) GetSuccess ¶
func (x *GenerateResponse) GetSuccess() bool
func (*GenerateResponse) ProtoMessage ¶
func (*GenerateResponse) ProtoMessage()
func (*GenerateResponse) ProtoReflect ¶
func (x *GenerateResponse) ProtoReflect() protoreflect.Message
func (*GenerateResponse) Reset ¶
func (x *GenerateResponse) Reset()
func (*GenerateResponse) String ¶
func (x *GenerateResponse) String() string
type PluginClient ¶
type PluginClient interface {
// Generate prepares declarative policies based on
// assessment plan configuration
// Called during `complyctl generate` command execution
Generate(ctx context.Context, in *GenerateRequest, opts ...grpc.CallOption) (*GenerateResponse, error)
// Scan executes compliance checks against targets
// Called during `complyctl scan` command execution
Scan(ctx context.Context, in *ScanRequest, opts ...grpc.CallOption) (*ScanResponse, error)
// Describe reports plugin identity, health, and declared variable
// requirements. Called during plugin discovery and doctor diagnostics.
Describe(ctx context.Context, in *DescribeRequest, opts ...grpc.CallOption) (*DescribeResponse, 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.
Plugin service for compliance evaluation
func NewPluginClient ¶
func NewPluginClient(cc grpc.ClientConnInterface) PluginClient
type PluginServer ¶
type PluginServer interface {
// Generate prepares declarative policies based on
// assessment plan configuration
// Called during `complyctl generate` command execution
Generate(context.Context, *GenerateRequest) (*GenerateResponse, error)
// Scan executes compliance checks against targets
// Called during `complyctl scan` command execution
Scan(context.Context, *ScanRequest) (*ScanResponse, error)
// Describe reports plugin identity, health, and declared variable
// requirements. Called during plugin discovery and doctor diagnostics.
Describe(context.Context, *DescribeRequest) (*DescribeResponse, error)
// contains filtered or unexported methods
}
PluginServer is the server API for Plugin service. All implementations must embed UnimplementedPluginServer for forward compatibility.
Plugin service for compliance evaluation
type Result ¶
type Result int32
Result represents the outcome of a check
func (Result) Descriptor ¶
func (Result) Descriptor() protoreflect.EnumDescriptor
func (Result) EnumDescriptor
deprecated
func (Result) Number ¶
func (x Result) Number() protoreflect.EnumNumber
func (Result) Type ¶
func (Result) Type() protoreflect.EnumType
type ScanRequest ¶
type ScanRequest struct {
// Targets to scan
Targets []*Target `protobuf:"bytes,1,rep,name=targets,proto3" json:"targets,omitempty"`
// contains filtered or unexported fields
}
ScanRequest contains targets to evaluate. The scanning provider evaluates all requirements from Generate-time state. See R47: specs/001-gemara-native-workflow/research.md
func (*ScanRequest) Descriptor
deprecated
func (*ScanRequest) Descriptor() ([]byte, []int)
Deprecated: Use ScanRequest.ProtoReflect.Descriptor instead.
func (*ScanRequest) GetTargets ¶
func (x *ScanRequest) GetTargets() []*Target
func (*ScanRequest) ProtoMessage ¶
func (*ScanRequest) ProtoMessage()
func (*ScanRequest) ProtoReflect ¶
func (x *ScanRequest) ProtoReflect() protoreflect.Message
func (*ScanRequest) Reset ¶
func (x *ScanRequest) Reset()
func (*ScanRequest) String ¶
func (x *ScanRequest) String() string
type ScanResponse ¶
type ScanResponse struct {
// Assessment log entries (one per requirement evaluated)
Assessments []*AssessmentLog `protobuf:"bytes,1,rep,name=assessments,proto3" json:"assessments,omitempty"`
// contains filtered or unexported fields
}
ScanResponse contains assessment results for each requirement
func (*ScanResponse) Descriptor
deprecated
func (*ScanResponse) Descriptor() ([]byte, []int)
Deprecated: Use ScanResponse.ProtoReflect.Descriptor instead.
func (*ScanResponse) GetAssessments ¶
func (x *ScanResponse) GetAssessments() []*AssessmentLog
func (*ScanResponse) ProtoMessage ¶
func (*ScanResponse) ProtoMessage()
func (*ScanResponse) ProtoReflect ¶
func (x *ScanResponse) ProtoReflect() protoreflect.Message
func (*ScanResponse) Reset ¶
func (x *ScanResponse) Reset()
func (*ScanResponse) String ¶
func (x *ScanResponse) String() string
type Step ¶
type Step struct {
// Step name/identifier
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Step result
Result Result `protobuf:"varint,2,opt,name=result,proto3,enum=complyctl.plugin.v1.Result" json:"result,omitempty"`
// Step result message
Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
// contains filtered or unexported fields
}
Step represents a single step in the assessment process
func (*Step) Descriptor
deprecated
func (*Step) GetMessage ¶
func (*Step) ProtoMessage ¶
func (*Step) ProtoMessage()
func (*Step) ProtoReflect ¶
func (x *Step) ProtoReflect() protoreflect.Message
type Target ¶
type Target struct {
// Target identifier
TargetId string `protobuf:"bytes,1,opt,name=target_id,json=targetId,proto3" json:"target_id,omitempty"`
// Plugin-defined variables (authentication tokens, connection strings, etc.)
Variables map[string]string `` /* 145-byte string literal not displayed */
// contains filtered or unexported fields
}
Target represents a system/environment to scan
func (*Target) Descriptor
deprecated
func (*Target) GetTargetId ¶
func (*Target) GetVariables ¶
func (*Target) ProtoMessage ¶
func (*Target) ProtoMessage()
func (*Target) ProtoReflect ¶
func (x *Target) ProtoReflect() protoreflect.Message
type UnimplementedPluginServer ¶
type UnimplementedPluginServer struct{}
UnimplementedPluginServer 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 (UnimplementedPluginServer) Describe ¶
func (UnimplementedPluginServer) Describe(context.Context, *DescribeRequest) (*DescribeResponse, error)
func (UnimplementedPluginServer) Generate ¶
func (UnimplementedPluginServer) Generate(context.Context, *GenerateRequest) (*GenerateResponse, error)
func (UnimplementedPluginServer) Scan ¶
func (UnimplementedPluginServer) Scan(context.Context, *ScanRequest) (*ScanResponse, error)
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.