gen

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CollectorService_SendCommands_FullMethodName  = "/api.v1.CollectorService/SendCommands"
	CollectorService_SendProcesses_FullMethodName = "/api.v1.CollectorService/SendProcesses"
)

Variables

View Source
var CollectorService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "api.v1.CollectorService",
	HandlerType: (*CollectorServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SendCommands",
			Handler:    _CollectorService_SendCommands_Handler,
		},
		{
			MethodName: "SendProcesses",
			Handler:    _CollectorService_SendProcesses_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/v1/collector.proto",
}

CollectorService_ServiceDesc is the grpc.ServiceDesc for CollectorService 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_api_v1_collector_proto protoreflect.FileDescriptor

Functions

func RegisterCollectorServiceServer

func RegisterCollectorServiceServer(s grpc.ServiceRegistrar, srv CollectorServiceServer)

Types

type Auth

type Auth struct {
	UserId      string  `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`                      // Unique identifer for user that is processing the data
	TeamId      string  `protobuf:"bytes,2,opt,name=team_id,json=teamId,proto3" json:"team_id,omitempty"`                      // Unique identifier for users team
	WorkspaceId *string `protobuf:"bytes,3,opt,name=workspace_id,json=workspaceId,proto3,oneof" json:"workspace_id,omitempty"` // Unique identifier of the Workspace that is running the request
	UserEmail   string  `protobuf:"bytes,4,opt,name=user_email,json=userEmail,proto3" json:"user_email,omitempty"`             // Unique identifier of user that is processing the data
	// contains filtered or unexported fields
}

Define a message representing an auth information about user and team.

func (*Auth) Descriptor deprecated

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

Deprecated: Use Auth.ProtoReflect.Descriptor instead.

func (*Auth) GetTeamId

func (x *Auth) GetTeamId() string

func (*Auth) GetUserEmail

func (x *Auth) GetUserEmail() string

func (*Auth) GetUserId

func (x *Auth) GetUserId() string

func (*Auth) GetWorkspaceId

func (x *Auth) GetWorkspaceId() string

func (*Auth) ProtoMessage

func (*Auth) ProtoMessage()

func (*Auth) ProtoReflect

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

func (*Auth) Reset

func (x *Auth) Reset()

func (*Auth) String

func (x *Auth) String() string

type CollectorServiceClient

type CollectorServiceClient interface {
	// RPC method for sending command data.
	SendCommands(ctx context.Context, in *SendCommandsRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// RPC method for sending process data.
	SendProcesses(ctx context.Context, in *SendProcessesRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

CollectorServiceClient is the client API for CollectorService 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 CollectorServiceServer

type CollectorServiceServer interface {
	// RPC method for sending command data.
	SendCommands(context.Context, *SendCommandsRequest) (*emptypb.Empty, error)
	// RPC method for sending process data.
	SendProcesses(context.Context, *SendProcessesRequest) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

CollectorServiceServer is the server API for CollectorService service. All implementations must embed UnimplementedCollectorServiceServer for forward compatibility

type Command

type Command struct {
	Id            int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`                                            // Unique identifier for the command.
	Category      string `protobuf:"bytes,2,opt,name=category,proto3" json:"category,omitempty"`                                 // Category of the command (e.g., system, user).
	Command       string `protobuf:"bytes,3,opt,name=command,proto3" json:"command,omitempty"`                                   // The actual command string.
	User          string `protobuf:"bytes,4,opt,name=user,proto3" json:"user,omitempty"`                                         // The user who executed the command.
	Directory     string `protobuf:"bytes,5,opt,name=directory,proto3" json:"directory,omitempty"`                               // The directory from which the command was executed.
	ExecutionTime int64  `protobuf:"varint,6,opt,name=execution_time,json=executionTime,proto3" json:"execution_time,omitempty"` // Execution time of the command in milliseconds.
	StartTime     int64  `protobuf:"varint,7,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`             // Start time of the command execution (Unix timestamp).
	EndTime       int64  `protobuf:"varint,8,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"`                   // End time of the command execution (Unix timestamp).
	Result        string `protobuf:"bytes,9,opt,name=result,proto3" json:"result,omitempty"`                                     // Result of executed command => success/failure
	Status        string `protobuf:"bytes,10,opt,name=status,proto3" json:"status,omitempty"`                                    // Status of executed command
	Repository    string `protobuf:"bytes,11,opt,name=repository,proto3" json:"repository,omitempty"`                            // Repository is repository where commands are executed
	Pid           int64  `protobuf:"varint,12,opt,name=pid,proto3" json:"pid,omitempty"`                                         // PID of the command
	// contains filtered or unexported fields
}

Define a message representing a command, including its metadata and timing information.

func (*Command) Descriptor deprecated

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

Deprecated: Use Command.ProtoReflect.Descriptor instead.

func (*Command) GetCategory

func (x *Command) GetCategory() string

func (*Command) GetCommand

func (x *Command) GetCommand() string

func (*Command) GetDirectory

func (x *Command) GetDirectory() string

func (*Command) GetEndTime

func (x *Command) GetEndTime() int64

func (*Command) GetExecutionTime

func (x *Command) GetExecutionTime() int64

func (*Command) GetId

func (x *Command) GetId() int64

func (*Command) GetPid

func (x *Command) GetPid() int64

func (*Command) GetRepository

func (x *Command) GetRepository() string

func (*Command) GetResult

func (x *Command) GetResult() string

func (*Command) GetStartTime

func (x *Command) GetStartTime() int64

func (*Command) GetStatus

func (x *Command) GetStatus() string

func (*Command) GetUser

func (x *Command) GetUser() string

func (*Command) ProtoMessage

func (*Command) ProtoMessage()

func (*Command) ProtoReflect

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

func (*Command) Reset

func (x *Command) Reset()

func (*Command) String

func (x *Command) String() string

type Process

type Process struct {
	Id             int64   `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`                                              // Unique identifier for the process.
	Pid            int64   `protobuf:"varint,2,opt,name=pid,proto3" json:"pid,omitempty"`                                            // Process ID.
	Name           string  `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`                                           // Process name.
	Status         string  `protobuf:"bytes,4,opt,name=status,proto3" json:"status,omitempty"`                                       // Current status of the process (e.g., running, sleeping).
	CreatedTime    int64   `protobuf:"varint,5,opt,name=created_time,json=createdTime,proto3" json:"created_time,omitempty"`         // Creation time of the process (Unix timestamp).
	StoredTime     int64   `protobuf:"varint,6,opt,name=stored_time,json=storedTime,proto3" json:"stored_time,omitempty"`            // Time at which the process information was stored (Unix timestamp).
	Os             string  `protobuf:"bytes,7,opt,name=os,proto3" json:"os,omitempty"`                                               // Operating system the process is running on.
	Platform       string  `protobuf:"bytes,8,opt,name=platform,proto3" json:"platform,omitempty"`                                   // Platform information (e.g., Linux, Windows).
	PlatformFamily string  `protobuf:"bytes,9,opt,name=platform_family,json=platformFamily,proto3" json:"platform_family,omitempty"` // More detailed platform family information.
	CpuUsage       float64 `protobuf:"fixed64,10,opt,name=cpu_usage,json=cpuUsage,proto3" json:"cpu_usage,omitempty"`                // CPU usage percentage by the process.
	MemoryUsage    float64 `protobuf:"fixed64,11,opt,name=memory_usage,json=memoryUsage,proto3" json:"memory_usage,omitempty"`       // Memory usage by the process in megabytes.
	Ppid           int64   `protobuf:"varint,12,opt,name=ppid,proto3" json:"ppid,omitempty"`                                         // Parent process ID.
	// contains filtered or unexported fields
}

Define a message representing a process, including its metadata and resource usage.

func (*Process) Descriptor deprecated

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

Deprecated: Use Process.ProtoReflect.Descriptor instead.

func (*Process) GetCpuUsage

func (x *Process) GetCpuUsage() float64

func (*Process) GetCreatedTime

func (x *Process) GetCreatedTime() int64

func (*Process) GetId

func (x *Process) GetId() int64

func (*Process) GetMemoryUsage

func (x *Process) GetMemoryUsage() float64

func (*Process) GetName

func (x *Process) GetName() string

func (*Process) GetOs

func (x *Process) GetOs() string

func (*Process) GetPid

func (x *Process) GetPid() int64

func (*Process) GetPlatform

func (x *Process) GetPlatform() string

func (*Process) GetPlatformFamily

func (x *Process) GetPlatformFamily() string

func (*Process) GetPpid

func (x *Process) GetPpid() int64

func (*Process) GetStatus

func (x *Process) GetStatus() string

func (*Process) GetStoredTime

func (x *Process) GetStoredTime() int64

func (*Process) ProtoMessage

func (*Process) ProtoMessage()

func (*Process) ProtoReflect

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

func (*Process) Reset

func (x *Process) Reset()

func (*Process) String

func (x *Process) String() string

type SendCommandsRequest

type SendCommandsRequest struct {
	Commands []*Command `protobuf:"bytes,1,rep,name=commands,proto3" json:"commands,omitempty"` // A list of commands.
	Auth     *Auth      `protobuf:"bytes,2,opt,name=auth,proto3,oneof" json:"auth,omitempty"`   // Optional auth configuration
	// contains filtered or unexported fields
}

Defines a request for sending a collection of commands.

func (*SendCommandsRequest) Descriptor deprecated

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

Deprecated: Use SendCommandsRequest.ProtoReflect.Descriptor instead.

func (*SendCommandsRequest) GetAuth

func (x *SendCommandsRequest) GetAuth() *Auth

func (*SendCommandsRequest) GetCommands

func (x *SendCommandsRequest) GetCommands() []*Command

func (*SendCommandsRequest) ProtoMessage

func (*SendCommandsRequest) ProtoMessage()

func (*SendCommandsRequest) ProtoReflect

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

func (*SendCommandsRequest) Reset

func (x *SendCommandsRequest) Reset()

func (*SendCommandsRequest) String

func (x *SendCommandsRequest) String() string

type SendProcessesRequest

type SendProcessesRequest struct {
	Processes []*Process `protobuf:"bytes,1,rep,name=processes,proto3" json:"processes,omitempty"` // A list of processes.
	Auth      *Auth      `protobuf:"bytes,2,opt,name=auth,proto3,oneof" json:"auth,omitempty"`     // Optional auth configuration
	// contains filtered or unexported fields
}

Defines a request for sending a collection of processes.

func (*SendProcessesRequest) Descriptor deprecated

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

Deprecated: Use SendProcessesRequest.ProtoReflect.Descriptor instead.

func (*SendProcessesRequest) GetAuth

func (x *SendProcessesRequest) GetAuth() *Auth

func (*SendProcessesRequest) GetProcesses

func (x *SendProcessesRequest) GetProcesses() []*Process

func (*SendProcessesRequest) ProtoMessage

func (*SendProcessesRequest) ProtoMessage()

func (*SendProcessesRequest) ProtoReflect

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

func (*SendProcessesRequest) Reset

func (x *SendProcessesRequest) Reset()

func (*SendProcessesRequest) String

func (x *SendProcessesRequest) String() string

type UnimplementedCollectorServiceServer

type UnimplementedCollectorServiceServer struct {
}

UnimplementedCollectorServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedCollectorServiceServer) SendCommands

func (UnimplementedCollectorServiceServer) SendProcesses

type UnsafeCollectorServiceServer

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

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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