codingapi

package
v0.0.0-...-22e259c Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2023 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CODE_FUNC_COMPLETE  = CODE_FUNC_TYPE(1)
	CODE_FUNC_CONVERT   = CODE_FUNC_TYPE(2)
	CODE_FUNC_EXPLAIN   = CODE_FUNC_TYPE(3)
	CODE_FUNC_FIX_ERROR = CODE_FUNC_TYPE(4)
	CODE_FUNC_GEN_TEST  = CODE_FUNC_TYPE(5)
)

Variables

This section is empty.

Functions

func Init

func Init(router *gin.RouterGroup, cfg *config.GateWayConfig, logWriter rollingwriter.RollingWriter) error

Types

type BackendScript

type BackendScript struct {
	// contains filtered or unexported fields
}

func (*BackendScript) CallComplete

func (script *BackendScript) CallComplete(lang, content string) ([]string, error)

func (*BackendScript) CallConvert

func (script *BackendScript) CallConvert(lang, destLang, content string) ([]string, error)

func (*BackendScript) CallExplain

func (script *BackendScript) CallExplain(lang, content string) ([]string, error)

func (*BackendScript) CallFixError

func (script *BackendScript) CallFixError(lang, errStr string) ([]string, error)

func (*BackendScript) CallGenTest

func (script *BackendScript) CallGenTest(lang, content string) ([]string, error)

type CODE_FUNC_TYPE

type CODE_FUNC_TYPE int

type CheckScript

type CheckScript struct {
	// contains filtered or unexported fields
}

func (*CheckScript) Exec

func (script *CheckScript) Exec(apiUrl, content string) (bool, error)

type CompleteHandler

type CompleteHandler struct{}

type ContentChecker

type ContentChecker struct {
	// contains filtered or unexported fields
}

func (*ContentChecker) CheckCodeContent

func (checker *ContentChecker) CheckCodeContent(apiUrl string, providerIndex int, content string) (bool, error)

type ConvertHandler

type ConvertHandler struct{}

type ExplainHandler

type ExplainHandler struct{}

type FixErrorHandler

type FixErrorHandler struct {
}

type GenTestHandler

type GenTestHandler struct{}

type ScriptBackend

type ScriptBackend struct {
	// contains filtered or unexported fields
}

func (*ScriptBackend) GetBackendScript

func (backend *ScriptBackend) GetBackendScript(index int) *BackendScript

Jump to

Keyboard shortcuts

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