presenter

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SliceFromEntity added in v1.1.0

func SliceFromEntity[T any, R any](p *Presenter, input []T, convFunc func(p *Presenter, input T) R) []R

Types

type Presenter

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

func New

func New(shortIDService shortid.Service, sanitizerService sanitizer.Service) *Presenter

func (*Presenter) ContentHTML added in v0.4.0

func (p *Presenter) ContentHTML(input string) string

Sanitizes input to a very restricted HTML subset for content of type HTML Shortcut for p.sanitizerService.ContentHTML()

func (*Presenter) EncodeID

func (p *Presenter) EncodeID(id entities.ID) string

func (*Presenter) EncodeIDList

func (p *Presenter) EncodeIDList(ids []entities.ID) []string

func (*Presenter) ParseID

func (p *Presenter) ParseID(id string) (entities.ID, error)

func (*Presenter) String added in v0.4.0

func (p *Presenter) String(input string) string

Sanitizes input to a plain string. Shortcut for p.sanitizerService.String()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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