actions

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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

func (*Auth) JWT

func (a *Auth) JWT() *Auth

func (*Auth) String

func (a *Auth) String() string

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 CreateNewWazuhUserOptions struct {
	Username string
	Password string
}

type IndexerClient added in v0.3.1

type IndexerClient struct {
	// contains filtered or unexported fields
}

func IndexerClientFactory added in v0.3.1

func IndexerClientFactory() *IndexerClient

func (*IndexerClient) CreateNewUserInOSIndexer added in v0.3.1

func (ctl *IndexerClient) CreateNewUserInOSIndexer(opts *CreateNewIndexerUserOptions) ([]byte, error)

type IndexerRoleMappingPayload added in v0.3.1

type IndexerRoleMappingPayload struct {
	Users        []string `json:"users,omitempty"`
	BackendRoles []string `json:"backend_roles,omitempty"`
}

type Response

type Response struct {
	Data struct {
		Token string `json:"token"`
	} `json:"data"`
	Error int `json:"error"`
}

type WazctlClient

type WazctlClient struct {
	Client *api.APIClient
	Ctx    context.Context
}

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()
}

Jump to

Keyboard shortcuts

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