shared

package
v1.6.8 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Matching API https://www.algolia.com/doc/api-reference/api-methods/save-synonym/#method-param-type
	Regular        string = "synonym"
	OneWay         string = "oneWaySynonym"
	AltCorrection1 string = "altCorrection1"
	AltCorrection2 string = "altCorrection2"
	Placeholder    string = "placeholder"
)

Variables

This section is empty.

Functions

func FlagsToSynonym

func FlagsToSynonym(flags SynonymFlags) (search.Synonym, error)

Types

type SynonymFlags

type SynonymFlags struct {
	SynonymID           string
	SynonymInput        string
	SynonymWord         string
	SynonymPlaceholder  string
	SynonymType         string
	Synonyms            []string
	SynonymCorrections  []string
	SynonymReplacements []string
}

type SynonymType

type SynonymType string

Defining new type that implements pflag.Value interface with String, Set and Type https://stackoverflow.com/questions/50824554/permitted-flag-values-for-cobra

func (*SynonymType) Set

func (e *SynonymType) Set(v string) error

func (*SynonymType) String

func (e *SynonymType) String() string

func (*SynonymType) Type

func (e *SynonymType) Type() string

Jump to

Keyboard shortcuts

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