Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Interpolator ¶
type Interpolator struct {
// contains filtered or unexported fields
}
func New ¶
func New(state map[string]string, secrets map[string]types.Secret, upd *telegram.Update) *Interpolator
New interpolator with state and secrets. deprecated: use NewWithOps
func NewWithOps ¶ added in v1.16.0
func NewWithOps(ops ...InterpolatorOp) *Interpolator
NewWithOps interpolator with options.
func (*Interpolator) Interpolate ¶
func (i *Interpolator) Interpolate(text string) string
func (*Interpolator) InterpolateS ¶ added in v1.16.0
func (i *Interpolator) InterpolateS(s fmt.Stringer) string
type InterpolatorOp ¶ added in v1.16.0
type InterpolatorOp func(*Interpolator)
func WithData ¶ added in v1.16.0
func WithData(data map[string]string) InterpolatorOp
func WithSecrets ¶ added in v1.16.0
func WithSecrets(secrets map[string]types.Secret) InterpolatorOp
func WithState ¶ added in v1.16.0
func WithState(state map[string]string) InterpolatorOp
func WithUpdate ¶ added in v1.16.0
func WithUpdate(upd *telegram.Update) InterpolatorOp
Click to show internal directories.
Click to hide internal directories.