Documentation ¶
Index ¶
- func HandleClazzUpload(c *gin.Context)
- func HandleClazzesQuery(c *gin.Context)
- func HandleFileQuery(c *gin.Context)
- func HandleFunctionContextUpload(c *gin.Context)
- func HandleFunctionContextsQuery(c *gin.Context)
- func HandleFunctionUpload(c *gin.Context)
- func HandleFunctionsQuery(c *gin.Context)
- func HandlePing(c *gin.Context)
- func HandleReferenceCountFuncctx(c *gin.Context)
- func HandleReferenceCountFuncctxReverse(c *gin.Context)
- func HandleRegexClazz(c *gin.Context)
- func HandleRegexFunc(c *gin.Context)
- func HandleRegexFuncctx(c *gin.Context)
- func HandleRepoDelete(c *gin.Context)
- func HandleRepoQuery(c *gin.Context)
- func HandleRevDelete(c *gin.Context)
- func HandleRevQuery(c *gin.Context)
- func HandleRevStatQuery(c *gin.Context)
- func HandleSignatureFunc(c *gin.Context)
- func HandleSignatureFuncctx(c *gin.Context)
- func HandleSignatureFuncctxChain(c *gin.Context)
- func HandleSignatureFuncctxReverseChain(c *gin.Context)
- func HandleSignatureRegexFunc(c *gin.Context)
- func HandleStatusUpload(c *gin.Context)
- func HandleVersion(c *gin.Context)
- func InitService(_ object.ExecuteConfig, ctx context.Context, driver binding.Driver, ...)
- type ContextTree
- type FunctionContextChain
- type RevStat
- type UploadStats
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleClazzUpload ¶ added in v0.10.0
func HandleClazzesQuery ¶ added in v0.11.0
@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 ¶
@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 HandleFunctionContextsQuery ¶ added in v0.11.0
@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 HandleFunctionsQuery ¶
@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 ¶
@BasePath / @Summary ping example @Produce json @Success 200 @Router /ops/ping [get] @Tags Ops
func HandleReferenceCountFuncctx ¶ added in v0.13.0
@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
@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
@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
@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} sibyl2.FunctionWithPath @Router /api/v1/regex/func [get] @Tags RegexQuery
func HandleRegexFuncctx ¶ added in v0.13.0
@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
@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 ¶
@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
@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 ¶
@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
@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
@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} sibyl2.FunctionWithPath @Router /api/v1/signature/func [get] @Tags SignatureQuery
func HandleSignatureFuncctx ¶ added in v0.13.0
@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
@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
@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
@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 ¶
@BasePath / @Summary upload status query @Produce json @Success 200 @Router /ops/monitor/upload [get] @Tags Ops
func HandleVersion ¶ added in v0.11.0
@BasePath / @Summary sibyl version @Produce json @Success 200 @Router /ops/version [get] @Tags Ops
func InitService ¶
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"` }