infocarder

package
v1.106.4 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2026 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Infocarder is thread safe version of infocards management for configs_export

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Infocard

type Infocard []InfocardLine

func (Infocard) StringsJoin

func (i Infocard) StringsJoin(delimiter string) string

type InfocardBuilder

type InfocardBuilder struct {
	Lines Infocard
}

func NewInfocardBuilder

func NewInfocardBuilder() InfocardBuilder

func (*InfocardBuilder) WriteLine

func (i *InfocardBuilder) WriteLine(phrases ...InfocardPhrase)

func (*InfocardBuilder) WriteLineStr

func (i *InfocardBuilder) WriteLineStr(phrase_strs ...string)

func (*InfocardBuilder) WriteLineStrBold added in v1.105.0

func (i *InfocardBuilder) WriteLineStrBold(phrase_strs ...string)

type InfocardKey

type InfocardKey string

type InfocardLine

type InfocardLine struct {
	Phrases []InfocardPhrase `json:"phrases"  validate:"required"`
}

func NewInfocardSimpleLine

func NewInfocardSimpleLine(line string) InfocardLine

func (InfocardLine) ToStr

func (i InfocardLine) ToStr() string

type InfocardPhrase

type InfocardPhrase struct {
	Phrase string  `json:"phrase"  validate:"required"`
	Link   *string `json:"link"`
	Bold   bool    `json:"bold"  validate:"required"`
}

type Infocarder

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

func NewInfocarder

func NewInfocarder() *Infocarder

func (*Infocarder) GetInfocard

func (c *Infocarder) GetInfocard(id InfocardKey) Infocard

func (*Infocarder) GetInfocard2

func (c *Infocarder) GetInfocard2(id InfocardKey) (Infocard, bool)

func (*Infocarder) GetInfocardsDict

func (c *Infocarder) GetInfocardsDict(callback func(infocards Infocards))

func (*Infocarder) PutInfocard

func (c *Infocarder) PutInfocard(id InfocardKey, value Infocard)

type Infocards

type Infocards map[InfocardKey]Infocard

Jump to

Keyboard shortcuts

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