utils

package
v0.0.1-alpha.22 Latest Latest
Warning

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

Go to latest
Published: May 18, 2025 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPluginStorePath

func GetPluginStorePath(pluginID string) (string, error)

GetPluginStorePath returns the path to the plugin store for the given plugin.

func GetStore

func GetStore(capability, pluginID string) (*os.File, error)

getStore returns a file handle to the store for the given plugin and capability. If the store does not exist, it will be created. Make sure to close the file handle after using it!

func InitializePluginStore

func InitializePluginStore(pluginID string) error

initializeStore creates the store directory for the given plugin and capability.

func RemoveStore

func RemoveStore(capability, pluginID string) error

removeStore removes the store for the given plugin and capability.

Types

type Client

type Client struct{}

func NewClient

func NewClient() *Client

func (*Client) DetectLanguage

func (c *Client) DetectLanguage(params GetLanguageInput) string

DetectLanguage detects the language of a file based on its filename and contents.

type GetLanguageInput

type GetLanguageInput struct {
	Filename string `json:"filename"`
	Contents string `json:"contents"`
}

Jump to

Keyboard shortcuts

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