v1alpha1

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package v1alpha1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_proto_v1alpha1_tfsec_collector_proto protoreflect.FileDescriptor
View Source
var TfsecCollector_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "tfsec_collector.v1alpha1.TfsecCollector",
	HandlerType: (*TfsecCollectorServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateScan",
			Handler:    _TfsecCollector_CreateScan_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/v1alpha1/tfsec_collector.proto",
}

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

Functions

func RegisterTfsecCollectorHandler

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

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

func RegisterTfsecCollectorHandlerClient

func RegisterTfsecCollectorHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TfsecCollectorClient) error

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

func RegisterTfsecCollectorHandlerFromEndpoint

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

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

func RegisterTfsecCollectorHandlerServer

func RegisterTfsecCollectorHandlerServer(ctx context.Context, mux *runtime.ServeMux, server TfsecCollectorServer) error

RegisterTfsecCollectorHandlerServer registers the http handlers for service TfsecCollector to "mux". UnaryRPC :call TfsecCollectorServer 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 RegisterTfsecCollectorHandlerFromEndpoint instead.

func RegisterTfsecCollectorServer

func RegisterTfsecCollectorServer(s grpc.ServiceRegistrar, srv TfsecCollectorServer)

Types

type CreateScanRequest

type CreateScanRequest struct {

	// commit_id is the Git SHA of the Terraform source code
	CommitId string `protobuf:"bytes,1,opt,name=commit_id,json=commitId,proto3" json:"commit_id,omitempty"`
	// a link to the source code
	Repository string `protobuf:"bytes,2,opt,name=repository,proto3" json:"repository,omitempty"`
	// the absolute path to the Terraform source code. Used to normalize the scan results
	ScanDirectory string `protobuf:"bytes,3,opt,name=scan_directory,json=scanDirectory,proto3" json:"scan_directory,omitempty"`
	// tfsec scan output
	Results []*TfsecScanRuleViolation `protobuf:"bytes,4,rep,name=results,proto3" json:"results,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateScanRequest) Descriptor deprecated

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

Deprecated: Use CreateScanRequest.ProtoReflect.Descriptor instead.

func (*CreateScanRequest) GetCommitId

func (x *CreateScanRequest) GetCommitId() string

func (*CreateScanRequest) GetRepository

func (x *CreateScanRequest) GetRepository() string

func (*CreateScanRequest) GetResults

func (x *CreateScanRequest) GetResults() []*TfsecScanRuleViolation

func (*CreateScanRequest) GetScanDirectory

func (x *CreateScanRequest) GetScanDirectory() string

func (*CreateScanRequest) ProtoMessage

func (*CreateScanRequest) ProtoMessage()

func (*CreateScanRequest) ProtoReflect

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

func (*CreateScanRequest) Reset

func (x *CreateScanRequest) Reset()

func (*CreateScanRequest) String

func (x *CreateScanRequest) String() string

type SourceCodeLocation

type SourceCodeLocation struct {
	Filename  string `protobuf:"bytes,1,opt,name=filename,proto3" json:"filename,omitempty"`
	StartLine int32  `protobuf:"varint,2,opt,name=start_line,json=startLine,proto3" json:"start_line,omitempty"`
	EndLine   int32  `protobuf:"varint,3,opt,name=end_line,json=endLine,proto3" json:"end_line,omitempty"`
	// contains filtered or unexported fields
}

func (*SourceCodeLocation) Descriptor deprecated

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

Deprecated: Use SourceCodeLocation.ProtoReflect.Descriptor instead.

func (*SourceCodeLocation) GetEndLine

func (x *SourceCodeLocation) GetEndLine() int32

func (*SourceCodeLocation) GetFilename

func (x *SourceCodeLocation) GetFilename() string

func (*SourceCodeLocation) GetStartLine

func (x *SourceCodeLocation) GetStartLine() int32

func (*SourceCodeLocation) ProtoMessage

func (*SourceCodeLocation) ProtoMessage()

func (*SourceCodeLocation) ProtoReflect

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

func (*SourceCodeLocation) Reset

func (x *SourceCodeLocation) Reset()

func (*SourceCodeLocation) String

func (x *SourceCodeLocation) String() string

type TfsecCollectorClient

type TfsecCollectorClient interface {
	CreateScan(ctx context.Context, in *CreateScanRequest, opts ...grpc.CallOption) (*empty.Empty, error)
}

TfsecCollectorClient is the client API for TfsecCollector 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.

type TfsecCollectorServer

type TfsecCollectorServer interface {
	CreateScan(context.Context, *CreateScanRequest) (*empty.Empty, error)
}

TfsecCollectorServer is the server API for TfsecCollector service. All implementations should embed UnimplementedTfsecCollectorServer for forward compatibility

type TfsecScanRuleViolation

type TfsecScanRuleViolation struct {
	RuleId          string              `protobuf:"bytes,1,opt,name=rule_id,json=ruleId,proto3" json:"rule_id,omitempty"`
	RuleDescription string              `protobuf:"bytes,2,opt,name=rule_description,json=ruleDescription,proto3" json:"rule_description,omitempty"`
	RuleProvider    string              `protobuf:"bytes,3,opt,name=rule_provider,json=ruleProvider,proto3" json:"rule_provider,omitempty"`
	Link            string              `protobuf:"bytes,4,opt,name=link,proto3" json:"link,omitempty"`
	Location        *SourceCodeLocation `protobuf:"bytes,5,opt,name=location,proto3" json:"location,omitempty"`
	Description     string              `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"`
	Impact          string              `protobuf:"bytes,7,opt,name=impact,proto3" json:"impact,omitempty"`
	Resolution      string              `protobuf:"bytes,8,opt,name=resolution,proto3" json:"resolution,omitempty"`
	Severity        string              `protobuf:"bytes,9,opt,name=severity,proto3" json:"severity,omitempty"`
	Passed          bool                `protobuf:"varint,10,opt,name=passed,proto3" json:"passed,omitempty"`
	// contains filtered or unexported fields
}

func (*TfsecScanRuleViolation) Descriptor deprecated

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

Deprecated: Use TfsecScanRuleViolation.ProtoReflect.Descriptor instead.

func (*TfsecScanRuleViolation) GetDescription

func (x *TfsecScanRuleViolation) GetDescription() string

func (*TfsecScanRuleViolation) GetImpact

func (x *TfsecScanRuleViolation) GetImpact() string
func (x *TfsecScanRuleViolation) GetLink() string

func (*TfsecScanRuleViolation) GetLocation

func (x *TfsecScanRuleViolation) GetLocation() *SourceCodeLocation

func (*TfsecScanRuleViolation) GetPassed

func (x *TfsecScanRuleViolation) GetPassed() bool

func (*TfsecScanRuleViolation) GetResolution

func (x *TfsecScanRuleViolation) GetResolution() string

func (*TfsecScanRuleViolation) GetRuleDescription

func (x *TfsecScanRuleViolation) GetRuleDescription() string

func (*TfsecScanRuleViolation) GetRuleId

func (x *TfsecScanRuleViolation) GetRuleId() string

func (*TfsecScanRuleViolation) GetRuleProvider

func (x *TfsecScanRuleViolation) GetRuleProvider() string

func (*TfsecScanRuleViolation) GetSeverity

func (x *TfsecScanRuleViolation) GetSeverity() string

func (*TfsecScanRuleViolation) ProtoMessage

func (*TfsecScanRuleViolation) ProtoMessage()

func (*TfsecScanRuleViolation) ProtoReflect

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

func (*TfsecScanRuleViolation) Reset

func (x *TfsecScanRuleViolation) Reset()

func (*TfsecScanRuleViolation) String

func (x *TfsecScanRuleViolation) String() string

type UnimplementedTfsecCollectorServer

type UnimplementedTfsecCollectorServer struct {
}

UnimplementedTfsecCollectorServer should be embedded to have forward compatible implementations.

func (UnimplementedTfsecCollectorServer) CreateScan

type UnsafeTfsecCollectorServer

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

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

Jump to

Keyboard shortcuts

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