yakurl

package
v1.3.5-alpha0802 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2024 License: AGPL-3.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var OP_NEW_MONITOR = "new"
View Source
var OP_STOP_MONITOR = "stop"
View Source
var YakRunnerMonitor *filesys.YakFileMonitor

Functions

func CreateUrlFromString added in v1.3.2

func CreateUrlFromString(raw string) (*ypb.YakURL, error)

func GetQueryParam added in v1.3.2

func GetQueryParam(params []*ypb.KVPair, key string) string

func LoadGetResource added in v1.3.2

func LoadGetResource(u string) (*ypb.RequestYakURLResponse, error)

func Value2Response

func Value2Response(value *ssaapi.Value, url *ypb.YakURL) *ypb.YakURLResource

func Variable2Response

func Variable2Response(result *ssaapi.SyntaxFlowResult, url *ypb.YakURL) []*ypb.YakURLResource

Types

type ActionService added in v1.3.0

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

func GetActionService added in v1.3.0

func GetActionService() *ActionService

func (*ActionService) CreateAction added in v1.3.0

func (s *ActionService) CreateAction(schema string) Action

func (*ActionService) GetAction added in v1.3.0

func (s *ActionService) GetAction(schema string) Action

func (*ActionService) Stop added in v1.3.0

func (s *ActionService) Stop()

type BaseAction added in v1.3.2

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

func (*BaseAction) Delete added in v1.3.2

func (*BaseAction) Do added in v1.3.2

func (*BaseAction) Get added in v1.3.2

func (*BaseAction) Head added in v1.3.2

func (*BaseAction) Post added in v1.3.2

func (*BaseAction) Put added in v1.3.2

type BaseActionHandler added in v1.3.2

type BaseActionHandler func(getParam func(key string) (string, error), body []byte, raw []*ypb.KVPair) (*ypb.RequestYakURLResponse, error)

type CodeRange

type CodeRange struct {
	URL         string `json:"url"`
	StartLine   int64  `json:"start_line"`
	StartColumn int64  `json:"start_column"`
	EndLine     int64  `json:"end_line"`
	EndColumn   int64  `json:"end_column"`
}

type NodeInfo

type NodeInfo struct {
	NodeID    int        `json:"node_id"`
	IRCode    string     `json:"ir_code"`
	CodeRange *CodeRange `json:"code_range"`
}

type SyntaxFlowAction

type SyntaxFlowAction struct {
	ProgramCache *utils.CacheWithKey[string, *ssaapi.Program]          // name - program
	QueryCache   *utils.CacheWithKey[string, *ssaapi.SyntaxFlowResult] // hash - result
}

func NewSyntaxFlowAction

func NewSyntaxFlowAction() *SyntaxFlowAction

func (*SyntaxFlowAction) Delete

func (*SyntaxFlowAction) Do

func (*SyntaxFlowAction) Get

Get SyntaxFlowAction

Request :
	url : "syntaxflow://program_id/variable/index"
	body: syntaxflow code
Response:
	1. "syntaxflow://program_id/" :
		* ResourceType: message / variable
		all variable names
	2. "syntaxflow://program_id/variable_name" :
		* ResourceType: value
		all values in this variable
	3. "syntaxflow://program_id/variable_name/index" :
		* ResourceType: information
		this value information, contain message && graph && node-info

func (*SyntaxFlowAction) Head

func (*SyntaxFlowAction) Post

func (*SyntaxFlowAction) Put

Jump to

Keyboard shortcuts

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