hiddify_extension

package
v0.0.0-...-672a348 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CountKey      = "count"
	ConsoleKey    = "console"
	ButtonTestKey = "button_test"
)

Variables

View Source
var Resources embed.FS

Embed all translations in the resources directory

Functions

func NewMyAwesomeExtension

func NewMyAwesomeExtension() ex.Extension

NewMyAwesomeExtension initializes a new instance of MyAwesomeExtension with default values

Types

type MyAwesomeExtension

type MyAwesomeExtension struct {
	ex.Base[MyAwesomeExtensionData] // Embedding base extension functionality
	// contains filtered or unexported fields
}

MyAwesomeExtension represents the core functionality of the extension

func (*MyAwesomeExtension) BeforeAppConnect

func (e *MyAwesomeExtension) BeforeAppConnect(hiddifySettings *config.HiddifyOptions, singconfig *option.Options) error

To Modify user's config before connecting, you can use this function

func (*MyAwesomeExtension) Close

func (e *MyAwesomeExtension) Close() error

Stop is called when the extension is closed

func (*MyAwesomeExtension) GetUI

func (e *MyAwesomeExtension) GetUI() ui.Form

GetUI returns the UI form for the extension

func (*MyAwesomeExtension) SubmitData

func (e *MyAwesomeExtension) SubmitData(button string, data map[string]string) error

SubmitData processes and validates form submission data

type MyAwesomeExtensionData

type MyAwesomeExtensionData struct {
	Count int `json:"count"` // Number of counts for the extension
}

MyAwesomeExtensionData holds the data specific to MyAwesomeExtension

Jump to

Keyboard shortcuts

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