blipUtil

package
v0.8.10 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2023 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlipUtil

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

BlipUtil From a code block

func Instance

func Instance() *BlipUtil

func (*BlipUtil) AddCtxError

func (t *BlipUtil) AddCtxError(ctx context.Context, message string) context.Context

AddCtxError Will add an 'error' context variable that is of []string. If it already exists then the new message is added to the end. To support

@context errors []string = make([]string,0)

func (*BlipUtil) AddEscaper

func (t *BlipUtil) AddEscaper(fileType string, esc IBlipEscaper)

func (*BlipUtil) CallCtxFunc

func (t *BlipUtil) CallCtxFunc(c context.Context, key string) (terror error)

func (*BlipUtil) GetCtxStr

func (t *BlipUtil) GetCtxStr(c context.Context, key string) string

func (*BlipUtil) GetEscaperFor

func (t *BlipUtil) GetEscaperFor(fileType string) IBlipEscaper

func (*BlipUtil) HasError

func (t *BlipUtil) HasError(ctx context.Context) bool

HasError Return true if there were errors added to the context To support

@context errors []string = make([]string,0)

func (*BlipUtil) RenderComplete

func (t *BlipUtil) RenderComplete(escaper IBlipEscaper, templateName string, langType string, duration time.Duration, err error)

func (*BlipUtil) SetMonitor

func (t *BlipUtil) SetMonitor(monitor IBlipMonitor)

func (*BlipUtil) Write

func (t *BlipUtil) Write(w io.Writer, bytes []byte)

func (*BlipUtil) WriteBool added in v0.8.10

func (t *BlipUtil) WriteBool(w io.Writer, val bool)

func (*BlipUtil) WriteInt

func (t *BlipUtil) WriteInt(w io.Writer, val int)

func (*BlipUtil) WriteInt64

func (t *BlipUtil) WriteInt64(w io.Writer, val int64)

func (*BlipUtil) WriteStr

func (t *BlipUtil) WriteStr(w io.Writer, bytes string)

func (*BlipUtil) WriteStrSafe

func (t *BlipUtil) WriteStrSafe(w io.Writer, bytes string, escaper IBlipEscaper)

type DebugBlipMonitor

type DebugBlipMonitor struct {
}

func (*DebugBlipMonitor) RenderComplete

func (m *DebugBlipMonitor) RenderComplete(escaper IBlipEscaper, name string, langType string, duration time.Duration, err error)

type DefaultBlipMonitor

type DefaultBlipMonitor struct {
}

func (*DefaultBlipMonitor) RenderComplete

func (m *DefaultBlipMonitor) RenderComplete(escaper IBlipEscaper, name string, langType string, duration time.Duration, err error)

type HtmlEscaper

type HtmlEscaper struct {
}

func (*HtmlEscaper) Escape

func (h *HtmlEscaper) Escape(inStr string) string

func (*HtmlEscaper) GetFileType

func (h *HtmlEscaper) GetFileType() string

type IBlipEscaper

type IBlipEscaper interface {
	Escape(inStr string) string
	GetFileType() string
}

func HtmlEscaperInstance

func HtmlEscaperInstance() IBlipEscaper

func TextEscaperInstance

func TextEscaperInstance() IBlipEscaper

type IBlipMonitor

type IBlipMonitor interface {
	RenderComplete(escaper IBlipEscaper, name string, langType string, duration time.Duration, err error)
}

type TextEscaper

type TextEscaper struct {
}

func (*TextEscaper) Escape

func (h *TextEscaper) Escape(inStr string) string

func (*TextEscaper) GetFileType

func (h *TextEscaper) GetFileType() string

Jump to

Keyboard shortcuts

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