biz

package
v0.0.0-...-d3948d2 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type ChatRepo

type ChatRepo interface {
	GetChatPromptsFromText(ctx context.Context, text string) ([]*Propmpt, error)
}

type ChatUsecase

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

func NewChatUsecase

func NewChatUsecase(repo ChatRepo, logger l.Logger) *ChatUsecase

func (*ChatUsecase) GetChatPromptsFromText

func (uc *ChatUsecase) GetChatPromptsFromText(ctx context.Context, text string) ([]*Propmpt, error)

type CpuAverageUtilization

type CpuAverageUtilization struct {
	Value string
}

type CpuBreakdownUtilization

type CpuBreakdownUtilization struct {
	UserTime   string
	SystemTime string
}

type CpuPeakUtilization

type CpuPeakUtilization struct {
	Value string
	Time  string
}

type CpuState

type CpuState struct {
	Util  *CpuUtilization
	Usage []*CpuUsage
}

type CpuStateRepo

type CpuStateRepo interface {
	GetCpuState(ctx context.Context, start int64, end int64) (*CpuState, error)
}

type CpuStateUsecase

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

func NewCpuStateUsecase

func NewCpuStateUsecase(repo CpuStateRepo, logger l.Logger) *CpuStateUsecase

func (*CpuStateUsecase) GetCpuState

func (uc *CpuStateUsecase) GetCpuState(ctx context.Context, start int64, end int64) (*CpuState, error)

type CpuUsage

type CpuUsage struct {
	AppName string
	Usage   string
}

type CpuUtilization

type CpuUtilization struct {
	Server               string
	AverageUtilization   *CpuAverageUtilization
	PeakUtilization      *CpuPeakUtilization
	BreakdownUtilization *CpuBreakdownUtilization
}

type HostActivity

type HostActivity struct {
	Id                 string
	Time               string
	HostNumber         int64
	HostActivityNumber int64
	HostIdleNumber     int64
	HostActivityIps    string
}

type HostActivityRepo

type HostActivityRepo interface {
	GetHostsActivity(ctx context.Context, start int64, end int64) ([]*HostActivity, error)
}

type HostActivityUsecase

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

func NewHostActivityUsecase

func NewHostActivityUsecase(repo HostActivityRepo, logger l.Logger) *HostActivityUsecase

func (*HostActivityUsecase) GetHostsActivity

func (uc *HostActivityUsecase) GetHostsActivity(ctx context.Context, start int64, end int64) ([]*HostActivity, error)

type HostState

type HostState struct {
	Id        string
	Time      string
	AppName   string
	Host      string
	Operation string
	AvgOpTime int64
}

type HostStateRepo

type HostStateRepo interface {
	GetHostsState(ctx context.Context, start int64, end int64) ([]*HostState, error)
}

type HostStateUsecase

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

func NewHostStateUsecase

func NewHostStateUsecase(repo HostStateRepo, logger l.Logger) *HostStateUsecase

func (*HostStateUsecase) GetHostsState

func (uc *HostStateUsecase) GetHostsState(ctx context.Context, start int64, end int64) ([]*HostState, error)

type Journal

type Journal struct {
	// which directory
	Directory string
	// Directory Access Status
	Status string
	// Directory Access Message
	Message string
}

Directory Access Log

type NetworkError

type NetworkError struct {
	Time     string
	Port     string
	RxDrops  int64
	TxDrops  int64
	RxErrors int64
	TxErrors int64
}

type NetworkErrorRepo

type NetworkErrorRepo interface {
	GetNetworkError(ctx context.Context, start int64, end int64) ([]*NetworkError, error)
}

type NetworkErrorUsecase

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

func NewNetworkUsecase

func NewNetworkUsecase(repo NetworkErrorRepo, logger l.Logger) *NetworkErrorUsecase

func (*NetworkErrorUsecase) GetNetworkError

func (uc *NetworkErrorUsecase) GetNetworkError(ctx context.Context, start int64, end int64) ([]*NetworkError, error)

type Propmpt

type Propmpt struct {
	Text string
}

type RagRepo

type RagRepo interface {
	// get rag keyword list
	GetRagKeywords(ctx context.Context, keyword string) ([]string, error)
}

type RagUsecase

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

func NewSystemSecurityUsecase

func NewSystemSecurityUsecase(repo RagRepo, logger l.Logger) *RagUsecase

func (*RagUsecase) GetRagKeywords

func (uc *RagUsecase) GetRagKeywords(ctx context.Context, keyword string) ([]string, error)

type SystemSecurityRepo

type SystemSecurityRepo interface {
	GetUserActionFromTime2Time(ctx context.Context, start int64, end int64) ([]*UserAction, error)
}

type SystemSecurityUsercase

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

func NewSystemSecurityUsercase

func NewSystemSecurityUsercase(repo SystemSecurityRepo, logger l.Logger) *SystemSecurityUsercase

func (*SystemSecurityUsercase) GetSystemSecurity

func (uc *SystemSecurityUsercase) GetSystemSecurity(ctx context.Context, start int64, end int64) ([]*UserAction, error)

type UserAction

type UserAction struct {
	// Login username
	User string
	// Standard, Admin, Guest, others...
	Privilege string
	// Login status
	Status string
	// Login message
	LoginMessage string
	// Directory Access Logs
	Journal []*Journal
	// Login time
	LoginTime int64
	// Logout time
	LogoutTime int64
	// Online time
	Online int64
}

Detecting user behavior over a time period

Jump to

Keyboard shortcuts

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