Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterComplexEntry ¶
func RegisterComplexEntry(entry ComplexConfigurationEntry)
RegisterComplexEntry registers a ComplexConfigurationEntry.
func RegisterCustomEntry ¶
func RegisterCustomEntry(entry CustomConfigurationEntry)
RegisterCustomEntry registers a CustomConfigurationEntry.
func RegisterSimpleEntry ¶
func RegisterSimpleEntry(entry SimpleConfigurationEntry)
RegisterSimpleEntry registers a SimpleConfigurationEntry.
Types ¶
type ComplexConfigurationEntry ¶
type ComplexConfigurationEntry struct { // Name is the name of the entry. Name string // FriendlyName is the friendly name of the entry. FriendlyName string // Description is the description of the entry. Description string // Entries is the slice of simple entries of the entry. Entries []SimpleConfigurationEntry // CustomEntries is the slice of custom entries of the entry. CustomEntries []CustomConfigurationEntry }
ComplexConfigurationEntry is a configuration entry with multiple items.
func GetComplexEntries ¶
func GetComplexEntries() []ComplexConfigurationEntry
GetComplexEntries returns a slice of ComplexConfigurationEntry registered.
type CustomConfigurationEntry ¶
type CustomConfigurationEntry struct { // Name is the name of the entry. Name string // Description is the description of the entry. Description string // Handler is the handler function of the entry. Handler func(context *multiplexer.Context) }
CustomConfigurationEntry is a configuration entry that directly handles the configuration.
func GetCustomEntries ¶
func GetCustomEntries() []CustomConfigurationEntry
GetCustomEntries returns a slice of CustomConfigurationEntry registered.
type SimpleConfigurationEntry ¶
type SimpleConfigurationEntry struct { // Name is the name of the entry. Name string // FriendlyName is the friendly name of the entry. FriendlyName string // Description is the description of the entry. Description string // DatabaseKey is the database key of the entry. DatabaseKey string // Cleanup is the function called when the entry is reset. Cleanup func(context *multiplexer.Context) // Validate is the function called before setting the value, returning a validate success and an ok value. Validate func(context *multiplexer.Context, input *string) (bool, bool) // Format is the function called when generating preview embed, returning a title, description field and an ok value. Format func(context *multiplexer.Context, value string) (string, string, bool) }
SimpleConfigurationEntry is a configuration entry with one item.
func GetSimpleEntries ¶
func GetSimpleEntries() []SimpleConfigurationEntry
GetSimpleEntries returns a slice of SimpleConfigurationEntry registered.
Click to show internal directories.
Click to hide internal directories.