config

package
v0.0.0-...-221c3f5 Latest Latest
Warning

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

Go to latest
Published: May 16, 2026 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigService_StreamConfig_FullMethodName = "/config.ConfigService/StreamConfig"
)

Variables

View Source
var (
	PluginType_name = map[int32]string{
		0: "UNKNOWN",
		1: "AWS_IAM_USER",
		2: "AZURE",
		3: "BITDEFENDER",
		4: "GCP",
		5: "O365",
		6: "SOC_AI",
		7: "SOPHOS",
		8: "CROWDSTRIKE",
	}
	PluginType_value = map[string]int32{
		"UNKNOWN":      0,
		"AWS_IAM_USER": 1,
		"AZURE":        2,
		"BITDEFENDER":  3,
		"GCP":          4,
		"O365":         5,
		"SOC_AI":       6,
		"SOPHOS":       7,
		"CROWDSTRIKE":  8,
	}
)

Enum value maps for PluginType.

View Source
var AllModules = map[string]PluginType{
	"AWS_IAM_USER": PluginType_AWS_IAM_USER,
	"AZURE":        PluginType_AZURE,
	"BITDEFENDER":  PluginType_BITDEFENDER,
	"GCP":          PluginType_GCP,
	"O365":         PluginType_O365,
	"SOC_AI":       PluginType_SOC_AI,
	"SOPHOS":       PluginType_SOPHOS,
	"CROWDSTRIKE":  PluginType_CROWDSTRIKE,
}
View Source
var ConfigService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "config.ConfigService",
	HandlerType: (*ConfigServiceServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "StreamConfig",
			Handler:       _ConfigService_StreamConfig_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "config.proto",
}

ConfigService_ServiceDesc is the grpc.ServiceDesc for ConfigService 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_config_proto protoreflect.FileDescriptor

Functions

func RegisterConfigServiceServer

func RegisterConfigServiceServer(s grpc.ServiceRegistrar, srv ConfigServiceServer)

Types

type BiDirectionalMessage

type BiDirectionalMessage struct {

	// Types that are valid to be assigned to Payload:
	//
	//	*BiDirectionalMessage_PluginInit
	//	*BiDirectionalMessage_Config
	Payload isBiDirectionalMessage_Payload `protobuf_oneof:"payload"`
	// contains filtered or unexported fields
}

func (*BiDirectionalMessage) Descriptor deprecated

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

Deprecated: Use BiDirectionalMessage.ProtoReflect.Descriptor instead.

func (*BiDirectionalMessage) GetConfig

func (*BiDirectionalMessage) GetPayload

func (x *BiDirectionalMessage) GetPayload() isBiDirectionalMessage_Payload

func (*BiDirectionalMessage) GetPluginInit

func (x *BiDirectionalMessage) GetPluginInit() *PluginInit

func (*BiDirectionalMessage) ProtoMessage

func (*BiDirectionalMessage) ProtoMessage()

func (*BiDirectionalMessage) ProtoReflect

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

func (*BiDirectionalMessage) Reset

func (x *BiDirectionalMessage) Reset()

func (*BiDirectionalMessage) String

func (x *BiDirectionalMessage) String() string

type BiDirectionalMessage_Config

type BiDirectionalMessage_Config struct {
	Config *ConfigurationSection `protobuf:"bytes,2,opt,name=config,proto3,oneof"`
}

type BiDirectionalMessage_PluginInit

type BiDirectionalMessage_PluginInit struct {
	PluginInit *PluginInit `protobuf:"bytes,1,opt,name=plugin_init,json=pluginInit,proto3,oneof"`
}

type ConfigServer

type ConfigServer struct {
	UnimplementedConfigServiceServer
	// contains filtered or unexported fields
}

func GetConfigServer

func GetConfigServer() *ConfigServer

func (*ConfigServer) GetModuleGroup

func (s *ConfigServer) GetModuleGroup(moduleName PluginType) *ConfigurationSection

func (*ConfigServer) NotifyUpdate

func (s *ConfigServer) NotifyUpdate(moduleName string, section *ConfigurationSection)

func (*ConfigServer) SetDecrypter

func (s *ConfigServer) SetDecrypter(d Decrypter)

func (*ConfigServer) StartPeriodicRetry

func (s *ConfigServer) StartPeriodicRetry(backend string, internalKey string)

func (*ConfigServer) StreamConfig

func (s *ConfigServer) StreamConfig(stream ConfigService_StreamConfigServer) error

func (*ConfigServer) SyncConfigs

func (s *ConfigServer) SyncConfigs(backend string, internalKey string)

type ConfigServiceClient

type ConfigServiceClient interface {
	StreamConfig(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[BiDirectionalMessage, BiDirectionalMessage], error)
}

ConfigServiceClient is the client API for ConfigService 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 ConfigServiceServer

type ConfigServiceServer interface {
	StreamConfig(grpc.BidiStreamingServer[BiDirectionalMessage, BiDirectionalMessage]) error
	// contains filtered or unexported methods
}

ConfigServiceServer is the server API for ConfigService service. All implementations must embed UnimplementedConfigServiceServer for forward compatibility.

type ConfigService_StreamConfigClient

type ConfigService_StreamConfigClient = grpc.BidiStreamingClient[BiDirectionalMessage, BiDirectionalMessage]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type ConfigService_StreamConfigServer

type ConfigService_StreamConfigServer = grpc.BidiStreamingServer[BiDirectionalMessage, BiDirectionalMessage]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Configuration

type Configuration struct {
	Id              int32  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	GroupId         int32  `protobuf:"varint,2,opt,name=groupId,proto3" json:"groupId,omitempty"`
	ConfKey         string `protobuf:"bytes,3,opt,name=confKey,proto3" json:"confKey,omitempty"`
	ConfValue       string `protobuf:"bytes,4,opt,name=confValue,proto3" json:"confValue,omitempty"`
	ConfName        string `protobuf:"bytes,5,opt,name=confName,proto3" json:"confName,omitempty"`
	ConfDescription string `protobuf:"bytes,6,opt,name=confDescription,proto3" json:"confDescription,omitempty"`
	ConfDataType    string `protobuf:"bytes,7,opt,name=confDataType,proto3" json:"confDataType,omitempty"`
	ConfRequired    bool   `protobuf:"varint,8,opt,name=confRequired,proto3" json:"confRequired,omitempty"`
	// contains filtered or unexported fields
}

func (*Configuration) Descriptor deprecated

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

Deprecated: Use Configuration.ProtoReflect.Descriptor instead.

func (*Configuration) GetConfDataType

func (x *Configuration) GetConfDataType() string

func (*Configuration) GetConfDescription

func (x *Configuration) GetConfDescription() string

func (*Configuration) GetConfKey

func (x *Configuration) GetConfKey() string

func (*Configuration) GetConfName

func (x *Configuration) GetConfName() string

func (*Configuration) GetConfRequired

func (x *Configuration) GetConfRequired() bool

func (*Configuration) GetConfValue

func (x *Configuration) GetConfValue() string

func (*Configuration) GetGroupId

func (x *Configuration) GetGroupId() int32

func (*Configuration) GetId

func (x *Configuration) GetId() int32

func (*Configuration) ProtoMessage

func (*Configuration) ProtoMessage()

func (*Configuration) ProtoReflect

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

func (*Configuration) Reset

func (x *Configuration) Reset()

func (*Configuration) String

func (x *Configuration) String() string

type ConfigurationSection

type ConfigurationSection struct {
	Id                int32          `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	ServerId          int32          `protobuf:"varint,2,opt,name=serverId,proto3" json:"serverId,omitempty"`
	PrettyName        string         `protobuf:"bytes,3,opt,name=prettyName,proto3" json:"prettyName,omitempty"`
	ModuleName        string         `protobuf:"bytes,4,opt,name=moduleName,proto3" json:"moduleName,omitempty"`
	ModuleDescription string         `protobuf:"bytes,5,opt,name=moduleDescription,proto3" json:"moduleDescription,omitempty"`
	ModuleActive      bool           `protobuf:"varint,6,opt,name=moduleActive,proto3" json:"moduleActive,omitempty"`
	ModuleIcon        string         `protobuf:"bytes,7,opt,name=moduleIcon,proto3" json:"moduleIcon,omitempty"`
	ModuleCategory    string         `protobuf:"bytes,8,opt,name=moduleCategory,proto3" json:"moduleCategory,omitempty"`
	LiteVersion       bool           `protobuf:"varint,9,opt,name=liteVersion,proto3" json:"liteVersion,omitempty"`
	NeedsRestart      bool           `protobuf:"varint,10,opt,name=needsRestart,proto3" json:"needsRestart,omitempty"`
	ModuleGroups      []*ModuleGroup `protobuf:"bytes,11,rep,name=moduleGroups,proto3" json:"moduleGroups,omitempty"`
	Activatable       bool           `protobuf:"varint,12,opt,name=activatable,proto3" json:"activatable,omitempty"`
	// contains filtered or unexported fields
}

func (*ConfigurationSection) Descriptor deprecated

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

Deprecated: Use ConfigurationSection.ProtoReflect.Descriptor instead.

func (*ConfigurationSection) GetActivatable

func (x *ConfigurationSection) GetActivatable() bool

func (*ConfigurationSection) GetId

func (x *ConfigurationSection) GetId() int32

func (*ConfigurationSection) GetLiteVersion

func (x *ConfigurationSection) GetLiteVersion() bool

func (*ConfigurationSection) GetModuleActive

func (x *ConfigurationSection) GetModuleActive() bool

func (*ConfigurationSection) GetModuleCategory

func (x *ConfigurationSection) GetModuleCategory() string

func (*ConfigurationSection) GetModuleDescription

func (x *ConfigurationSection) GetModuleDescription() string

func (*ConfigurationSection) GetModuleGroups

func (x *ConfigurationSection) GetModuleGroups() []*ModuleGroup

func (*ConfigurationSection) GetModuleIcon

func (x *ConfigurationSection) GetModuleIcon() string

func (*ConfigurationSection) GetModuleName

func (x *ConfigurationSection) GetModuleName() string

func (*ConfigurationSection) GetNeedsRestart

func (x *ConfigurationSection) GetNeedsRestart() bool

func (*ConfigurationSection) GetPrettyName

func (x *ConfigurationSection) GetPrettyName() string

func (*ConfigurationSection) GetServerId

func (x *ConfigurationSection) GetServerId() int32

func (*ConfigurationSection) ProtoMessage

func (*ConfigurationSection) ProtoMessage()

func (*ConfigurationSection) ProtoReflect

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

func (*ConfigurationSection) Reset

func (x *ConfigurationSection) Reset()

func (*ConfigurationSection) String

func (x *ConfigurationSection) String() string

type Decrypter

type Decrypter func(*ConfigurationSection) error

type ModuleGroup

type ModuleGroup struct {
	Id                        int32            `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	ModuleId                  int32            `protobuf:"varint,2,opt,name=moduleId,proto3" json:"moduleId,omitempty"`
	GroupName                 string           `protobuf:"bytes,3,opt,name=groupName,proto3" json:"groupName,omitempty"`
	GroupDescription          string           `protobuf:"bytes,4,opt,name=groupDescription,proto3" json:"groupDescription,omitempty"`
	ModuleGroupConfigurations []*Configuration `protobuf:"bytes,5,rep,name=moduleGroupConfigurations,proto3" json:"moduleGroupConfigurations,omitempty"`
	Collector                 string           `protobuf:"bytes,6,opt,name=collector,proto3" json:"collector,omitempty"`
	// contains filtered or unexported fields
}

func (*ModuleGroup) Descriptor deprecated

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

Deprecated: Use ModuleGroup.ProtoReflect.Descriptor instead.

func (*ModuleGroup) GetCollector

func (x *ModuleGroup) GetCollector() string

func (*ModuleGroup) GetGroupDescription

func (x *ModuleGroup) GetGroupDescription() string

func (*ModuleGroup) GetGroupName

func (x *ModuleGroup) GetGroupName() string

func (*ModuleGroup) GetId

func (x *ModuleGroup) GetId() int32

func (*ModuleGroup) GetModuleGroupConfigurations

func (x *ModuleGroup) GetModuleGroupConfigurations() []*Configuration

func (*ModuleGroup) GetModuleId

func (x *ModuleGroup) GetModuleId() int32

func (*ModuleGroup) ProtoMessage

func (*ModuleGroup) ProtoMessage()

func (*ModuleGroup) ProtoReflect

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

func (*ModuleGroup) Reset

func (x *ModuleGroup) Reset()

func (*ModuleGroup) String

func (x *ModuleGroup) String() string

type PluginInit

type PluginInit struct {
	Type PluginType `protobuf:"varint,1,opt,name=type,proto3,enum=config.PluginType" json:"type,omitempty"`
	// contains filtered or unexported fields
}

func (*PluginInit) Descriptor deprecated

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

Deprecated: Use PluginInit.ProtoReflect.Descriptor instead.

func (*PluginInit) GetType

func (x *PluginInit) GetType() PluginType

func (*PluginInit) ProtoMessage

func (*PluginInit) ProtoMessage()

func (*PluginInit) ProtoReflect

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

func (*PluginInit) Reset

func (x *PluginInit) Reset()

func (*PluginInit) String

func (x *PluginInit) String() string

type PluginType

type PluginType int32
const (
	PluginType_UNKNOWN      PluginType = 0
	PluginType_AWS_IAM_USER PluginType = 1
	PluginType_AZURE        PluginType = 2
	PluginType_BITDEFENDER  PluginType = 3
	PluginType_GCP          PluginType = 4
	PluginType_O365         PluginType = 5
	PluginType_SOC_AI       PluginType = 6
	PluginType_SOPHOS       PluginType = 7
	PluginType_CROWDSTRIKE  PluginType = 8
)

func (PluginType) Descriptor

func (PluginType) Descriptor() protoreflect.EnumDescriptor

func (PluginType) Enum

func (x PluginType) Enum() *PluginType

func (PluginType) EnumDescriptor deprecated

func (PluginType) EnumDescriptor() ([]byte, []int)

Deprecated: Use PluginType.Descriptor instead.

func (PluginType) Number

func (x PluginType) Number() protoreflect.EnumNumber

func (PluginType) String

func (x PluginType) String() string

func (PluginType) Type

type UnimplementedConfigServiceServer

type UnimplementedConfigServiceServer struct{}

UnimplementedConfigServiceServer 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.

type UnsafeConfigServiceServer

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

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

Jump to

Keyboard shortcuts

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