processor

package
v0.0.0-...-f219ead Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PullLogs

func PullLogs(startTime string, endTime string, group types.ModuleGroup)

func SendToCorrelation

func SendToCorrelation(data []TransformedLog) error

Types

type ContentDetailsResponse

type ContentDetailsResponse []map[string]interface{}

type ContentList

type ContentList struct {
	ContentUri        string `json:"contentUri,omitempty"`
	ContentId         string `json:"contentId,omitempty"`
	ContentType       string `json:"contentType,omitempty"`
	ContentCreated    string `json:"contentCreated,omitempty"`
	ContentExpiration string `json:"contentExpiration,omitempty"`
}

type MicrosoftLoginResponse

type MicrosoftLoginResponse struct {
	TokenType   string `json:"token_type,omitempty"`
	Expires     int    `json:"expires_in,omitempty"`
	ExtExpires  int    `json:"ext_expires_in,omitempty"`
	AccessToken string `json:"access_token,omitempty"`
}

type OfficeProcessor

type OfficeProcessor struct {
	Credentials   MicrosoftLoginResponse
	TenantId      string
	ClientId      string
	ClientSecret  string
	Subscriptions []string
}

func GetOfficeProcessor

func GetOfficeProcessor(group types.ModuleGroup) OfficeProcessor

func (*OfficeProcessor) GetAuth

func (o *OfficeProcessor) GetAuth() error

func (*OfficeProcessor) GetContentDetails

func (o *OfficeProcessor) GetContentDetails(url string) (ContentDetailsResponse, error)

func (*OfficeProcessor) GetContentList

func (o *OfficeProcessor) GetContentList(subscription string, startTime string, endTime string, group types.ModuleGroup) ([]ContentList, error)

func (*OfficeProcessor) GetLogs

func (o *OfficeProcessor) GetLogs(startTime string, endTime string, group types.ModuleGroup)

func (*OfficeProcessor) StartSubscriptions

func (o *OfficeProcessor) StartSubscriptions() error

type StartSubscriptionResponse

type StartSubscriptionResponse struct {
	ContentType string      `json:"contentType,omitempty"`
	Status      string      `json:"status,omitempty"`
	WebHook     interface{} `json:"webhook,omitempty"`
	Error       struct {
		Message string `json:"message,omitempty"`
		Code    string `json:"code,omitempty"`
	} `json:"error,omitempty"`
}

type TransformedLog

type TransformedLog struct {
	Logx struct {
		Tenant string                 `json:"tenant"`
		O365   map[string]interface{} `json:"o365"`
	} `json:"logx"`
	Global struct {
		Type     string `json:"type"`
		Analysed int    `json:"analysed"`
	} `json:"global"`
	Timestamp  string `json:"@timestamp"`
	DataType   string `json:"dataType"`
	DataSource string `json:"dataSource"`
}

func ETLProcess

func ETLProcess(data []map[string]interface{}, group types.ModuleGroup) []TransformedLog

Jump to

Keyboard shortcuts

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