runbooks

package
v0.0.0-...-4ef8731 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder []E

type E

type E struct {
	Key   string
	Value *MarkdownHandlers
}

type MapRunbookMarkdownResolver

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

func BuildNewMapRunbookMarkdownResolver

func BuildNewMapRunbookMarkdownResolver(resolverList Builder) *MapRunbookMarkdownResolver

func NewMapRunbookMarkdownResolver

func NewMapRunbookMarkdownResolver(resolvers map[string]*MarkdownHandlers) *MapRunbookMarkdownResolver

func (MapRunbookMarkdownResolver) DeleteRunbookMarkdown

func (m MapRunbookMarkdownResolver) DeleteRunbookMarkdown(location model.RunbookStepLocation) error

func (MapRunbookMarkdownResolver) ResolveRunbookStepMarkdown

func (m MapRunbookMarkdownResolver) ResolveRunbookStepMarkdown(location model.RunbookStepLocation) (*model.Markdown, error)

func (MapRunbookMarkdownResolver) WriteRunbookStepMarkdown

func (m MapRunbookMarkdownResolver) WriteRunbookStepMarkdown(markdown *model.Markdown, storageType string) (string, error)

type MarkdownHandlers

type MarkdownHandlers struct {
	Resolver MarkdownResolver
	Writer   MarkdownWriter
}

type MarkdownResolver

type MarkdownResolver interface {
	ResolveMarkdownFromLocationString(string) (*model.Markdown, error)
}

type MarkdownWriter

type MarkdownWriter interface {
	WriteMarkdown(markdown *model.Markdown) (string, error)
	DeleteMarkdown(ref string) error
}

type RuleMatcher

type RuleMatcher interface {
	FindMatchingRunbook(e model.Error) (string, bool)
}

type RunbookFinder

type RunbookFinder interface {
	FindRunbookById(id string) (model.RunbookRef, error)
}

type RunbookManager

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

func NewRunbookManager

func NewRunbookManager(ruleManager RuleMatcher, runbookFinder RunbookFinder) *RunbookManager

func (RunbookManager) FindRunbookForError

func (r RunbookManager) FindRunbookForError(e model.Error) (model.RunbookRef, error)

type RunbookStepDetailsFinder

type RunbookStepDetailsFinder struct {
	RunbookStepsEntityFinder    RunbookStepEntityFinder
	RunbookStepMarkdownResolver RunbookStepMarkdownResolver
}

func (RunbookStepDetailsFinder) FindRunbookStepDetailsById

func (receiver RunbookStepDetailsFinder) FindRunbookStepDetailsById(id string) (model.RunbookStepData, *model.Markdown, error)

func (RunbookStepDetailsFinder) ListAllSteps

func (receiver RunbookStepDetailsFinder) ListAllSteps() ([]model.RunbookStepData, error)

type RunbookStepDetailsWriter

type RunbookStepDetailsWriter struct {
	RunbookStepsEntityWriter  RunbookStepEntityWriter
	RunbookStepMarkdownWriter RunbookStepMarkdownWriter
	RunbookStepEntityFinder   RunbookStepEntityFinder
}

TODO split writer and updater

func (RunbookStepDetailsWriter) DeleteStepDetails

func (w RunbookStepDetailsWriter) DeleteStepDetails(id string) error

func (RunbookStepDetailsWriter) UpdateRunbookStepDetails

func (w RunbookStepDetailsWriter) UpdateRunbookStepDetails(stepId string, data model.RunbookStepData, markdown *model.Markdown, markdownLocationType string) error

func (RunbookStepDetailsWriter) WriteRunbookStepDetails

func (w RunbookStepDetailsWriter) WriteRunbookStepDetails(data model.RunbookStepData, markdown *model.Markdown, markdownLocationType string) (string, error)

type RunbookStepEntityFinder

type RunbookStepEntityFinder interface {
	FindRunbookStepData(id string) (model.RunbookStepDetailsEntity, error)
	ListAllSteps() ([]model.RunbookStepData, error)
}

type RunbookStepEntityWriter

type RunbookStepEntityWriter interface {
	WriteRunbookStepEntity(entity model.RunbookStepDetailsEntity) (string, error)
	DeleteStepDetails(id string) error
	UpdateRunbookStepEntity(id string, entity model.RunbookStepDetailsEntity) error
}

TODO split writer and updater

type RunbookStepMarkdownResolver

type RunbookStepMarkdownResolver interface {
	ResolveRunbookStepMarkdown(entity model.RunbookStepLocation) (*model.Markdown, error)
}

type RunbookStepMarkdownWriter

type RunbookStepMarkdownWriter interface {
	WriteRunbookStepMarkdown(markdown *model.Markdown, storageType string) (string, error)
	DeleteRunbookMarkdown(location model.RunbookStepLocation) error
}

TODO split writer and updater

Jump to

Keyboard shortcuts

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