elasticcases

package
v0.0.0-...-bf86773 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2024 License: GPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const CASE_STATUS_DELETED = "in_progress"
View Source
const CASE_STATUS_OPEN = "open"
View Source
const CASE_STATUS_RESOLVED = "closed"

Variables

This section is empty.

Functions

This section is empty.

Types

type ElasticCase

type ElasticCase struct {
	Id            string            `json:"id,omitempty"`
	CreatedDate   *time.Time        `json:"created_at,omitempty"`
	CreatedBy     *ElasticUser      `json:"created_by,omitempty"`
	ModifiedDate  *time.Time        `json:"updated_at,omitempty"`
	ModifiedBy    *ElasticUser      `json:"updated_by,omitempty"`
	ClosedDate    *time.Time        `json:"closed_at,omitempty"`
	ClosedBy      *ElasticUser      `json:"closed_by,omitempty"`
	Status        string            `json:"status,omitempty"`
	Comments      []*ElasticComment `json:"comments,omitempty"`
	TotalComments int               `json:"totalComments,omitempty"`
	Settings      *ElasticSettings  `json:"settings,omitempty"`
	Connector     *ElasticConnector `json:"connector,omitempty"`
	Title         string            `json:"title"`
	Description   string            `json:"description"`
	Tags          []string          `json:"tags"`
	Owner         string            `json:"owner"`
}

func NewElasticCase

func NewElasticCase() *ElasticCase

type ElasticCases

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

func NewElasticCases

func NewElasticCases(srv *server.Server) *ElasticCases

func (*ElasticCases) Init

func (somodule *ElasticCases) Init(cfg module.ModuleConfig) error

func (*ElasticCases) IsRunning

func (somodule *ElasticCases) IsRunning() bool

func (*ElasticCases) PrerequisiteModules

func (somodule *ElasticCases) PrerequisiteModules() []string

func (*ElasticCases) Start

func (somodule *ElasticCases) Start() error

func (*ElasticCases) Stop

func (somodule *ElasticCases) Stop() error

type ElasticCasestore

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

func NewElasticCasestore

func NewElasticCasestore(srv *server.Server) *ElasticCasestore

func (*ElasticCasestore) Authorize

func (store *ElasticCasestore) Authorize(request *http.Request) error

func (*ElasticCasestore) Create

func (store *ElasticCasestore) Create(ctx context.Context, socCase *model.Case) (*model.Case, error)

func (*ElasticCasestore) CreateArtifact

func (store *ElasticCasestore) CreateArtifact(ctx context.Context, attachment *model.Artifact) (*model.Artifact, error)

func (*ElasticCasestore) CreateArtifactStream

func (store *ElasticCasestore) CreateArtifactStream(ctx context.Context, artifactstream *model.ArtifactStream) (string, error)

func (*ElasticCasestore) CreateComment

func (store *ElasticCasestore) CreateComment(ctx context.Context, comment *model.Comment) (*model.Comment, error)

func (*ElasticCasestore) CreateRelatedEvent

func (store *ElasticCasestore) CreateRelatedEvent(ctx context.Context, event *model.RelatedEvent) (*model.RelatedEvent, error)

func (*ElasticCasestore) DeleteArtifact

func (store *ElasticCasestore) DeleteArtifact(ctx context.Context, id string) error

func (*ElasticCasestore) DeleteArtifactStream

func (store *ElasticCasestore) DeleteArtifactStream(ctx context.Context, id string) error

func (*ElasticCasestore) DeleteComment

func (store *ElasticCasestore) DeleteComment(ctx context.Context, id string) error

func (*ElasticCasestore) DeleteRelatedEvent

func (store *ElasticCasestore) DeleteRelatedEvent(ctx context.Context, id string) error

func (*ElasticCasestore) GetArtifact

func (store *ElasticCasestore) GetArtifact(ctx context.Context, id string) (*model.Artifact, error)

func (*ElasticCasestore) GetArtifactStream

func (store *ElasticCasestore) GetArtifactStream(ctx context.Context, id string) (*model.ArtifactStream, error)

func (*ElasticCasestore) GetArtifacts

func (store *ElasticCasestore) GetArtifacts(ctx context.Context, caseId string, groupType string, groupId string) ([]*model.Artifact, error)

func (*ElasticCasestore) GetCase

func (store *ElasticCasestore) GetCase(ctx context.Context, caseId string) (*model.Case, error)

func (*ElasticCasestore) GetCaseHistory

func (store *ElasticCasestore) GetCaseHistory(ctx context.Context, caseId string) ([]interface{}, error)

func (*ElasticCasestore) GetComment

func (store *ElasticCasestore) GetComment(ctx context.Context, commentId string) (*model.Comment, error)

func (*ElasticCasestore) GetComments

func (store *ElasticCasestore) GetComments(ctx context.Context, commentId string) ([]*model.Comment, error)

func (*ElasticCasestore) GetRelatedEvent

func (store *ElasticCasestore) GetRelatedEvent(ctx context.Context, id string) (*model.RelatedEvent, error)

func (*ElasticCasestore) GetRelatedEvents

func (store *ElasticCasestore) GetRelatedEvents(ctx context.Context, caseId string) ([]*model.RelatedEvent, error)

func (*ElasticCasestore) Init

func (store *ElasticCasestore) Init(hostUrl string,
	username string,
	password string,
	verifyCert bool) error

func (*ElasticCasestore) Update

func (store *ElasticCasestore) Update(ctx context.Context, socCase *model.Case) (*model.Case, error)

func (*ElasticCasestore) UpdateArtifact

func (store *ElasticCasestore) UpdateArtifact(ctx context.Context, artifact *model.Artifact) (*model.Artifact, error)

func (*ElasticCasestore) UpdateComment

func (store *ElasticCasestore) UpdateComment(ctx context.Context, comment *model.Comment) (*model.Comment, error)

type ElasticComment

type ElasticComment struct {
}

type ElasticConnector

type ElasticConnector struct {
	Id     string         `json:"id"`
	Name   string         `json:"name"`
	Type   string         `json:"type"`
	Fields *ElasticFields `json:"fields"`
}

type ElasticFields

type ElasticFields struct {
}

type ElasticSettings

type ElasticSettings struct {
	SyncAlerts bool `json:"syncAlerts"`
}

type ElasticUser

type ElasticUser struct {
	Email    string `json:"email"`
	Name     string `json:"full_name"`
	Username string `json:"username"`
}

Jump to

Keyboard shortcuts

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