Documentation
¶
Index ¶
- func IndexerClientFactory() *opensearchapi.Client
- func IndexerConfig() (*opensearchapi.Config, error)
- func WazuhConfig() (*api.Configuration, error)
- type Auth
- type CreateIndexerUserPayload
- type CreateNewIndexerUserOptions
- type CreateNewWazuhUserOptions
- type IdexerClientMethods
- type IndexerClient
- type IndexerRoleMappingPayload
- type Response
- type WazctlClient
- type WazuhClientMethods
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IndexerClientFactory ¶ added in v0.3.1
func IndexerClientFactory() *opensearchapi.Client
func IndexerConfig ¶ added in v0.3.1
func IndexerConfig() (*opensearchapi.Config, error)
Config creates and validates the Wazuh API client configuration
func WazuhConfig ¶ added in v0.3.1
func WazuhConfig() (*api.Configuration, error)
WazuhConfig creates and validates the Wazuh API client configuration
Types ¶
type Auth ¶
type Auth struct {
// contains filtered or unexported fields
}
func AuthWithUsernameAndPassword ¶
func AuthWithUsernameAndPassword(config configurations.WazuhCtlConfig) *Auth
type CreateIndexerUserPayload ¶ added in v0.3.1
type CreateIndexerUserPayload struct {
Password string `json:"password"`
}
type CreateNewIndexerUserOptions ¶ added in v0.3.1
type CreateNewIndexerUserOptions struct {
CreateIndexerUserPayload
IndexerRoleMappingPayload
}
type CreateNewWazuhUserOptions ¶ added in v0.3.1
type IdexerClientMethods ¶ added in v0.3.1
type IdexerClientMethods interface {
// User operations
CreateNewUserInOSIndexer()
}
type IndexerClient ¶ added in v0.3.1
type IndexerClient struct {
Client *opensearchapi.Client
Ctx context.Context
}
func (*IndexerClient) CreateNewUserInOSIndexer ¶ added in v0.3.1
func (ctl *IndexerClient) CreateNewUserInOSIndexer(opts *CreateNewIndexerUserOptions) ([]byte, error)
type IndexerRoleMappingPayload ¶ added in v0.3.1
type WazctlClient ¶
func WazctlClientFactory ¶
func WazctlClientFactory() *WazctlClient
func (*WazctlClient) CreateNewUserInWazuhManager ¶
func (ctl *WazctlClient) CreateNewUserInWazuhManager(opts *CreateNewWazuhUserOptions) ([]byte, error)
Creates a new user in the wazuh instance
func (*WazctlClient) GetAllAgentsFromWazuhManager ¶
func (ctl *WazctlClient) GetAllAgentsFromWazuhManager() ([]byte, error)
type WazuhClientMethods ¶ added in v0.3.1
type WazuhClientMethods interface {
// Agent operations
GetAllAgentsFromWazuhManager()
// User operations
CreateNewUserInWazuh()
GetUsersInWazuh()
}
Click to show internal directories.
Click to hide internal directories.