Documentation
¶
Index ¶
- func ArgumentError(function string, expected string, received int)
- func MathError(function string, operation string, value interface{})
- func RegisterCSV(env *r2core.Environment)
- func RegisterCollections(env *r2core.Environment)
- func RegisterConcurrency(env *r2core.Environment)
- func RegisterConsole(env *r2core.Environment)
- func RegisterDB(env *r2core.Environment)
- func RegisterDate(env *r2core.Environment)
- func RegisterGRPC(env *r2core.Environment)
- func RegisterGoInterOp(env *r2core.Environment)
- func RegisterHTTP(env *r2core.Environment)
- func RegisterHTTPClient(env *r2core.Environment)
- func RegisterHack(env *r2core.Environment)
- func RegisterIO(env *r2core.Environment)
- func RegisterJSON(env *r2core.Environment)
- func RegisterJWT(env *r2core.Environment)
- func RegisterLib(env *r2core.Environment)
- func RegisterMath(env *r2core.Environment)
- func RegisterModule(env *r2core.Environment, moduleName string, ...)
- func RegisterOS(env *r2core.Environment)
- func RegisterPrint(env *r2core.Environment)
- func RegisterRand(env *r2core.Environment)
- func RegisterRequests(env *r2core.Environment)
- func RegisterSOAP(env *r2core.Environment)
- func RegisterStd(env *r2core.Environment)
- func RegisterString(env *r2core.Environment)
- func RegisterTest(env *r2core.Environment)
- func RegisterUnicode(env *r2core.Environment)
- func RegisterXML(env *r2core.Environment)
- func TypeArgumentError(function string, argIndex int, expected string, received interface{})
- type BasicAuth
- type CommandObject
- type ContentType
- type FileStreamObject
- type GRPCAuth
- type GRPCClient
- type GRPCMethod
- type GRPCService
- type GRPCStream
- type GoObject
- type Graph
- func (g *Graph) AddBidirectionalEdge(node1, node2 string)
- func (g *Graph) AddEdge(from, to string)
- func (g *Graph) EnableDebug()
- func (g *Graph) GetAncestors(node string) []string
- func (g *Graph) GetDescendants(node string) []string
- func (g *Graph) GetRelationshipLevel(start, end string) int
- func (g *Graph) GetShortestPath(start, end string) []string
- type Monitor
- type NativeFunction
- type PathObject
- type R2Process
- type Response
- type SOAPAuth
- type SOAPClient
- type SOAPOperation
- type SOAPParameter
- type Semaphore
- type Session
- type WSDLBinding
- type WSDLBindingOperation
- type WSDLDefinitions
- type WSDLElement
- type WSDLMessage
- type WSDLOperation
- type WSDLPart
- type WSDLPort
- type WSDLPortType
- type WSDLSchema
- type WSDLService
- type WSDLSoapAction
- type WSDLSoapAddress
- type WSDLTypes
- type XMLNode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ArgumentError ¶
ArgumentError generates an improved argument error
func RegisterCSV ¶
func RegisterCSV(env *r2core.Environment)
func RegisterCollections ¶
func RegisterCollections(env *r2core.Environment)
func RegisterConcurrency ¶
func RegisterConcurrency(env *r2core.Environment)
func RegisterConsole ¶
func RegisterConsole(env *r2core.Environment)
func RegisterDB ¶
func RegisterDB(env *r2core.Environment)
func RegisterDate ¶
func RegisterDate(env *r2core.Environment)
func RegisterGRPC ¶
func RegisterGRPC(env *r2core.Environment)
RegisterGRPC registers gRPC functions in R2Lang environment
func RegisterGoInterOp ¶
func RegisterGoInterOp(env *r2core.Environment)
RegisterGoInterOp: expone funciones que permiten a R2 usar el registro
func RegisterHTTP ¶
func RegisterHTTP(env *r2core.Environment)
func RegisterHTTPClient ¶
func RegisterHTTPClient(env *r2core.Environment)
func RegisterHack ¶
func RegisterHack(env *r2core.Environment)
func RegisterIO ¶
func RegisterIO(env *r2core.Environment)
func RegisterJSON ¶
func RegisterJSON(env *r2core.Environment)
func RegisterJWT ¶
func RegisterJWT(env *r2core.Environment)
func RegisterLib ¶
func RegisterLib(env *r2core.Environment)
func RegisterMath ¶
func RegisterMath(env *r2core.Environment)
func RegisterModule ¶
func RegisterModule(env *r2core.Environment, moduleName string, functions map[string]r2core.BuiltinFunction)
RegisterModule registers a module with its functions under a namespace
func RegisterOS ¶
func RegisterOS(env *r2core.Environment)
func RegisterPrint ¶
func RegisterPrint(env *r2core.Environment)
func RegisterRand ¶
func RegisterRand(env *r2core.Environment)
func RegisterRequests ¶
func RegisterRequests(env *r2core.Environment)
func RegisterSOAP ¶
func RegisterSOAP(env *r2core.Environment)
RegisterSOAP registers SOAP functions in R2Lang environment
func RegisterStd ¶
func RegisterStd(env *r2core.Environment)
func RegisterString ¶
func RegisterString(env *r2core.Environment)
func RegisterTest ¶
func RegisterTest(env *r2core.Environment)
func RegisterUnicode ¶
func RegisterUnicode(env *r2core.Environment)
func RegisterXML ¶
func RegisterXML(env *r2core.Environment)
func TypeArgumentError ¶
TypeArgumentError generates an improved type argument error
Types ¶
type CommandObject ¶
type CommandObject struct {
// contains filtered or unexported fields
}
CommandObject represents an external command with a fluent API.
func (*CommandObject) Eval ¶
func (c *CommandObject) Eval(env *r2core.Environment) interface{}
type ContentType ¶
type ContentType int
ContentType representa el tipo de contenido detectado.
const ( Unknown ContentType = iota JSONType XMLType HTMLType TextType )
func DetectContentType ¶
func DetectContentType(input string) ContentType
DetectContentType determina si una cadena es JSON, XML, HTML o Texto Plano.
func (ContentType) String ¶
func (c ContentType) String() string
String convierte el ContentType a una representación en string.
type FileStreamObject ¶
type FileStreamObject struct {
// contains filtered or unexported fields
}
FileStreamObject represents a stream of lines from a file with fluent operations.
func (*FileStreamObject) Eval ¶
func (fs *FileStreamObject) Eval(env *r2core.Environment) interface{}
type GRPCAuth ¶
type GRPCAuth struct {
Type string // "bearer", "basic", "mtls", "custom"
Token string
Username string
Password string
CertFile string
KeyFile string
CAFile string
Metadata map[string]string
}
GRPCAuth represents authentication configuration for gRPC
type GRPCClient ¶
type GRPCClient struct {
ProtoFile string
ServerAddr string
FileDesc *desc.FileDescriptor
Services map[string]*GRPCService
Connection *grpc.ClientConn
Timeout time.Duration
Metadata map[string]string
TLSConfig *tls.Config
UseTLS bool
Auth *GRPCAuth
Compression string
// contains filtered or unexported fields
}
GRPCClient represents a dynamic gRPC client
type GRPCMethod ¶
type GRPCMethod struct {
Name string
InputType string
OutputType string
ClientStreaming bool
ServerStreaming bool
Desc *desc.MethodDescriptor
}
GRPCMethod represents a gRPC method with its details
type GRPCService ¶
type GRPCService struct {
Name string
Methods map[string]*GRPCMethod
Desc *desc.ServiceDescriptor
}
GRPCService represents a gRPC service with its methods
type GRPCStream ¶
type GRPCStream struct {
// contains filtered or unexported fields
}
GRPCStream represents a gRPC streaming connection
type GoObject ¶
type GoObject struct {
// contains filtered or unexported fields
}
Estructura que podemos usar para simular objetos Go Se crea con "goNew('MyStruct')" y se guarda en un *GoObject
func (*GoObject) Eval ¶
func (g *GoObject) Eval(env *r2core.Environment) interface{}
Eval => no hace nada especial
type Graph ¶
type Graph struct {
Edges map[string][]string
Debug bool
ReverseMap map[string][]string // Cached reverse edges for efficient descendant queries
}
Graph represents a directed graph for knowledge representation.
func (*Graph) AddBidirectionalEdge ¶
AddBidirectionalEdge adds a bidirectional edge.
func (*Graph) GetAncestors ¶
GetAncestors finds all ancestors of a node using DFS.
func (*Graph) GetDescendants ¶
GetDescendants finds all descendants of a node using DFS.
func (*Graph) GetRelationshipLevel ¶
GetRelationshipLevel finds the shortest distance between two nodes.
func (*Graph) GetShortestPath ¶
GetShortestPath finds the shortest path between two nodes using BFS.
type Monitor ¶
type Monitor struct {
// contains filtered or unexported fields
}
Monitor estructura
func (*Monitor) Broadcast ¶
func (m *Monitor) Broadcast()
Broadcast despierta todas las goroutines esperando en la condición
type NativeFunction ¶
type NativeFunction struct {
Fn r2core.BuiltinFunction
}
PathObject represents a file system path with a fluent API.
func (*NativeFunction) Eval ¶
func (nf *NativeFunction) Eval(env *r2core.Environment) interface{}
type PathObject ¶
type PathObject struct {
Path string
}
PathObject represents a file system path with a fluent API.
func (*PathObject) Eval ¶
func (p *PathObject) Eval(env *r2core.Environment) interface{}
type R2Process ¶
type R2Process struct {
// contains filtered or unexported fields
}
Estructura para guardar referencia a un proceso lanzado en background
func (*R2Process) Eval ¶
func (rp *R2Process) Eval(env *r2core.Environment) interface{}
R2Process Eval => no hace nada, solo devolvemos algo representativo
type Response ¶
type Response struct {
URL string
StatusCode int
Headers map[string]interface{}
Text string
JSON interface{}
Content []byte
OK bool
Elapsed time.Duration
}
Response represents an HTTP response with Python requests-like interface
type SOAPAuth ¶
type SOAPAuth struct {
Type string // "basic", "bearer", "certificate"
Username string
Password string
Token string
CertFile string
KeyFile string
}
SOAPAuth represents authentication configuration
type SOAPClient ¶
type SOAPClient struct {
WSDLURL string
ServiceURL string
Namespace string
Operations map[string]*SOAPOperation
HTTPTimeout time.Duration
Headers map[string]string
TLSConfig *tls.Config
SkipTLSVerify bool
Auth *SOAPAuth
}
SOAPClient represents a dynamic SOAP client
type SOAPOperation ¶
type SOAPOperation struct {
Name string
SOAPAction string
InputMessage string
Parameters []SOAPParameter
}
SOAPOperation represents a SOAP operation with its parameters
type SOAPParameter ¶
SOAPParameter represents a parameter for a SOAP operation
type Semaphore ¶
type Semaphore struct {
// contains filtered or unexported fields
}
Semaphore estructura
func NewSemaphore ¶
NewSemaphore crea un nuevo semáforo con el número dado de permisos
type Session ¶
type Session struct {
Client *http.Client
Headers map[string]string
Auth *BasicAuth
Timeout time.Duration
Verify bool
BaseURL string
Proxies map[string]string
MaxRetries int
RetryDelay time.Duration
}
Session represents an HTTP session for reusing connections and settings
type WSDLBinding ¶
type WSDLBinding struct {
Name string `xml:"name,attr"`
Type string `xml:"type,attr"`
Operations []WSDLBindingOperation `xml:"operation"`
}
WSDLBinding represents a WSDL binding
type WSDLBindingOperation ¶
type WSDLBindingOperation struct {
Name string `xml:"name,attr"`
SOAPAction WSDLSoapAction `xml:"operation"`
}
WSDLBindingOperation represents a WSDL binding operation
type WSDLDefinitions ¶
type WSDLDefinitions struct {
XMLName xml.Name `xml:"definitions"`
TargetNS string `xml:"targetNamespace,attr"`
Services []WSDLService `xml:"service"`
PortTypes []WSDLPortType `xml:"portType"`
Bindings []WSDLBinding `xml:"binding"`
Messages []WSDLMessage `xml:"message"`
Types WSDLTypes `xml:"types"`
}
WSDLDefinitions represents the root element of a WSDL document
type WSDLElement ¶
WSDLElement represents a WSDL element
type WSDLMessage ¶
WSDLMessage represents a WSDL message
type WSDLOperation ¶
type WSDLOperation struct {
Name string `xml:"name,attr"`
Input WSDLMessage `xml:"input"`
Output WSDLMessage `xml:"output"`
}
WSDLOperation represents a WSDL operation
type WSDLPart ¶
type WSDLPart struct {
Name string `xml:"name,attr"`
Element string `xml:"element,attr"`
Type string `xml:"type,attr"`
}
WSDLPart represents a WSDL message part
type WSDLPort ¶
type WSDLPort struct {
Name string `xml:"name,attr"`
Address WSDLSoapAddress `xml:"address"`
}
WSDLPort represents a WSDL port
type WSDLPortType ¶
type WSDLPortType struct {
Name string `xml:"name,attr"`
Operations []WSDLOperation `xml:"operation"`
}
WSDLPortType represents a WSDL port type
type WSDLSchema ¶
type WSDLSchema struct {
Elements []WSDLElement `xml:"element"`
}
WSDLSchema represents a WSDL schema
type WSDLService ¶
WSDLService represents a WSDL service
type WSDLSoapAction ¶
type WSDLSoapAction struct {
SOAPAction string `xml:"soapAction,attr"`
}
WSDLSoapAction represents a SOAP action
type WSDLSoapAddress ¶
type WSDLSoapAddress struct {
Location string `xml:"location,attr"`
}
WSDLSoapAddress represents a SOAP address
type WSDLTypes ¶
type WSDLTypes struct {
Schemas []WSDLSchema `xml:"schema"`
}
WSDLTypes represents WSDL types
Source Files
¶
- commons.go
- commonsDetectContentType.go
- error_helpers.go
- r2collections.go
- r2console.go
- r2csv.go
- r2date.go
- r2db.go
- r2go.go
- r2goroutine.r2.go
- r2grpc.go
- r2hack.go
- r2http.go
- r2httpclient.go
- r2io.go
- r2json.go
- r2jwt.go
- r2lang_graph.go
- r2lib.go
- r2math.go
- r2os.go
- r2print.go
- r2rand.go
- r2requests.go
- r2soap.go
- r2std.go
- r2string.go
- r2test.go
- r2unicode.go
- r2xml.go