Documentation
¶
Index ¶
- Constants
- func Init(router *gin.RouterGroup, cfg *config.GateWayConfig, ...) error
- type BackendScript
- func (script *BackendScript) CallComplete(lang, content string) ([]string, error)
- func (script *BackendScript) CallConvert(lang, destLang, content string) ([]string, error)
- func (script *BackendScript) CallExplain(lang, content string) ([]string, error)
- func (script *BackendScript) CallFixError(lang, errStr string) ([]string, error)
- func (script *BackendScript) CallGenTest(lang, content string) ([]string, error)
- type CODE_FUNC_TYPE
- type CheckScript
- type CompleteHandler
- type ContentChecker
- type ConvertHandler
- type ExplainHandler
- type FixErrorHandler
- type GenTestHandler
- type ScriptBackend
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
}
type CompleteHandler ¶
type CompleteHandler struct{}
type ContentChecker ¶
type ContentChecker struct {
// contains filtered or unexported fields
}
func (*ContentChecker) CheckCodeContent ¶
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
Click to show internal directories.
Click to hide internal directories.