service

package
v0.15.4 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleClazzUpload added in v0.10.0

func HandleClazzUpload(c *gin.Context)

@Summary upload class @Accept json @Produce json @Success 200 @Param payload body object.ClazzUploadUnit true "Payload description" @Router /api/v1/clazz [post] @Tags Upload

func HandleClazzesQuery added in v0.11.0

func HandleClazzesQuery(c *gin.Context)

@Summary class query @Param repo query string true "repo" @Param rev query string true "rev" @Param file query string true "file" @Produce json @Success 200 {array} sibyl2.ClazzWithPath @Router /api/v1/clazz [get] @Tags BasicQuery

func HandleFileQuery

func HandleFileQuery(c *gin.Context)

@Summary file query by repo and rev @Param repo query string true "repo" @Param rev query string true "rev" @Param includeRegex query string false "includeRegex" @Produce json @Success 200 {array} string @Router /api/v1/file [get] @Tags Scope

func HandleFuncTagCreate added in v0.15.0

func HandleFuncTagCreate(c *gin.Context)

@Summary create func tag @Accept json @Produce json @Success 200 @Param payload body tagUpload true "tag upload payload" @Router /api/v1/tag/func [post] @Tags Tag

func HandleFuncTagQuery added in v0.15.0

func HandleFuncTagQuery(c *gin.Context)

@Summary query func by tag @Produce json @Param repo query string true "repo" @Param rev query string true "rev" @Param tag query string true "tag" @Success 200 {array} string @Router /api/v1/tag/func [get] @Tags Tag

func HandleFunctionContextUpload

func HandleFunctionContextUpload(c *gin.Context)

@Summary upload functions ctx @Accept json @Produce json @Success 200 @Param payload body object.FunctionContextUploadUnit true "Payload description" @Router /api/v1/funcctx [post] @Tags Upload

func HandleFunctionContextsQuery added in v0.11.0

func HandleFunctionContextsQuery(c *gin.Context)

@Summary func ctx query @Param repo query string true "repo" @Param rev query string true "rev" @Param file query string true "file" @Param lines query string false "specific lines" @Produce json @Success 200 {array} object.FunctionContextSlimWithSignature @Router /api/v1/funcctx [get] @Tags BasicQuery

func HandleFunctionUpload added in v0.10.0

func HandleFunctionUpload(c *gin.Context)

@Summary upload functions @Accept json @Produce json @Success 200 @Param payload body object.FunctionUploadUnit true "Payload description" @Router /api/v1/func [post] @Tags Upload

func HandleFunctionsQuery

func HandleFunctionsQuery(c *gin.Context)

@Summary func query @Param repo query string true "repo" @Param rev query string true "rev" @Param file query string true "file" @Param lines query string false "specific lines" @Produce json @Success 200 {array} object.FunctionWithSignature @Router /api/v1/func [get] @Tags BasicQuery

func HandlePing

func HandlePing(c *gin.Context)

@BasePath / @Summary ping example @Produce json @Success 200 @Router /ops/ping [get] @Tags Ops

func HandleReferenceCountFuncctx added in v0.13.0

func HandleReferenceCountFuncctx(c *gin.Context)

@Summary funcctx query by ref @Param repo query string true "repo" @Param rev query string true "rev" @Param moreThan query int true "moreThan" @Param lessThan query int true "lessThan" @Produce json @Success 200 {array} sibyl2.FunctionContextSlim @Router /api/v1/reference/count/funcctx [get] @Tags ReferenceQuery

func HandleReferenceCountFuncctxReverse added in v0.13.0

func HandleReferenceCountFuncctxReverse(c *gin.Context)

@Summary funcctx query by referenced @Param repo query string true "repo" @Param rev query string true "rev" @Param moreThan query int true "moreThan" @Param lessThan query int true "lessThan" @Produce json @Success 200 {array} sibyl2.FunctionContextSlim @Router /api/v1/reference/count/funcctx/reverse [get] @Tags ReferenceQuery

func HandleRegexClazz added in v0.13.0

func HandleRegexClazz(c *gin.Context)

@Summary clazz query @Param repo query string true "repo" @Param rev query string true "rev" @Param field query string true "field" @Param regex query string true "regex" @Produce json @Success 200 {array} sibyl2.ClazzWithPath @Router /api/v1/regex/clazz [get] @Tags RegexQuery

func HandleRegexFunc added in v0.13.0

func HandleRegexFunc(c *gin.Context)

@Summary func query @Param repo query string true "repo" @Param rev query string true "rev" @Param field query string true "field" @Param regex query string true "regex" @Produce json @Success 200 {array} object.FunctionWithSignature @Router /api/v1/regex/func [get] @Tags RegexQuery

func HandleRegexFuncctx added in v0.13.0

func HandleRegexFuncctx(c *gin.Context)

@Summary func ctx query @Param repo query string true "repo" @Param rev query string true "rev" @Param field query string true "field" @Param regex query string true "regex" @Produce json @Success 200 {array} sibyl2.FunctionContextSlim @Router /api/v1/regex/funcctx [get] @Tags RegexQuery

func HandleRepoDelete added in v0.12.0

func HandleRepoDelete(c *gin.Context)

@Summary repo delete @Param repo query string true "rev delete by repo" @Produce json @Success 200 @Router /api/v1/repo [delete] @Tags Scope

func HandleRepoQuery

func HandleRepoQuery(c *gin.Context)

@Summary query all the repos @Produce json @Success 200 {array} string @Router /api/v1/repo [get] @Tags Scope

func HandleRevDelete added in v0.12.0

func HandleRevDelete(c *gin.Context)

@Summary rev delete @Param repo query string true "repo" @Param rev query string true "rev" @Produce json @Success 200 @Router /api/v1/rev [delete] @Tags Scope

func HandleRevQuery

func HandleRevQuery(c *gin.Context)

@Summary rev query by repo name @Param repo query string true "rev search by repo" @Produce json @Success 200 {array} string @Router /api/v1/rev [get] @Tags Scope

func HandleRevStatQuery added in v0.12.0

func HandleRevStatQuery(c *gin.Context)

@Summary rev stat @Param repo query string true "repo" @Param rev query string true "rev" @Produce json @Success 200 {object} RevStat @Router /api/v1/rev/stat [get] @Tags StatQuery

func HandleSignatureFunc added in v0.13.0

func HandleSignatureFunc(c *gin.Context)

@Summary func query @Param repo query string true "repo" @Param rev query string true "rev" @Param signature query string true "signature" @Produce json @Success 200 {object} object.FunctionWithSignature @Router /api/v1/signature/func [get] @Tags SignatureQuery

func HandleSignatureFuncctx added in v0.13.0

func HandleSignatureFuncctx(c *gin.Context)

@Summary funcctx query @Param repo query string true "repo" @Param rev query string true "rev" @Param signature query string true "signature" @Produce json @Success 200 {object} sibyl2.FunctionContextSlim @Router /api/v1/signature/funcctx [get] @Tags SignatureQuery

func HandleSignatureFuncctxChain added in v0.13.0

func HandleSignatureFuncctxChain(c *gin.Context)

@Summary funcctx chain query @Param repo query string true "repo" @Param rev query string true "rev" @Param signature query string true "signature" @Param depth query int true "depth" @Produce json @Success 200 {object} FunctionContextChain @Router /api/v1/signature/funcctx/chain [get] @Tags SignatureQuery

func HandleSignatureFuncctxReverseChain added in v0.13.0

func HandleSignatureFuncctxReverseChain(c *gin.Context)

@Summary funcctx reverse chain query @Param repo query string true "repo" @Param rev query string true "rev" @Param signature query string true "signature" @Param depth query int true "depth" @Produce json @Success 200 {object} FunctionContextChain @Router /api/v1/signature/funcctx/rchain [get] @Tags SignatureQuery

func HandleSignatureRegexFunc added in v0.13.0

func HandleSignatureRegexFunc(c *gin.Context)

@Summary func query @Param repo query string true "repo" @Param rev query string true "rev" @Param regex query string true "regex" @Produce json @Success 200 {array} string @Router /api/v1/signature/regex/func [get] @Tags SignatureQuery

func HandleStatusUpload

func HandleStatusUpload(c *gin.Context)

@BasePath / @Summary upload status query @Produce json @Success 200 @Router /ops/monitor/upload [get] @Tags Ops

func HandleVersion added in v0.11.0

func HandleVersion(c *gin.Context)

@BasePath / @Summary sibyl version @Produce json @Success 200 @Router /ops/version [get] @Tags Ops

func InitService

func InitService(_ object.ExecuteConfig, ctx context.Context, driver binding.Driver, q queue.Queue)

Types

type ContextTree added in v0.13.0

type ContextTree struct {
	Content  string         `json:"content"`
	Children []*ContextTree `json:"children"`
}

ContextTree

- avoiding duplicated chains - easily handled by frontend/dashboard

func (*ContextTree) AddChain added in v0.13.0

func (t *ContextTree) AddChain(chain []string)

type FunctionContextChain added in v0.13.0

type FunctionContextChain struct {
	*sibyl2.FunctionContextSlim
	CallChains        *ContextTree `json:"callChains"`
	ReverseCallChains *ContextTree `json:"reverseCallChains"`
}

type RevStat added in v0.12.0

type RevStat struct {
	Info          *object.RevInfo `json:"info"`
	FileCount     int             `json:"fileCount"`
	FunctionCount int             `json:"functionCount"`
}

type UploadStats

type UploadStats struct {
	FuncUnitTodo    int `json:"funcUnitTodo"`
	FuncCtxUnitTodo int `json:"funcCtxUnitTodo"`
	ClazzUnitTodo   int `json:"clazzUnitTodo"`
}

Jump to

Keyboard shortcuts

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