actions

package
v0.0.23 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Config

func Config() (*api.Configuration, error)

Config 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 Client

type Client interface {
	// Agent operations
	GetAllAgentsFromWazuhManager()

	// User operations
	CreateNewUserInWazuh()
	GetUsersInWazuh()
}

type CreateNewUserInWazuhManagerOptions

type CreateNewUserInWazuhManagerOptions struct {
	Username string
	Password string
}

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 *CreateNewUserInWazuhManagerOptions) ([]byte, error)

Creates a new user in the wazuh instance

func (*WazctlClient) GetAllAgentsFromWazuhManager

func (ctl *WazctlClient) GetAllAgentsFromWazuhManager() ([]byte, error)

Jump to

Keyboard shortcuts

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