{"modulePath":"github.com/salemove/crossplane-function-javascript","version":"v0.3.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package main\n\nPackage main implements a Composition Function.\n\n## Constants\n\n```go\nconst (\n\tAnnotationReadyKey = \"javascript.fn.crossplane.io/ready\"\n)\n```\n\n## Types\n\n```go\ntype CLI struct {\n\tDebug bool `short:\"d\" help:\"Emit debug logs in addition to info logs.\"`\n\n\tNetwork     string `help:\"Network on which to listen for gRPC connections.\" default:\"tcp\"`\n\tAddress     string `help:\"Address at which to listen for gRPC connections.\" default:\":9443\"`\n\tTLSCertsDir string `help:\"Directory containing server certs (tls.key, tls.crt) and the CA used to verify client certificates (ca.crt)\" env:\"TLS_SERVER_CERTS_DIR\"`\n\tInsecure    bool   `help:\"Run without mTLS credentials. If you supply this flag --tls-server-certs-dir will be ignored.\"`\n}\n```\nCLI of this Function.\n\n```go\nfunc (c *CLI) Run() error\n```\nRun this Function.\n\n```go\ntype Function struct {\n\tfnv1beta1.UnimplementedFunctionRunnerServiceServer\n\t// contains filtered or unexported fields\n}\n```\nFunction returns whatever response you ask it to.\n\n```go\nfunc (f *Function) RunFunction(_ context.Context, req *fnv1beta1.RunFunctionRequest) (*fnv1beta1.RunFunctionResponse, error)\n```\nRunFunction runs the Function.\n\n```go\ntype Response struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewResponse(req *fnv1beta1.RunFunctionRequest) (*Response, error)\n```\nNewResponse creates a Response object passed as a second argument to the JavaScript handler function.\n\n```go\nfunc (r *Response) SetConnectionDetails(details map[string]string)\n```\nSetConnectionDetails sets the desired composite resource connection details in the function response.\n\n```go\nfunc (r *Response) SetDesiredComposedResource(name string, obj map[string]any) error\n```\nSetDesiredComposedResource sets the desired composed resource in the function response. The caller must be sure to avoid overwriting the desired state that may have been accumulated by previous Functions in the pipeline, unless they intend to.\n\n```go\nfunc (r *Response) UpdateCompositeStatus(status map[string]any) error\n```\nUpdateCompositeStatus merges the desired composite resource status in the function response. In case of conflict, new values have priority over existing ones.\n\n","path":"github.com/salemove/crossplane-function-javascript","name":"main","synopsis":"Package main implements a Composition Function.","isRedistributable":true}
