About

Get Started

Docs

The Sølid Book

Sølid

Sølid is poised to redefine the landscape of JavaScript runtimes, providing a seamless programming experience for server, desktop, and mobile computing. By eliminating the need for developers to relearn their programming skills, Sølid empowers them to effortlessly transition between different platforms.

What sets Sølid apart is its universality. It's designed to operate on a wide array of operating systems, including iOS, Android, macOS, Windows, and Linux, wherever both V8 and Golang are accessible. This broad compatibility ensures that developers can utilize Sølid's capabilities across a multitude of environments without facing compatibility roadblocks.

Sølid's vision extends beyond traditional platforms. It aspires to unify decentralized computing within a single application runtime. This means that developers can harness its power to create applications that leverage decentralized infrastructure, enhancing security, resilience, and user control. Furthermore, Sølid simplifies complex internet architectures, streamlining the development process by abstracting intricacies and allowing developers to focus on creating valuable applications.

The inclusion of containerd support, a widely used runtime for containers like Docker, highlights Sølid's adaptability to modern software deployment practices. By accommodating containerized workloads, Sølid eases the development and deployment of applications in containerized environments, fostering efficient, scalable, and portable solutions.

As Sølid paves the way for the future, it envisions a more cohesive and decentralized computing landscape. By facilitating the seamless integration of various platforms, streamlining complex internet structures, and supporting modern containerization practices, Sølid is propelling the programming experience into a new era of accessibility, efficiency, and versatility.

Distributing

This documentation is available for download and can be printed using a capable browser such as Google Chrome or Firefox.

We version control this documentation, and it is available as part of the @gosolid/solid-docs NPM package, corresponding to the version of solid it is released for.

If you have a public mirror that can mirror this site, we appreciate your support, please get in touch by creating a GitHub Issue or by email.

Click here to download a full printable archive of this documentation site.

Copyright

Copyright is held by Wisdom and Love and maintains control of the codebase.

Anyone contributing resigns Copyright to Wisdom and Love.

A perpetual MIT licence is available for any code contributed to Wisdom and Love.

Wisdom and Love is Here!

About

Sølid, the innovative runtime engine developed by Grexie, is a powerful tool that empowers programmers to build decentralized, secure, and high-performance applications. Tailored for the modern internet landscape, Sølid offers a range of capabilities that enhance the development experience while prioritizing data privacy and efficiency.

At its core, Sølid is designed to seamlessly integrate with both Node.js and WebRTC, offering a unique combination of server-side capabilities and real-time communication. This fusion enables programmers to create applications that leverage the strengths of both technologies, resulting in responsive, interactive, and globally distributed software.

Sølid's architecture is extensible and security aware, offering programmers a flexible foundation to build upon. Its decentralized design allows for customized access control, ensuring that data infiltration decisions are in the hands of the user. This level of control aligns with modern data privacy standards and empowers programmers to create applications that respect user consent.

Programmers using Sølid can tap into its efficient traffic distribution mechanism, benefiting from the integration of WebRTC. This means that applications can intelligently route traffic from Tier 1 to Tier 2 connections, optimizing data delivery and minimizing latency. Additionally, Sølid's support for geographical availability and redundancy ensures that applications remain highly accessible and reliable.

Sølid's security features stand out, especially in private cloud environments. With a least-access security principle by default, programmers can rest assured that data remains protected. Moreover, Sølid's user-friendly dashboard allows for straightforward customization, enabling access when necessary.

Whether hosting applications on public or private clouds, Sølid accommodates a wide range of setups. Programmers can leverage their existing infrastructure, utilize public cloud services, or tap into Grexie's own public cloud offering. This flexibility ensures that applications can be deployed in environments that suit their specific needs.

In a world where data privacy and user control are paramount, Sølid equips programmers with the tools to create applications that uphold these values. Its combination of decentralization, security, and efficiency empowers programmers to contribute to a more user-centric, secure, and responsive digital ecosystem. As the internet continues to evolve, Sølid stands as a beacon for programmers seeking to build applications that align with the future of decentralized, privacy-conscious technology.

The decentralized internet

Sølid, an innovative runtime engine developed by Grexie, stands at the forefront of the mission to decentralize the internet. Crafted on the robust foundation of the Golang programming language and leveraging the power of the V8 engine, Sølid emerges as a critical enabler for Grexie Cloud's vision of reshaping the digital landscape.

At its core, Sølid is a Node.js-compatible runtime engine that plays a pivotal role in driving the decentralization paradigm. It serves as the technological bridge between traditional Node.js applications and the novel decentralized infrastructure that Grexie Cloud champions. By being Node.js-compatible, Sølid ensures a smooth transition for developers, allowing them to leverage their existing skills while embracing the innovative opportunities presented by the decentralized internet.

Built on Golang, Sølid inherits the performance, scalability, and efficiency attributes that the language is renowned for. This strategic choice empowers Sølid to efficiently manage the intricacies of decentralized applications, ensuring optimal utilization of resources across distributed nodes. The integration of the V8 engine, renowned for its speed and optimization prowess, further enhances Sølid's capabilities, making it well-equipped to handle the dynamic demands of modern internet applications.

Sølid's significance within the Grexie ecosystem is monumental. It serves as the linchpin that binds Grexie Cloud's decentralized architecture. Through Sølid, Grexie Cloud is able to seamlessly distribute applications, services, and data across a network of nodes, fostering a resilient and fault-tolerant environment. This approach not only enhances security by mitigating single points of failure but also contributes to reduced latency and enhanced user experiences.

The runtime engine's flexibility is another hallmark. Developers can harness Sølid's capabilities to create decentralized applications that capitalize on the benefits of peer-to-peer communication, cryptographic security, and data ownership. This flexibility extends to diverse industries, ranging from finance to healthcare, where secure and reliable data distribution is paramount.

In essence, Sølid serves as the embodiment of Grexie's vision for the future of the internet. It is a technological cornerstone that empowers developers, businesses, and users to engage with a decentralized digital landscape seamlessly. By facilitating the transition to decentralized applications and services, Sølid lays the groundwork for a more democratic, secure, and resilient internet ecosystem.

Grexie's innovative approach of rewriting the Node.js runtime through a Golang-native runtime represents a significant leap forward in enhancing the efficiency and capabilities of Node.js applications. By seamlessly integrating the strengths of both languages, Grexie introduces a novel paradigm that benefits developers, users, and the broader technology landscape.

Node.js, known for its event-driven, non-blocking architecture, has become a cornerstone for building scalable and responsive applications. However, the Grexie enhancement takes Node.js to the next level by harnessing the power of Golang, a language renowned for its performance, concurrency handling, and efficient memory management.

One of the standout features of Grexie's innovation is the native stream support it provides for both operational workloads and network-intensive I/O operations. Streams are a fundamental concept in Node.js, allowing data to be processed in chunks rather than loading entire datasets into memory, which is critical for managing large volumes of data efficiently. By optimizing this stream functionality using Golang's runtime, Grexie maximizes throughput and minimizes latency, resulting in streamlined data processing and improved application performance.

Furthermore, Golang's concurrency model is exceptionally well-suited for handling high loads and distributing workloads across multiple threads or goroutines, which aligns seamlessly with Node.js's asynchronous design philosophy. This combination allows Grexie to offer a runtime environment that excels in managing both compute-heavy tasks and I/O-bound operations, which is particularly valuable for modern applications that often demand a balance of both.

The fusion of Node.js and Golang within the Grexie framework empowers developers to build applications that are not only responsive and scalable but also optimized for resource utilization. This optimization extends to network-heavy I/O, which is crucial in today's connected world where data transfer speeds and efficient handling of network interactions are paramount.

Ultimately, Grexie's achievement of creating a Golang-native runtime for Node.js showcases the organization's commitment to innovation and performance-driven solutions. By reimagining the underlying runtime infrastructure, Grexie demonstrates its dedication to pushing the boundaries of what is possible with Node.js, leading to applications that are not only powerful and versatile but also optimized for modern computing demands.

The integration of WebRTC into Sølid marks a significant advancement in the capabilities of Grexie's technology stack. WebRTC's inherent ability to establish real-time communication channels, coupled with Sølid's innovative Golang-native runtime, opens the door to a truly global and interconnected network environment.

WebRTC's strength lies in its capacity to enable peer-to-peer communication directly between devices, often within web browsers, without the need for intermediaries. By integrating WebRTC into Sølid, Grexie enhances the potential of its runtime engine to communicate with virtually any data center, including personal networks like your home network. Here's how this integration can transform connectivity:

  1. Global Data Communication: With WebRTC capabilities integrated into Sølid, applications powered by Grexie can initiate real-time communication with data centers anywhere in the world. This opens up opportunities for seamless data transfer, sharing, and collaboration across geographic boundaries.

  2. Decentralized Data Exchange: Grexie's integration of WebRTC and Sølid aligns perfectly with its vision of decentralizing the internet. With the ability to directly communicate with data centers on a peer-to-peer basis, users and applications can bypass traditional centralized server infrastructure, contributing to a more distributed and resilient online ecosystem.

  3. Secure and Private Communication: WebRTC's encryption and security features, combined with Sølid's optimized runtime, enhance the security of data transmission. Whether communicating with a data center on the other side of the planet or within your home network, the integration prioritizes data privacy and protection.

  4. Dynamic Networking: The ability to communicate with any data center, including your home network, introduces dynamic networking possibilities. This can include scenarios like remote access, IoT device communication, and seamless synchronization of data across various locations.

  5. Real-time Streaming and Interaction: The WebRTC-Sølid combination facilitates real-time streaming of content, enabling interactive experiences with low latency. This is valuable for applications ranging from video conferencing to live streaming to interactive online gaming.

As Grexie continues to pave the way for the internet's evolution, Sølid stands as a testament to the organization's commitment to innovation, empowerment, and the relentless pursuit of a decentralized digital frontier. With Sølid, the future of the internet becomes not just a distant vision but a tangible reality, one where individuals and communities reclaim control over their digital experiences.

Hybrid clouds

Sølid's versatile hosting capabilities mark a significant stride towards democratizing internet infrastructure. Whether it's on a personal server behind a NAT, within an office environment, or on a public cloud like Amazon Web Services (AWS), Sølid empowers users to host their applications and services seamlessly. This flexibility, combined with Sølid's use of WebRTC for distributing traffic, ensures a resilient and responsive network environment.

  1. Personal and Office Hosting: Sølid's ability to run on NATed servers at home or in an office environment addresses the need for decentralized hosting solutions. This means users can leverage their existing resources to host applications, services, and data, reducing the dependency on traditional data centers and central servers.

  2. Public Cloud Hosting: The compatibility of Sølid with public cloud platforms like AWS further broadens hosting options. This is particularly beneficial for those who prefer the scalability and resources offered by cloud providers, enabling seamless deployment on well-established cloud infrastructures.

  3. WebRTC for Traffic Distribution: The integration of WebRTC into Sølid introduces an innovative approach to traffic distribution. WebRTC's real-time communication capabilities are harnessed to efficiently distribute traffic across the internet, ensuring optimal data delivery and minimizing latency.

  4. Overcoming NAT Limitations: Sølid's ability to utilize public nodes when behind a NAT device without port forwarding capabilities is a notable feature. This addresses a common challenge faced by users who want to host services but are restricted by their network configuration. By tapping into accessible public nodes, Sølid ensures that traffic can flow effectively even in such scenarios.

  5. Decentralized Resilience: Sølid's utilization of various hosting environments, including personal, office, and public cloud, contributes to a decentralized and resilient network landscape. This approach minimizes single points of failure, enhances security, and distributes the load for improved overall performance.

In essence, Sølid's adaptability and integration of WebRTC underscore its role in revolutionizing internet hosting. By enabling hosting on a wide range of environments, including behind NAT devices and on public clouds, and by leveraging WebRTC for traffic distribution, Sølid empowers users to create a more distributed and interconnected internet ecosystem. This aligns with Grexie's vision of decentralizing the internet and enhancing user control over their digital experiences.

Indeed, the concepts and features offered by Sølid align with what might be considered common sense in the context of optimizing and decentralizing internet infrastructure. Many of these features address fundamental challenges and needs in the digital landscape, making them intuitive and logical solutions to enhance connectivity and efficiency. By integrating aspects like geographical availability, redundancy, flexible hosting options, and traffic distribution, Sølid leverages common sense principles to create a more resilient, distributed, and responsive network environment.

While the ideas behind Sølid's functionality might seem intuitive, their implementation and integration require sophisticated engineering, innovation, and a deep understanding of networking and distributed systems. Building a system that seamlessly combines these concepts and leverages them to empower users in a practical and effective manner involves complex technical considerations.

The true innovation lies in Grexie's ability to execute on these common-sense principles and develop a comprehensive solution like Sølid that transforms these concepts into a reality. By bridging the gap between intuitive concepts and practical implementation, Grexie is contributing to the evolution of the internet landscape in a way that aligns with the expectations and needs of modern users and developers.

Sølid's advanced traffic distribution capabilities, coupled with its features for geographical availability, redundancy, and flexible hosting options, position it as a robust solution for reshaping the landscape of internet connectivity. Here's a breakdown of its key features:

  1. Traffic Distribution across Tiers: Sølid's ability to distribute traffic from Tier 1 connections to Tier 2 internet connections underscores its capability to optimize data delivery paths. This ensures efficient utilization of network resources and enhanced user experiences.

  2. Geographical Availability: Sølid's built-in geographical availability feature is a crucial asset for applications and services that require regional accessibility. By intelligently directing traffic to nodes based on their geographical proximity, Sølid minimizes latency and enhances performance.

  3. Redundancy and Failover: The ability of Sølid to facilitate traffic takeover by operational nodes in case of suspended or unoperational nodes ensures high availability and minimizes service disruptions. This built-in redundancy mechanism contributes to a reliable and resilient network infrastructure.

  4. Public Endpoint Setup: Sølid offers versatile options for setting up public endpoints. Whether through public cloud services, home DSL or Cable connections with UPnP port forwarding, or via Grexie's dedicated public cloud offering, users have the flexibility to choose the setup that aligns with their requirements.

  5. Consortium and Decentralization: Grexie's call for members to join their consortium as partners to offer public Tier 1 nodes speaks to their commitment to decentralizing the internet. By collaborating with partners to provide Tier 1 nodes for public consumption, Grexie aims to expand the reach of their decentralized infrastructure and create a more distributed network ecosystem.

In summary, Sølid's comprehensive features address a wide spectrum of internet connectivity needs. From optimizing traffic distribution across tiers and ensuring geographical availability to incorporating redundancy and failover mechanisms, Sølid empowers users to build resilient, efficient, and responsive applications and services. Moreover, the consortium approach demonstrates Grexie's dedication to collaborative efforts in realizing their vision of a decentralized internet.

Security

The security measures implemented by Sølid demonstrate its commitment to providing a robust and controlled environment for hosting applications and services. The configurable access controls and security options contribute to creating a secure and controlled environment across both public and private cloud setups:

  1. Public Cloud Security: In the context of public clouds, Sølid's capability to configure access on a per-process and per-isolate basis adds a layer of granularity to security management. This feature allows administrators to restrict access to local network and host-based resources, mitigating potential security vulnerabilities. This fine-grained control ensures that hosted applications have only the necessary access privileges, enhancing the overall security posture.

  2. Private Cloud Security: For private cloud environments, Sølid follows a least-access security principle, aligning with best practices in security. By default, Sølid ensures that access to resources is limited to what is essential, reducing the potential attack surface. Furthermore, the ease of opening access through the built-in Sølid dashboard provides administrators with the flexibility to customize security settings based on their specific requirements.

These security measures cater to the varying needs of users and organizations, striking a balance between accessibility and safeguarding against potential security threats. By allowing administrators to tailor access controls to their use cases, Sølid empowers users to create a secure and controlled hosting environment that aligns with their security protocols and compliance standards.

It's important to note that while these security principles might seem intuitive, their effective implementation requires careful engineering and a deep understanding of both networking and security practices. The fact that Sølid offers these security features as part of its offering underscores its commitment to providing a comprehensive solution that caters to the modern needs of secure application hosting.

Sølid's emphasis on extensibility and security awareness reflects its dedication to providing a flexible yet secure foundation for hosting applications and services. The ability to make informed choices, especially when it comes to data security and privacy, is a pivotal aspect of Sølid's design philosophy. Here are some key points to consider:

  1. Extensibility and Security: The fact that Sølid is designed to be extensible means that it can adapt to a variety of use cases and accommodate the evolving needs of users and applications. This extensibility is crucial as it allows developers and administrators to tailor the system to their specific requirements while maintaining security.

  2. Decentralized Choice: Sølid's decentralized design aligns with the principles of user autonomy and control. The ability to choose whether to allow data infiltration, especially in jurisdictions where such practices might be permissible, empowers users to make decisions aligned with their privacy preferences.

  3. Security and Privacy: Sølid's commitment to security is apparent in its design. The sentiment that private data should remain private is a core tenet of data security and privacy practices. By prioritizing user consent and control, Sølid ensures that users have the final say in granting access to their private data.

  4. Transparency and Consent: The concept of consent is integral to data privacy. Sølid's approach aligns with the principle that data sharing, especially when it is made public, should happen with the user's full awareness and agreement.

  5. User-Centric Design: Sølid's stance reflects a user-centric design approach, emphasizing that individuals should have the right to determine who accesses their data, even when it's in a public domain.

Overall, Sølid's approach encapsulates the broader conversations surrounding data privacy, control, and the role of technology in enabling user choices. Its design philosophy aligns with the idea that the power to decide how data is accessed and shared should rest with the individuals themselves. This kind of approach resonates with those who advocate for user empowerment and protection of privacy in the digital age.

Our pricing structure

We are free and MIT licenced.

Free beer.
Free choice.
Free software.

Free the internet.

+

Operating public clouds

In the age of digital data, preserving privacy has become paramount, and innovative technologies like Sølid are playing a pivotal role in ensuring individuals have control over their personal information. Mobile phones, particularly those offered by Apple, are known for their robust security measures and privacy controls. When combined with Sølid, they create a powerful synergy that enhances data privacy and security. Here are five key points to consider:

  1. Sølid's Privacy Focus: Sølid, the innovative runtime engine developed by Grexie, is designed with a strong focus on privacy. It offers individuals the option to decrypt and process data on their secured mobile devices, giving them the ultimate control over their data.

  2. Mobile Device Security: Apple's mobile devices are renowned for their stringent security measures and privacy controls. When used in conjunction with Sølid, these devices provide an additional layer of security, ensuring that data remains protected and private.

  3. User Confidence: The integration of Sølid with secure mobile devices instills confidence in users that their data is being handled with the utmost care. This approach aligns with the growing demand for increased data privacy and control.

  4. Informed Data Handling: Sølid's design empowers individuals to make informed decisions about how their data is processed. This transparency and user-centric approach reinforce privacy rights in the digital era.

  5. Enhanced Data Security: When Sølid and secure mobile devices join forces, data security is significantly enhanced. This combination ensures that sensitive information remains confidential and protected, even in an increasingly interconnected digital landscape.

The integration of Sølid and secure mobile devices exemplifies a commitment to safeguarding privacy in the digital age. By giving users control over their data and leveraging the robust security features of trusted mobile platforms, this partnership sets a new standard for data privacy and security in an era where personal information is more valuable than ever.

Sølid's support for isolate entrancy timing counters marks a significant advancement in optimizing the resource consumption and billing efficiency of applications hosted on public cloud offerings. This innovative feature addresses the challenges posed by traditional instance-based billing models, where instances are billed for the duration of their operation, including time spent in startup and idle states.

In platforms like AWS Lambda, instance-based billing can lead to inefficiencies and higher costs due to the time spent on instance initialization and the continuous billing during periods of IO operations. Sølid addresses these issues by offering a mechanism that accurately tracks the actual CPU time consumed by an application. This means that you're billed only for the actual processing time, and not for the overhead time incurred during instance startup or idle states.

Sølid's approach enables hosting providers to eliminate the billing overhead associated with idle isolates, resulting in more accurate billing and cost savings for users. By offering a straightforward API accessible within the calling isolate, or even through native code in Golang or C++, Sølid ensures that implementing this feature is seamless and efficient for developers.

This feature aligns with Sølid's overarching goal of providing an efficient, cost-effective, and user-centric runtime environment. By optimizing billing processes and reducing unnecessary costs, Sølid empowers developers and hosting providers to create a more streamlined and economical hosting experience. This approach not only benefits developers' bottom lines but also contributes to a more sustainable and efficient cloud computing ecosystem.

Get Started

API Reference

JavaScript

Golang

dashboard

import "github.com/gosolid/solid/packages/dashboard"

Index

Variables

var FS embed.FS

runtime

import "github.com/gosolid/solid/packages/runtime"

Index

Variables

var FS embed.FS

sentinel

import "github.com/gosolid/solid/packages/sentinel"

Index

Variables

var FS embed.FS

tests

import "github.com/gosolid/solid/packages/tests"

Index

Variables

var FS = fs.NewFS().Mount("/", fs.NewEmbedFS(&testsFS), "/lib")

assert

import "github.com/gosolid/solid/pkg/runtime/assert"

Index

Constants

const (
    AssertionErrorName string = "AssertionError"
    AssertionErrorCode        = "ERR_ASSERTION"
)

func Assert

func Assert() error

func IsAssertionError

func IsAssertionError(err error) bool

func NotStrictEqual

func NotStrictEqual(actual any, expected any, message ...any) error

type AssertionError

type AssertionError interface {
    isolates.Error
    Actual() *isolates.Value
    Expected() *isolates.Value
    Operator() *string
    GeneratedMessage() bool
}

type AssertionErrorBase

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

func (*AssertionErrorBase) Actual

func (e *AssertionErrorBase) Actual() any

func (*AssertionErrorBase) Code

func (e *AssertionErrorBase) Code() string

func (*AssertionErrorBase) Error

func (e *AssertionErrorBase) Error() string

func (*AssertionErrorBase) Expected

func (e *AssertionErrorBase) Expected() any

func (*AssertionErrorBase) GeneratedMessage

func (e *AssertionErrorBase) GeneratedMessage() bool

func (*AssertionErrorBase) Message

func (e *AssertionErrorBase) Message() string

func (*AssertionErrorBase) Name

func (e *AssertionErrorBase) Name() string

func (*AssertionErrorBase) Operator

func (e *AssertionErrorBase) Operator() *string

func (*AssertionErrorBase) String

func (e *AssertionErrorBase) String() string

func (*AssertionErrorBase) V8FuncToString

func (e *AssertionErrorBase) V8FuncToString(in isolates.FunctionArgs) (*isolates.Value, error)

func (*AssertionErrorBase) V8GetActual

func (e *AssertionErrorBase) V8GetActual(in isolates.GetterArgs) (*isolates.Value, error)

func (*AssertionErrorBase) V8GetCode

func (e *AssertionErrorBase) V8GetCode(in isolates.GetterArgs) (*isolates.Value, error)

func (*AssertionErrorBase) V8GetExpected

func (e *AssertionErrorBase) V8GetExpected(in isolates.GetterArgs) (*isolates.Value, error)

func (*AssertionErrorBase) V8GetGeneratedMessage

func (e *AssertionErrorBase) V8GetGeneratedMessage(in isolates.GetterArgs) (*isolates.Value, error)

func (*AssertionErrorBase) V8GetMessage

func (e *AssertionErrorBase) V8GetMessage(in isolates.GetterArgs) (*isolates.Value, error)

func (*AssertionErrorBase) V8GetName

func (e *AssertionErrorBase) V8GetName(in isolates.GetterArgs) (*isolates.Value, error)

func (*AssertionErrorBase) V8GetOperator

func (e *AssertionErrorBase) V8GetOperator(in isolates.GetterArgs) (*isolates.Value, error)

type AssertionErrorOptions

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

type Import

type Import interface{}

buffer

import "github.com/gosolid/solid/pkg/runtime/buffer"

Index

type Buffer

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

func NewBuffer

func NewBuffer(in isolates.FunctionArgs) *Buffer

func (*Buffer) Buffer

func (b *Buffer) Buffer() *isolates.Value

func (*Buffer) Length

func (b *Buffer) Length(ctx context.Context) (int, error)

func (*Buffer) ToString

func (b *Buffer) ToString(ctx context.Context) (string, error)

func (Buffer) V8Construct

func (b Buffer) V8Construct(in isolates.FunctionArgs) (Buffer, error)

func (*Buffer) V8FuncToString

func (b *Buffer) V8FuncToString(in isolates.FunctionArgs) (*isolates.Value, error)

func (*Buffer) V8GetBuffer

func (b *Buffer) V8GetBuffer(in isolates.GetterArgs) (*isolates.Value, error)

func (*Buffer) V8GetLength

func (b *Buffer) V8GetLength(in isolates.GetterArgs) (*isolates.Value, error)

console

import "github.com/gosolid/solid/pkg/runtime/console"

Index

type Console

type Console interface {
    Assert(args ...any)
    Clear()
    Count(args ...any)
    CountReset(args ...any)
    Debug(args ...any)
    Dir(args ...any)
    DirXML(args ...any)
    Error(args ...any)
    Group(args ...any)
    GroupCollapsed(args ...any)
    GroupEnd(args ...any)
    Info(args ...any)
    Log(args ...any)
    Table(args ...any)
    Time(args ...any)
    TimeEnd(args ...any)
    TimeLog(args ...any)
    Trace(args ...any)
    Warn(args ...any)
    Profile(args ...any)
    ProfileEnd(args ...any)
    TimeStamp(args ...any)
}

type ConsoleBase

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

func NewConsole

func NewConsole(in isolates.FunctionArgs) (*ConsoleBase, error)

func (*ConsoleBase) Assert

func (c *ConsoleBase) Assert(args ...any)

func (*ConsoleBase) Clear

func (c *ConsoleBase) Clear()

func (*ConsoleBase) Count

func (c *ConsoleBase) Count(args ...any)

func (*ConsoleBase) CountReset

func (c *ConsoleBase) CountReset(args ...any)

func (*ConsoleBase) Debug

func (c *ConsoleBase) Debug(args ...any)

func (*ConsoleBase) Dir

func (c *ConsoleBase) Dir(args ...any)

func (*ConsoleBase) DirXML

func (c *ConsoleBase) DirXML(args ...any)

func (*ConsoleBase) Error

func (c *ConsoleBase) Error(args ...any)

func (*ConsoleBase) Group

func (c *ConsoleBase) Group(args ...any)

func (*ConsoleBase) GroupCollapsed

func (c *ConsoleBase) GroupCollapsed(args ...any)

func (*ConsoleBase) GroupEnd

func (c *ConsoleBase) GroupEnd(args ...any)

func (*ConsoleBase) Info

func (c *ConsoleBase) Info(args ...any)

func (*ConsoleBase) Log

func (c *ConsoleBase) Log(args ...any)

func (*ConsoleBase) Profile

func (c *ConsoleBase) Profile(args ...any)

func (*ConsoleBase) ProfileEnd

func (c *ConsoleBase) ProfileEnd(args ...any)

func (*ConsoleBase) Table

func (c *ConsoleBase) Table(args ...any)

func (*ConsoleBase) Time

func (c *ConsoleBase) Time(args ...any)

func (*ConsoleBase) TimeEnd

func (c *ConsoleBase) TimeEnd(args ...any)

func (*ConsoleBase) TimeLog

func (c *ConsoleBase) TimeLog(args ...any)

func (*ConsoleBase) TimeStamp

func (c *ConsoleBase) TimeStamp(args ...any)

func (*ConsoleBase) Trace

func (c *ConsoleBase) Trace(args ...any)

func (*ConsoleBase) V8FuncAssert

func (c *ConsoleBase) V8FuncAssert(in isolates.FunctionArgs) (*isolates.Value, error)

func (*ConsoleBase) V8FuncClear

func (c *ConsoleBase) V8FuncClear(in isolates.FunctionArgs) (*isolates.Value, error)

func (*ConsoleBase) V8FuncCount

func (c *ConsoleBase) V8FuncCount(in isolates.FunctionArgs) (*isolates.Value, error)

func (*ConsoleBase) V8FuncCountReset

func (c *ConsoleBase) V8FuncCountReset(in isolates.FunctionArgs) (*isolates.Value, error)

func (*ConsoleBase) V8FuncDebug

func (c *ConsoleBase) V8FuncDebug(in isolates.FunctionArgs) (*isolates.Value, error)

func (*ConsoleBase) V8FuncDir

func (c *ConsoleBase) V8FuncDir(in isolates.FunctionArgs) (*isolates.Value, error)

func (*ConsoleBase) V8FuncDirXML

func (c *ConsoleBase) V8FuncDirXML(in isolates.FunctionArgs) (*isolates.Value, error)

func (*ConsoleBase) V8FuncError

func (c *ConsoleBase) V8FuncError(in isolates.FunctionArgs) (*isolates.Value, error)

func (*ConsoleBase) V8FuncGroup

func (c *ConsoleBase) V8FuncGroup(in isolates.FunctionArgs) (*isolates.Value, error)

func (*ConsoleBase) V8FuncGroupCollapsed

func (c *ConsoleBase) V8FuncGroupCollapsed(in isolates.FunctionArgs) (*isolates.Value, error)

func (*ConsoleBase) V8FuncGroupEnd

func (c *ConsoleBase) V8FuncGroupEnd(in isolates.FunctionArgs) (*isolates.Value, error)

func (*ConsoleBase) V8FuncInfo

func (c *ConsoleBase) V8FuncInfo(in isolates.FunctionArgs) (*isolates.Value, error)

func (*ConsoleBase) V8FuncLog

func (c *ConsoleBase) V8FuncLog(in isolates.FunctionArgs) (*isolates.Value, error)

func (*ConsoleBase) V8FuncProfile

func (c *ConsoleBase) V8FuncProfile(in isolates.FunctionArgs) (*isolates.Value, error)

func (*ConsoleBase) V8FuncProfileEnd

func (c *ConsoleBase) V8FuncProfileEnd(in isolates.FunctionArgs) (*isolates.Value, error)

func (*ConsoleBase) V8FuncTable

func (c *ConsoleBase) V8FuncTable(in isolates.FunctionArgs) (*isolates.Value, error)

func (*ConsoleBase) V8FuncTime

func (c *ConsoleBase) V8FuncTime(in isolates.FunctionArgs) (*isolates.Value, error)

func (*ConsoleBase) V8FuncTimeEnd

func (c *ConsoleBase) V8FuncTimeEnd(in isolates.FunctionArgs) (*isolates.Value, error)

func (*ConsoleBase) V8FuncTimeLog

func (c *ConsoleBase) V8FuncTimeLog(in isolates.FunctionArgs) (*isolates.Value, error)

func (*ConsoleBase) V8FuncTimeStamp

func (c *ConsoleBase) V8FuncTimeStamp(in isolates.FunctionArgs) (*isolates.Value, error)

func (*ConsoleBase) V8FuncTrace

func (c *ConsoleBase) V8FuncTrace(in isolates.FunctionArgs) (*isolates.Value, error)

func (*ConsoleBase) V8FuncWarn

func (c *ConsoleBase) V8FuncWarn(in isolates.FunctionArgs) (*isolates.Value, error)

func (*ConsoleBase) Warn

func (c *ConsoleBase) Warn(args ...any)

func (*ConsoleBase) Write

func (c *ConsoleBase) Write(writable *isolates.Value, msg string)

func (*ConsoleBase) WriteLine

func (c *ConsoleBase) WriteLine(writable *isolates.Value, msg string)

crypto

import "github.com/gosolid/solid/pkg/runtime/crypto"

Index

type Hash

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

func NewHash

func NewHash(algorithm string) (*Hash, error)

func (*Hash) Algorithm

func (h *Hash) Algorithm() string

func (*Hash) Sum

func (h *Hash) Sum(b []byte) []byte

func (*Hash) V8FuncDigest

func (h *Hash) V8FuncDigest(in isolates.FunctionArgs) (*isolates.Value, error)

func (*Hash) V8FuncUpdate

func (h *Hash) V8FuncUpdate(in isolates.FunctionArgs) (*isolates.Value, error)

func (*Hash) V8GetAlgorithm

func (h *Hash) V8GetAlgorithm(in isolates.GetterArgs) (*isolates.Value, error)

func (*Hash) Write

func (h *Hash) Write(b []byte) (int, error)

events

import "github.com/gosolid/solid/pkg/runtime/events"

Index

type EventEmitter

type EventEmitter interface {
    AddListener(ctx context.Context, eventName string, listener *isolates.Value) error
    AddListenerOnce(ctx context.Context, eventName string, listener *isolates.Value) error
    Emit(ctx context.Context, eventName string, args ...any) error
    EmitError(ctx context.Context, err error) error
    EmitErrorValue(ctx context.Context, err *isolates.Value) error
    EventNames() []string
    GetMaxListeners() int
    SetMaxListeners(maxListeners int)
    ListenerCount(ctx context.Context, eventName string, listener *isolates.Value) (int, error)
    Listeners(eventName string) []*isolates.Value
    RemoveListener(ctx context.Context, eventName string, listener *isolates.Value) error
    RemoveAllListeners(in isolates.FunctionArgs) error
    PrependListener(ctx context.Context, eventName string, listener *isolates.Value) error
    PrependListenerOnce(ctx context.Context, eventName string, listener *isolates.Value) error
}

type EventEmitterBase

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

func NewEventEmitter

func NewEventEmitter(in isolates.FunctionArgs) *EventEmitterBase

func (*EventEmitterBase) AddListener

func (e *EventEmitterBase) AddListener(ctx context.Context, eventName string, listener *isolates.Value) error

func (*EventEmitterBase) AddListenerOnce

func (e *EventEmitterBase) AddListenerOnce(ctx context.Context, eventName string, listener *isolates.Value) error

func (*EventEmitterBase) Emit

func (e *EventEmitterBase) Emit(ctx context.Context, eventName string, args ...any) error

func (*EventEmitterBase) EmitError

func (e *EventEmitterBase) EmitError(ctx context.Context, err error) error

func (*EventEmitterBase) EmitErrorValue

func (e *EventEmitterBase) EmitErrorValue(ctx context.Context, err *isolates.Value) error

func (*EventEmitterBase) EventNames

func (e *EventEmitterBase) EventNames() []string

func (*EventEmitterBase) GetMaxListeners

func (e *EventEmitterBase) GetMaxListeners() int

func (*EventEmitterBase) ListenerCount

func (e *EventEmitterBase) ListenerCount(ctx context.Context, eventName string, listener *isolates.Value) (int, error)

func (*EventEmitterBase) Listeners

func (e *EventEmitterBase) Listeners(eventName string) []*isolates.Value

func (*EventEmitterBase) PrependListener

func (e *EventEmitterBase) PrependListener(ctx context.Context, eventName string, listener *isolates.Value) error

func (*EventEmitterBase) PrependListenerOnce

func (e *EventEmitterBase) PrependListenerOnce(ctx context.Context, eventName string, listener *isolates.Value) error

func (*EventEmitterBase) RemoveAllListeners

func (e *EventEmitterBase) RemoveAllListeners(in isolates.FunctionArgs) error

func (*EventEmitterBase) RemoveListener

func (e *EventEmitterBase) RemoveListener(ctx context.Context, eventName string, listener *isolates.Value) error

func (*EventEmitterBase) SetMaxListeners

func (e *EventEmitterBase) SetMaxListeners(maxListeners int)

func (*EventEmitterBase) V8Construct

func (e *EventEmitterBase) V8Construct(in isolates.FunctionArgs) (*EventEmitterBase, error)

func (*EventEmitterBase) V8FuncAddListener

func (e *EventEmitterBase) V8FuncAddListener(in isolates.FunctionArgs) (*isolates.Value, error)

func (*EventEmitterBase) V8FuncEmit

func (e *EventEmitterBase) V8FuncEmit(in isolates.FunctionArgs) (*isolates.Value, error)

func (*EventEmitterBase) V8FuncEventNames

func (e *EventEmitterBase) V8FuncEventNames(in isolates.FunctionArgs) (*isolates.Value, error)

func (*EventEmitterBase) V8FuncGetMaxListeners

func (e *EventEmitterBase) V8FuncGetMaxListeners(in isolates.FunctionArgs) (*isolates.Value, error)

func (*EventEmitterBase) V8FuncListenerCount

func (e *EventEmitterBase) V8FuncListenerCount(in isolates.FunctionArgs) (*isolates.Value, error)

func (*EventEmitterBase) V8FuncListeners

func (e *EventEmitterBase) V8FuncListeners(in isolates.FunctionArgs) (*isolates.Value, error)

func (*EventEmitterBase) V8FuncOff

func (e *EventEmitterBase) V8FuncOff(in isolates.FunctionArgs) (*isolates.Value, error)

func (*EventEmitterBase) V8FuncOn

func (e *EventEmitterBase) V8FuncOn(in isolates.FunctionArgs) (*isolates.Value, error)

func (*EventEmitterBase) V8FuncOnce

func (e *EventEmitterBase) V8FuncOnce(in isolates.FunctionArgs) (*isolates.Value, error)

func (*EventEmitterBase) V8FuncPrependListener

func (e *EventEmitterBase) V8FuncPrependListener(in isolates.FunctionArgs) (*isolates.Value, error)

func (*EventEmitterBase) V8FuncPrependListenerOnce

func (e *EventEmitterBase) V8FuncPrependListenerOnce(in isolates.FunctionArgs) (*isolates.Value, error)

func (*EventEmitterBase) V8FuncRawListeners

func (e *EventEmitterBase) V8FuncRawListeners(in isolates.FunctionArgs) (*isolates.Value, error)

func (*EventEmitterBase) V8FuncRemoveAllListeners

func (e *EventEmitterBase) V8FuncRemoveAllListeners(in isolates.FunctionArgs) (*isolates.Value, error)

func (*EventEmitterBase) V8FuncRemoveListener

func (e *EventEmitterBase) V8FuncRemoveListener(in isolates.FunctionArgs) (*isolates.Value, error)

func (*EventEmitterBase) V8FuncSetMaxListeners

func (e *EventEmitterBase) V8FuncSetMaxListeners(in isolates.FunctionArgs) (*isolates.Value, error)

type EventHandler

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

func (*EventHandler) Add

func (h *EventHandler) Add(callback func(...any) error) func()

func (*EventHandler) Emit

func (h *EventHandler) Emit(args ...any) error

fs

import "github.com/gosolid/solid/pkg/runtime/fs"

Index

Constants

const (
    ENOENT    = "ENOENT"
    ENOACCESS = "ENOACCESS"
)
const (
    F_OK = 1
    R_OK = 2
    W_OK = 4
    X_OK = 8
)

Variables

var ErrFileDescriptorNotFound = func(ctx context.Context) error { return NewFSError(ctx, "ENOFD", "file descriptor not found") }
var ErrInvalid = func(ctx context.Context) error { return NewFSError(ctx, "EINVAL", "received invalid argument") }
var ErrNoFileDescriptorTable = func(ctx context.Context) error {
    return NewFSError(ctx, "ENOCTX", "file descriptor table not found in context")
}

func IsNotExists

func IsNotExists(err error) bool

type DirEntry

type DirEntry interface {
    IsFile() bool
    IsDirectory() bool
    Name() string
}

type FS

type FS interface {
    ReadDir(ctx context.Context, path string) ([]string, error)
    ReadFile(ctx context.Context, path string) ([]byte, error)
    ReadStream(ctx context.Context, path string) (ReadStream, error)
    Open(ctx context.Context, path string) (FileDescriptor, error)
    Close(ctx context.Context, fd FileDescriptor) error
    Exists(ctx context.Context, path string) (bool, error)
    Stat(ctx context.Context, path string) (Stats, error)
    LStat(ctx context.Context, path string) (Stats, error)
    Access(ctx context.Context, path string, args ...any) error
    Mount(mountPoint string, mount FS, path string) error
    RealPath(ctx context.Context, path string) (string, error)
    File(ctx context.Context, fd FileDescriptor) (File, error)
}

type FSError

type FSError interface {
    isolates.Error
    Code() string
}

type FSErrorBase

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

func NewFSError

func NewFSError(ctx context.Context, code string, message string) *FSErrorBase

func NewFSError2

func NewFSError2(in isolates.FunctionArgs) (*FSErrorBase, error)

func (*FSErrorBase) Code

func (e *FSErrorBase) Code() string

func (*FSErrorBase) Error

func (e *FSErrorBase) Error() string

func (*FSErrorBase) Message

func (e *FSErrorBase) Message() string

func (*FSErrorBase) V8GetCode

func (e *FSErrorBase) V8GetCode(in isolates.GetterArgs) (*isolates.Value, error)

func (*FSErrorBase) V8GetMessage

func (e *FSErrorBase) V8GetMessage(in isolates.GetterArgs) (*isolates.Value, error)

type File

type File interface {
    Close(ctx context.Context) error
    ReadStream(ctx context.Context) (ReadStream, error)
    ReadAll(ctx context.Context) ([]byte, error)
}

type FileDescriptor

type FileDescriptor uintptr

func NewFileDescriptor

func NewFileDescriptor(ctx context.Context, file File) (FileDescriptor, error)

func (FileDescriptor) Close

func (f FileDescriptor) Close(ctx context.Context) error

func (FileDescriptor) File

func (f FileDescriptor) File(ctx context.Context) (File, error)

func (FileDescriptor) ReadAll

func (f FileDescriptor) ReadAll(ctx context.Context) ([]byte, error)

func (FileDescriptor) ReadStream

func (f FileDescriptor) ReadStream(ctx context.Context) (ReadStream, error)

type FileMode

type FileMode gofs.FileMode

type ReadStream

type ReadStream interface {
    stream.Readable
}

type ReadStreamBase

type ReadStreamBase struct {
    *stream.ReadableBase
}

func NewReadStream

func NewReadStream(in isolates.FunctionArgs) (*ReadStreamBase, error)

type Stats

type Stats interface {
    IsFile() bool
    IsDirectory() bool
    IsSymbolicLink() bool
    AccessedMilli() int64
    Accessed() time.Time
    ModifiedMilli() int64
    Modified() time.Time
    ChangedMilli() int64
    Changed() time.Time
    CreatedMilli() int64
    Created() time.Time
    Size() int64
    ContentType() string
    Uid() int
    Gid() int
    Mode() FileMode
}

http

import "github.com/gosolid/solid/pkg/runtime/http"

Index

type ClientRequest

type ClientRequest interface {
    OutgoingMessage

    MaxHeadersCount() int
    SetMaxHeadersCount(int)
    Path() string
    SetPath(string)
    Method() string
    SetMethod(string)
    Host() string
    SetHost(string)
    Protocol() string
    SetProtocol(string)
    ReusedSocket() bool
    SetNoDelay(bool)
    SetSocketKeepAlive(bool, time.Duration)
}

type ClientResponse

type ClientResponse interface {
    IncomingMessage

    StatusCode() int
    StatusMessage() string
}

type Http

type Http interface {
    Net() net.Net
    Server() *isolates.Value
}

func NewDefaultHttp

func NewDefaultHttp(in isolates.RuntimeFunctionArgs) (Http, error)

type HttpBase

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

func NewHttp

func NewHttp(in isolates.FunctionArgs) (*HttpBase, error)

func (*HttpBase) Net

func (h *HttpBase) Net() net.Net

func (*HttpBase) Server

func (h *HttpBase) Server() *isolates.Value

type HttpInformation

type HttpInformation interface {
    HttpVersion() string
    HttpVersionMajor() int
    HttpVersionMinor() int
    StatusCode() int
    StatusMessage() string
    Headers() http.Header
    RawHeaders() []string
}

type HttpServerOptions

type HttpServerOptions struct {
    ConnectionsCheckingInterval time.Duration `json:"connectionsCheckingInterval"`
    HeadersTimeout              time.Duration `json:"headersTimeout"`
    HighWaterMark               int           `json:"highWaterMark"`
    JoinDuplicateHeaders        bool          `json:"joinDuplicateHeaders"`
    KeepAlive                   bool          `json:"keepAlive"`
    KeepAliveInitialDelay       time.Duration `json:"keepAliveInitialDelay"`
    KeepAliveTimeout            time.Duration `json:"keepAliveTimeout"`
    MaxHeaderSize               int           `json:"maxHeaderSize"`
    NoDelay                     bool          `json:"noDelay"`
    RequestTimeout              time.Duration `json:"requestTimeout"`
    RequireHostHeader           bool          `json:"requireHostHeader"`
    UniqueHeaders               []string      `json:"uniqueHeaders"`
}

type IncomingMessage

type IncomingMessage interface {
    stream.Readable

    Complete() bool
    Headers() map[string]any
    HeadersDistinct() http.Header
    HttpVersion() string

    RawHeaders() []string
    RawTrailers() []string
    SetTimeout(context.Context, time.Duration, *isolates.Value) error
    Trailers() http.Header
    TrailersDistinct() http.Header
}

type IncomingMessageBase

type IncomingMessageBase struct {
    *stream.ReadableBase
    // contains filtered or unexported fields
}

func NewIncomingMessage

func NewIncomingMessage(in isolates.FunctionArgs) (*IncomingMessageBase, error)

func (*IncomingMessageBase) Complete

func (r *IncomingMessageBase) Complete() bool

func (*IncomingMessageBase) Headers

func (r *IncomingMessageBase) Headers() map[string]any

func (*IncomingMessageBase) HeadersDistinct

func (r *IncomingMessageBase) HeadersDistinct() http.Header

func (*IncomingMessageBase) HttpVersion

func (r *IncomingMessageBase) HttpVersion() string

func (*IncomingMessageBase) RawHeaders

func (r *IncomingMessageBase) RawHeaders() []string

func (*IncomingMessageBase) RawTrailers

func (r *IncomingMessageBase) RawTrailers() []string

func (*IncomingMessageBase) SetTimeout

func (r *IncomingMessageBase) SetTimeout(ctx context.Context, timeout time.Duration, listener *isolates.Value) error

func (*IncomingMessageBase) Trailers

func (r *IncomingMessageBase) Trailers() http.Header

func (*IncomingMessageBase) TrailersDistinct

func (r *IncomingMessageBase) TrailersDistinct() http.Header

func (*IncomingMessageBase) V8FuncSetTimeout

func (r *IncomingMessageBase) V8FuncSetTimeout(in isolates.FunctionArgs) (*isolates.Value, error)

func (*IncomingMessageBase) V8GetComplete

func (r *IncomingMessageBase) V8GetComplete(in isolates.GetterArgs) (*isolates.Value, error)

func (*IncomingMessageBase) V8GetHeaders

func (r *IncomingMessageBase) V8GetHeaders(in isolates.GetterArgs) (*isolates.Value, error)

func (*IncomingMessageBase) V8GetHeadersDistinct

func (r *IncomingMessageBase) V8GetHeadersDistinct(in isolates.GetterArgs) (*isolates.Value, error)

func (*IncomingMessageBase) V8GetHttpVersion

func (r *IncomingMessageBase) V8GetHttpVersion(in isolates.GetterArgs) (*isolates.Value, error)

func (*IncomingMessageBase) V8GetRawHeaders

func (r *IncomingMessageBase) V8GetRawHeaders(in isolates.GetterArgs) (*isolates.Value, error)

func (*IncomingMessageBase) V8GetRawTrailers

func (r *IncomingMessageBase) V8GetRawTrailers(in isolates.GetterArgs) (*isolates.Value, error)

func (*IncomingMessageBase) V8GetTrailers

func (r *IncomingMessageBase) V8GetTrailers(in isolates.GetterArgs) (*isolates.Value, error)

func (*IncomingMessageBase) V8GetTrailersDistinct

func (r *IncomingMessageBase) V8GetTrailersDistinct(in isolates.GetterArgs) (*isolates.Value, error)

type OutgoingMessage

type OutgoingMessage interface {
    stream.Writable

    AddTrailers(headers http.Header)
    AppendHeader(name string, values []string)
    Destroyed() bool
    Finished() bool
    FlushHeaders() error
    GetHeader(name string) []string
    GetHeaderNames() []string
    GetRawHeaderNames() []string
    Headers() map[string]any
    HasHeader(name string) bool
    HeadersSent() bool
    RemoveHeader(name string)
    SetHeader(ctx context.Context, name string, value *isolates.Value) error
    SetHeaders(headers http.Header)
    SetTimeout(time.Duration, func() error) func()
}

type OutgoingMessageBase

type OutgoingMessageBase struct {
    *stream.WritableBase
    // contains filtered or unexported fields
}

func NewOutgoingMessage

func NewOutgoingMessage(in isolates.FunctionArgs) (*OutgoingMessageBase, error)

func (*OutgoingMessageBase) AddTrailers

func (r *OutgoingMessageBase) AddTrailers(headers http.Header)

func (*OutgoingMessageBase) AppendHeader

func (r *OutgoingMessageBase) AppendHeader(name string, values []string)

func (*OutgoingMessageBase) Destroyed

func (r *OutgoingMessageBase) Destroyed() bool

func (*OutgoingMessageBase) Finished

func (r *OutgoingMessageBase) Finished() bool

func (*OutgoingMessageBase) FlushHeaders

func (r *OutgoingMessageBase) FlushHeaders() error

func (*OutgoingMessageBase) GetHeader

func (r *OutgoingMessageBase) GetHeader(name string) []string

func (*OutgoingMessageBase) GetHeaderNames

func (r *OutgoingMessageBase) GetHeaderNames() []string

func (*OutgoingMessageBase) GetRawHeaderNames

func (r *OutgoingMessageBase) GetRawHeaderNames() []string

func (*OutgoingMessageBase) HasHeader

func (r *OutgoingMessageBase) HasHeader(name string) bool

func (*OutgoingMessageBase) Headers

func (r *OutgoingMessageBase) Headers() map[string]any

func (*OutgoingMessageBase) HeadersSent

func (r *OutgoingMessageBase) HeadersSent() bool

func (*OutgoingMessageBase) RemoveHeader

func (r *OutgoingMessageBase) RemoveHeader(name string)

func (*OutgoingMessageBase) SendDate

func (r *OutgoingMessageBase) SendDate() bool

func (*OutgoingMessageBase) SetHeader

func (r *OutgoingMessageBase) SetHeader(ctx context.Context, name string, value *isolates.Value) error

func (*OutgoingMessageBase) SetHeaders

func (r *OutgoingMessageBase) SetHeaders(headers http.Header)

func (*OutgoingMessageBase) SetSendDate

func (r *OutgoingMessageBase) SetSendDate(bool)

func (*OutgoingMessageBase) SetStrictContentLength

func (r *OutgoingMessageBase) SetStrictContentLength(bool)

func (*OutgoingMessageBase) SetTimeout

func (r *OutgoingMessageBase) SetTimeout(timeout time.Duration, listener func() error) func()

func (*OutgoingMessageBase) StrictContentLength

func (r *OutgoingMessageBase) StrictContentLength() bool

func (*OutgoingMessageBase) V8FuncAddTrailers

func (r *OutgoingMessageBase) V8FuncAddTrailers(in isolates.FunctionArgs) (*isolates.Value, error)

func (*OutgoingMessageBase) V8FuncAppendHeader

func (r *OutgoingMessageBase) V8FuncAppendHeader(in isolates.FunctionArgs) (*isolates.Value, error)

func (*OutgoingMessageBase) V8FuncGetHeader

func (r *OutgoingMessageBase) V8FuncGetHeader(in isolates.FunctionArgs) (*isolates.Value, error)

func (*OutgoingMessageBase) V8FuncGetHeaderNames

func (r *OutgoingMessageBase) V8FuncGetHeaderNames(in isolates.FunctionArgs) (*isolates.Value, error)

func (*OutgoingMessageBase) V8FuncGetRawHeaderNames

func (r *OutgoingMessageBase) V8FuncGetRawHeaderNames(in isolates.FunctionArgs) (*isolates.Value, error)

func (*OutgoingMessageBase) V8FuncHasHeader

func (r *OutgoingMessageBase) V8FuncHasHeader(in isolates.FunctionArgs) (*isolates.Value, error)

func (*OutgoingMessageBase) V8FuncRemoveHeader

func (r *OutgoingMessageBase) V8FuncRemoveHeader(in isolates.FunctionArgs) (*isolates.Value, error)

func (*OutgoingMessageBase) V8FuncSetHeader

func (r *OutgoingMessageBase) V8FuncSetHeader(in isolates.FunctionArgs) (*isolates.Value, error)

func (*OutgoingMessageBase) V8FuncSetHeaders

func (r *OutgoingMessageBase) V8FuncSetHeaders(in isolates.FunctionArgs) (*isolates.Value, error)

func (*OutgoingMessageBase) V8FuncSetTimeout

func (r *OutgoingMessageBase) V8FuncSetTimeout(in isolates.FunctionArgs) (*isolates.Value, error)

func (*OutgoingMessageBase) V8FuncWait

func (r *OutgoingMessageBase) V8FuncWait(in isolates.FunctionArgs) (*isolates.Value, error)

func (*OutgoingMessageBase) V8FuncWriteContinue

func (r *OutgoingMessageBase) V8FuncWriteContinue(in isolates.FunctionArgs) (*isolates.Value, error)

func (*OutgoingMessageBase) V8FuncWriteEarlyHints

func (r *OutgoingMessageBase) V8FuncWriteEarlyHints(in isolates.FunctionArgs) (*isolates.Value, error)

func (*OutgoingMessageBase) V8FuncWriteProcessing

func (r *OutgoingMessageBase) V8FuncWriteProcessing(in isolates.FunctionArgs) (*isolates.Value, error)

func (*OutgoingMessageBase) V8GetDestroyed

func (r *OutgoingMessageBase) V8GetDestroyed(in isolates.GetterArgs) (*isolates.Value, error)

func (*OutgoingMessageBase) V8GetFinished

func (r *OutgoingMessageBase) V8GetFinished(in isolates.GetterArgs) (*isolates.Value, error)

func (*OutgoingMessageBase) V8GetHeaders

func (r *OutgoingMessageBase) V8GetHeaders(in isolates.GetterArgs) (*isolates.Value, error)

func (*OutgoingMessageBase) V8GetHeadersSent

func (r *OutgoingMessageBase) V8GetHeadersSent(in isolates.GetterArgs) (*isolates.Value, error)

func (*OutgoingMessageBase) V8GetSendDate

func (r *OutgoingMessageBase) V8GetSendDate(in isolates.GetterArgs) (*isolates.Value, error)

func (*OutgoingMessageBase) V8GetStrictContentLength

func (r *OutgoingMessageBase) V8GetStrictContentLength(in isolates.GetterArgs) (*isolates.Value, error)

func (*OutgoingMessageBase) V8GetWritableEnded

func (r *OutgoingMessageBase) V8GetWritableEnded(in isolates.GetterArgs) (*isolates.Value, error)

func (*OutgoingMessageBase) V8GetWritableFinished

func (r *OutgoingMessageBase) V8GetWritableFinished(in isolates.GetterArgs) (*isolates.Value, error)

func (*OutgoingMessageBase) Wait

func (r *OutgoingMessageBase) Wait() error

func (*OutgoingMessageBase) WritableEnded

func (r *OutgoingMessageBase) WritableEnded() bool

func (*OutgoingMessageBase) WritableFinished

func (r *OutgoingMessageBase) WritableFinished() bool

func (*OutgoingMessageBase) WriteContinue

func (r *OutgoingMessageBase) WriteContinue() error

func (*OutgoingMessageBase) WriteEarlyHints

func (r *OutgoingMessageBase) WriteEarlyHints(header http.Header) error

func (*OutgoingMessageBase) WriteHead

func (r *OutgoingMessageBase) WriteHead(statusCode int, statusMessage string, headers http.Header) error

func (*OutgoingMessageBase) WriteProcessing

func (r *OutgoingMessageBase) WriteProcessing() error

type Server

type Server interface {
    net.Server

    CloseAllConnections() error
    CloseIdleConnections() error
    HeadersTimeout() time.Duration
    SetHeadersTimeout(time.Duration)
    MaxHeadersCount() int
    SetMaxHeadersCount(int)
    RequestTimeout() time.Duration
    SetRequestTimeout(time.Duration)
    Timeout() time.Duration
    SetTimeout(ctx context.Context, timeout time.Duration, listener *isolates.Value) error
    MaxRequestsPerSocket() int
    SetMaxRequestsPerSocket(int)
    KeepAliveTimeout() time.Duration
    SetKeepAliveTimeout(time.Duration)
}

type ServerBase

type ServerBase struct {
    *net.ServerBase

    This *isolates.Value
    // contains filtered or unexported fields
}

func (*ServerBase) CloseAllConnections

func (l *ServerBase) CloseAllConnections() error

func (*ServerBase) CloseIdleConnections

func (l *ServerBase) CloseIdleConnections() error

func (*ServerBase) HeadersTimeout

func (l *ServerBase) HeadersTimeout() time.Duration

func (*ServerBase) KeepAliveTimeout

func (l *ServerBase) KeepAliveTimeout() time.Duration

func (*ServerBase) MaxHeadersCount

func (l *ServerBase) MaxHeadersCount() int

func (*ServerBase) MaxRequestsPerSocket

func (l *ServerBase) MaxRequestsPerSocket() int

func (*ServerBase) RequestTimeout

func (l *ServerBase) RequestTimeout() time.Duration

func (*ServerBase) SetHeadersTimeout

func (l *ServerBase) SetHeadersTimeout(headersTimeout time.Duration)

func (*ServerBase) SetKeepAliveTimeout

func (l *ServerBase) SetKeepAliveTimeout(keepAliveTimeout time.Duration)

func (*ServerBase) SetMaxHeadersCount

func (l *ServerBase) SetMaxHeadersCount(maxHeadersCount int)

func (*ServerBase) SetMaxRequestsPerSocket

func (l *ServerBase) SetMaxRequestsPerSocket(maxRequestsPerSocket int)

func (*ServerBase) SetRequestTimeout

func (l *ServerBase) SetRequestTimeout(requestTimeout time.Duration)

func (*ServerBase) SetTimeout

func (l *ServerBase) SetTimeout(ctx context.Context, timeout time.Duration, listener *isolates.Value) error

func (*ServerBase) Timeout

func (l *ServerBase) Timeout() time.Duration

func (*ServerBase) V8FuncCloseAllConnections

func (l *ServerBase) V8FuncCloseAllConnections(in isolates.FunctionArgs) (*isolates.Value, error)

func (*ServerBase) V8FuncCloseIdleConnections

func (l *ServerBase) V8FuncCloseIdleConnections(in isolates.FunctionArgs) (*isolates.Value, error)

func (*ServerBase) V8FuncSetTimeout

func (l *ServerBase) V8FuncSetTimeout(in isolates.FunctionArgs) (*isolates.Value, error)

func (*ServerBase) V8GetHeadersTimeout

func (l *ServerBase) V8GetHeadersTimeout(in isolates.GetterArgs) (*isolates.Value, error)

func (*ServerBase) V8GetKeepAliveTimeout

func (l *ServerBase) V8GetKeepAliveTimeout(in isolates.GetterArgs) (*isolates.Value, error)

func (*ServerBase) V8GetMaxHeadersCount

func (l *ServerBase) V8GetMaxHeadersCount(in isolates.GetterArgs) (*isolates.Value, error)

func (*ServerBase) V8GetMaxRequestsPerSocket

func (l *ServerBase) V8GetMaxRequestsPerSocket(in isolates.GetterArgs) (*isolates.Value, error)

func (*ServerBase) V8GetRequestTimeout

func (l *ServerBase) V8GetRequestTimeout(in isolates.GetterArgs) (*isolates.Value, error)

func (*ServerBase) V8GetTimeout

func (l *ServerBase) V8GetTimeout(in isolates.GetterArgs) (*isolates.Value, error)

type ServerRequest

type ServerRequest interface {
    IncomingMessage

    Response(context.Context) (ServerResponse, error)
    Socket() net.Socket

    IsUpgrade() bool

    Method() string
    URL() string
}

type ServerRequestBase

type ServerRequestBase struct {
    *IncomingMessageBase
    // contains filtered or unexported fields
}

func NewServerRequest

func NewServerRequest(in isolates.FunctionArgs) (*ServerRequestBase, error)

func (*ServerRequestBase) IsUpgrade

func (r *ServerRequestBase) IsUpgrade() bool

func (*ServerRequestBase) Method

func (r *ServerRequestBase) Method() string

func (*ServerRequestBase) Response

func (r *ServerRequestBase) Response(ctx context.Context) (ServerResponse, error)

func (*ServerRequestBase) Socket

func (r *ServerRequestBase) Socket() net.Socket

func (*ServerRequestBase) URL

func (r *ServerRequestBase) URL() string

func (*ServerRequestBase) V8GetMethod

func (r *ServerRequestBase) V8GetMethod(in isolates.GetterArgs) (*isolates.Value, error)

func (*ServerRequestBase) V8GetSocket

func (r *ServerRequestBase) V8GetSocket(in isolates.GetterArgs) (*isolates.Value, error)

func (*ServerRequestBase) V8GetUrl

func (r *ServerRequestBase) V8GetUrl(in isolates.GetterArgs) (*isolates.Value, error)

type ServerResponse

type ServerResponse interface {
    OutgoingMessage

    Request(context.Context) (ServerRequest, error)
    Socket() net.Socket
    SendDate() bool
    SetSendDate(bool)
    StatusCode() int
    SetStatusCode(int)
    StatusMessage() string
    SetStatusMessage(string)
    StrictContentLength() bool
    SetStrictContentLength(bool)
    WriteContinue() error
    WriteEarlyHints(http.Header) error
    WriteHead(statusCode int, statusMessage string, headers http.Header) error
    WriteProcessing() error

    Wait() error
}

type ServerResponseBase

type ServerResponseBase struct {
    *OutgoingMessageBase
    // contains filtered or unexported fields
}

func NewServerResponse

func NewServerResponse(in isolates.FunctionArgs) (*ServerResponseBase, error)

func (*ServerResponseBase) FlushHeaders

func (r *ServerResponseBase) FlushHeaders() error

func (*ServerResponseBase) Request

func (r *ServerResponseBase) Request(context.Context) (ServerRequest, error)

func (*ServerResponseBase) SetStatusCode

func (r *ServerResponseBase) SetStatusCode(statusCode int)

func (*ServerResponseBase) SetStatusMessage

func (r *ServerResponseBase) SetStatusMessage(statusMessage string)

func (*ServerResponseBase) Socket

func (r *ServerResponseBase) Socket() net.Socket

func (*ServerResponseBase) StatusCode

func (r *ServerResponseBase) StatusCode() int

func (*ServerResponseBase) StatusMessage

func (r *ServerResponseBase) StatusMessage() string

func (*ServerResponseBase) V8FuncFlushHeaders

func (r *ServerResponseBase) V8FuncFlushHeaders(in isolates.FunctionArgs) (*isolates.Value, error)

func (*ServerResponseBase) V8FuncWriteHead

func (r *ServerResponseBase) V8FuncWriteHead(in isolates.FunctionArgs) (*isolates.Value, error)

func (*ServerResponseBase) V8GetSocket

func (r *ServerResponseBase) V8GetSocket(in isolates.GetterArgs) (*isolates.Value, error)

func (*ServerResponseBase) V8GetStatusCode

func (r *ServerResponseBase) V8GetStatusCode(in isolates.GetterArgs) (*isolates.Value, error)

func (*ServerResponseBase) V8GetStatusMessage

func (r *ServerResponseBase) V8GetStatusMessage(in isolates.GetterArgs) (*isolates.Value, error)

func (*ServerResponseBase) WriteHead

func (r *ServerResponseBase) WriteHead(statusCode int, statusMessage string, headers http.Header) error

net

import "github.com/gosolid/solid/pkg/runtime/net"

Index

Variables

var ErrInvalidNet = errors.New("receiver does not implement net.Net")

type Address

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

func NewAddress

func NewAddress(in isolates.FunctionArgs) (*Address, error)

func (*Address) Address

func (a *Address) Address() string

func (*Address) Family

func (a *Address) Family() string

func (*Address) Port

func (a *Address) Port() int

func (*Address) V8GetAddress

func (a *Address) V8GetAddress(in isolates.GetterArgs) (*isolates.Value, error)

func (*Address) V8GetFamily

func (a *Address) V8GetFamily(in isolates.GetterArgs) (*isolates.Value, error)

func (*Address) V8GetPort

func (a *Address) V8GetPort(in isolates.GetterArgs) (*isolates.Value, error)

type HostNetOptions

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

func NewHostNetOptions

func NewHostNetOptions(in isolates.FunctionArgs) (*HostNetOptions, error)

func (*HostNetOptions) Listen

func (n *HostNetOptions) Listen(in isolates.FunctionArgs, server Server, network string, address string) (Listener, error)

func (*HostNetOptions) V8FuncListen

func (n *HostNetOptions) V8FuncListen(in isolates.FunctionArgs) (*isolates.Value, error)

type HostSocketOptions

type HostSocketOptions struct {
    *stream.ReadWriteCloser
    // contains filtered or unexported fields
}

func NewHostSocketOptions

func NewHostSocketOptions(in isolates.FunctionArgs) (*HostSocketOptions, error)

func (*HostSocketOptions) Final

func (c *HostSocketOptions) Final(in isolates.FunctionArgs, this stream.Writable, callback *isolates.Value) error

func (*HostSocketOptions) LocalAddress

func (c *HostSocketOptions) LocalAddress(ctx context.Context, this *SocketBase) (*Address, error)

func (*HostSocketOptions) RemoteAddress

func (c *HostSocketOptions) RemoteAddress(ctx context.Context, this *SocketBase) (*Address, error)

func (*HostSocketOptions) V8FuncFinal

func (c *HostSocketOptions) V8FuncFinal(in isolates.FunctionArgs) (*isolates.Value, error)

func (*HostSocketOptions) V8FuncLocalAddress

func (c *HostSocketOptions) V8FuncLocalAddress(in isolates.FunctionArgs) (*isolates.Value, error)

func (*HostSocketOptions) V8FuncRemoteAddress

func (c *HostSocketOptions) V8FuncRemoteAddress(in isolates.FunctionArgs) (*isolates.Value, error)

type Listener

type Listener interface {
    Close(ctx context.Context) error
    Address(ctx context.Context) (*Address, error)
}

type Net

type Net interface {
    Server() *isolates.Value
    Socket() *isolates.Value
    Listen(ctx context.Context, server Server, network string, address string) (*isolates.Value, error)
}

type NetBase

type NetBase struct {
    This *isolates.Value
    // contains filtered or unexported fields
}

func NewHostNet

func NewHostNet(ctx context.Context) (*NetBase, error)

func NewNet

func NewNet(in isolates.FunctionArgs) (*NetBase, error)

func (*NetBase) Listen

func (n *NetBase) Listen(ctx context.Context, server Server, network, address string) (*isolates.Value, error)

func (*NetBase) Server

func (n *NetBase) Server() *isolates.Value

func (*NetBase) Socket

func (n *NetBase) Socket() *isolates.Value

type Server

type Server interface {
    events.EventEmitter
    Listener
    Net() Net
}

type ServerBase

type ServerBase struct {
    *events.EventEmitterBase
    // contains filtered or unexported fields
}

func (*ServerBase) Address

func (s *ServerBase) Address(ctx context.Context) (*Address, error)

func (*ServerBase) Close

func (s *ServerBase) Close(ctx context.Context) error

func (*ServerBase) Listen

func (s *ServerBase) Listen(in isolates.FunctionArgs) (*isolates.Value, error)

func (*ServerBase) Listener

func (s *ServerBase) Listener() *isolates.Value

func (*ServerBase) Net

func (s *ServerBase) Net() Net

func (*ServerBase) V8FuncAddress

func (s *ServerBase) V8FuncAddress(in isolates.FunctionArgs) (*isolates.Value, error)

func (*ServerBase) V8FuncClose

func (s *ServerBase) V8FuncClose(in isolates.FunctionArgs) (*isolates.Value, error)

func (*ServerBase) V8FuncListen

func (s *ServerBase) V8FuncListen(in isolates.FunctionArgs) (*isolates.Value, error)

func (*ServerBase) V8Get\_listener

func (s *ServerBase) V8Get_listener(in isolates.GetterArgs) (*isolates.Value, error)

type Socket

type Socket interface {
    stream.Duplex
}

type SocketBase

type SocketBase struct {
    *stream.DuplexBase
}

func (*SocketBase) Address

func (s *SocketBase) Address(ctx context.Context) (*Address, error)

func (*SocketBase) LocalAddress

func (s *SocketBase) LocalAddress(ctx context.Context) (*string, error)

func (*SocketBase) LocalFamily

func (s *SocketBase) LocalFamily(ctx context.Context) (*string, error)

func (*SocketBase) LocalPort

func (s *SocketBase) LocalPort(ctx context.Context) (*int, error)

func (*SocketBase) RemoteAddress

func (s *SocketBase) RemoteAddress(ctx context.Context) (*string, error)

func (*SocketBase) RemoteFamily

func (s *SocketBase) RemoteFamily(ctx context.Context) (*string, error)

func (*SocketBase) RemotePort

func (s *SocketBase) RemotePort(ctx context.Context) (*int, error)

func (*SocketBase) SetNoDelay

func (s *SocketBase) SetNoDelay(ctx context.Context) error

func (*SocketBase) SetTimeout

func (s *SocketBase) SetTimeout(ctx context.Context) error

func (*SocketBase) V8FuncAddress

func (s *SocketBase) V8FuncAddress(in isolates.FunctionArgs) (*isolates.Value, error)

func (*SocketBase) V8FuncSetNoDelay

func (s *SocketBase) V8FuncSetNoDelay(in isolates.FunctionArgs) (*isolates.Value, error)

func (*SocketBase) V8FuncSetTimeout

func (s *SocketBase) V8FuncSetTimeout(in isolates.FunctionArgs) (*isolates.Value, error)

func (*SocketBase) V8GetLocalAddress

func (s *SocketBase) V8GetLocalAddress(in isolates.GetterArgs) (*isolates.Value, error)

func (*SocketBase) V8GetLocalFamily

func (s *SocketBase) V8GetLocalFamily(in isolates.GetterArgs) (*isolates.Value, error)

func (*SocketBase) V8GetLocalPort

func (s *SocketBase) V8GetLocalPort(in isolates.GetterArgs) (*isolates.Value, error)

func (*SocketBase) V8GetRemoteAddress

func (s *SocketBase) V8GetRemoteAddress(in isolates.GetterArgs) (*isolates.Value, error)

func (*SocketBase) V8GetRemoteFamily

func (s *SocketBase) V8GetRemoteFamily(in isolates.GetterArgs) (*isolates.Value, error)

func (*SocketBase) V8GetRemotePort

func (s *SocketBase) V8GetRemotePort(in isolates.GetterArgs) (*isolates.Value, error)

repl

import "github.com/gosolid/solid/pkg/runtime/repl"

Index

type Import

type Import struct{}

stream

import "github.com/gosolid/solid/pkg/runtime/stream"

Index

func Pipeline

func Pipeline(ctx context.Context, args ...*isolates.Value) *isolates.Value

type BufferEncoding

type BufferEncoding string
var (
    BufferEncodingUTF8   BufferEncoding = "utf8"
    BufferEncodingHex    BufferEncoding = "hex"
    BufferEncodingBase64 BufferEncoding = "base64"
)

type Closer

type Closer struct {
    io.Closer
}

func NewCloser

func NewCloser(in isolates.FunctionArgs) (*Closer, error)

func (*Closer) Destroy

func (c *Closer) Destroy(in isolates.FunctionArgs, this Stream, err *isolates.Value, callback *isolates.Value) error

func (*Closer) V8FuncDestroy

func (c *Closer) V8FuncDestroy(in isolates.FunctionArgs) (*isolates.Value, error)

type Duplex

type Duplex interface {
    Readable
    Writable
}

type DuplexBase

type DuplexBase struct {
    *StreamBase
    *WritableBase
    *ReadableBase
}

func NewDuplex

func NewDuplex(in isolates.FunctionArgs) (*DuplexBase, error)

type Pipe

type Pipe interface {
    Destination() *isolates.Value
    Remove(ctx context.Context) error
    OnData() *isolates.Value
    OnError() *isolates.Value
    OnEnd() *isolates.Value
}

type PipeBase

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

func (*PipeBase) Destination

func (p *PipeBase) Destination() *isolates.Value

func (*PipeBase) OnData

func (p *PipeBase) OnData() *isolates.Value

func (*PipeBase) OnEnd

func (p *PipeBase) OnEnd() *isolates.Value

func (*PipeBase) OnError

func (p *PipeBase) OnError() *isolates.Value

func (*PipeBase) Remove

func (p *PipeBase) Remove(ctx context.Context) error

func (*PipeBase) Source

func (p *PipeBase) Source() *isolates.Value

func (*PipeBase) V8FuncRemove

func (p *PipeBase) V8FuncRemove(in isolates.FunctionArgs) (*isolates.Value, error)

func (*PipeBase) V8GetDestination

func (p *PipeBase) V8GetDestination(in isolates.GetterArgs) (*isolates.Value, error)

func (*PipeBase) V8GetOnData

func (p *PipeBase) V8GetOnData(in isolates.GetterArgs) (*isolates.Value, error)

func (*PipeBase) V8GetOnEnd

func (p *PipeBase) V8GetOnEnd(in isolates.GetterArgs) (*isolates.Value, error)

func (*PipeBase) V8GetOnError

func (p *PipeBase) V8GetOnError(in isolates.GetterArgs) (*isolates.Value, error)

func (*PipeBase) V8GetSource

func (p *PipeBase) V8GetSource(in isolates.GetterArgs) (*isolates.Value, error)

type ReadCloser

type ReadCloser struct {
    *Closer
    *Reader
}

func NewReadCloser

func NewReadCloser(in isolates.FunctionArgs) (*ReadCloser, error)

type ReadWriteCloser

type ReadWriteCloser struct {
    *Closer
    *Reader
    *Writer
}

func NewReadWriteCloser

func NewReadWriteCloser(in isolates.FunctionArgs) (*ReadWriteCloser, error)

func (*ReadWriteCloser) Final

func (c *ReadWriteCloser) Final(in isolates.FunctionArgs, this Writable, callback *isolates.Value) error

func (*ReadWriteCloser) V8FuncFinal

func (c *ReadWriteCloser) V8FuncFinal(in isolates.FunctionArgs) (*isolates.Value, error)

type Readable

type Readable interface {
    Stream
    io.Reader

    IsPaused() bool
    Pause(context.Context)
    Pipe(context.Context, *isolates.Value, *isolates.Value) (*isolates.Value, error)
    ReadV8(ctx context.Context, size int) error
    Readable() bool
    ReadableAborted() bool
    ReadableDidRead() bool
    ReadableEncoding() *BufferEncoding
    ReadableEnded() bool
    ReadableFlowing() bool
    ReadableHighWaterMark() int
    ReadableLength() int
    ReadableObjectMode() bool
    Resume(context.Context)
    SetEncoding(BufferEncoding) (*isolates.Value, error)
    Unpipe(context.Context, *isolates.Value) (*isolates.Value, error)
    Unshift(context.Context, *isolates.Value, *BufferEncoding) error
    Wrap(context.Context, *isolates.Value) (*isolates.Value, error)
    Compose(context.Context, *isolates.Value, *isolates.Value) (*isolates.Value, error)
    Iterator(context.Context, *isolates.Value) (*isolates.Value, error)
    Map(context.Context, *isolates.Value, *isolates.Value) (*isolates.Value, error)
    Filter(context.Context, *isolates.Value, *isolates.Value) (*isolates.Value, error)
    ForEach(context.Context, *isolates.Value, *isolates.Value) error
    ToArray(context.Context, *isolates.Value) (*isolates.Value, error)
    Some(context.Context, *isolates.Value, *isolates.Value) (bool, error)
    Find(context.Context, *isolates.Value, *isolates.Value) (*isolates.Value, error)
    Every(context.Context, *isolates.Value, *isolates.Value) (bool, error)
    FlatMap(context.Context, *isolates.Value, *isolates.Value) (Readable, error)
    Drop(context.Context, int, *isolates.Value) (Readable, error)
    Take(context.Context, int, *isolates.Value) (Readable, error)
    AsIndexedPairs(context.Context, *isolates.Value) (Readable, error)
    Reduce(context.Context, *isolates.Value, *isolates.Value, *isolates.Value) (*isolates.Value, error)
    Push(ctx context.Context, chunk *isolates.Value, encoding *BufferEncoding) (bool, error)
}

type ReadableBase

type ReadableBase struct {
    *StreamBase
    // contains filtered or unexported fields
}

func NewReadable

func NewReadable(in isolates.FunctionArgs) (*ReadableBase, error)

func NewReadableWithStream

func NewReadableWithStream(in isolates.FunctionArgs, StreamBase *StreamBase) (*ReadableBase, error)

func (*ReadableBase) AsIndexedPairs

func (r *ReadableBase) AsIndexedPairs(context.Context, *isolates.Value) (Readable, error)

func (*ReadableBase) Compose

func (r *ReadableBase) Compose(context.Context, *isolates.Value, *isolates.Value) (*isolates.Value, error)

func (*ReadableBase) Drop

func (r *ReadableBase) Drop(context.Context, int, *isolates.Value) (Readable, error)

func (*ReadableBase) Every

func (r *ReadableBase) Every(context.Context, *isolates.Value, *isolates.Value) (bool, error)

func (*ReadableBase) Filter

func (r *ReadableBase) Filter(context.Context, *isolates.Value, *isolates.Value) (*isolates.Value, error)

func (*ReadableBase) Find

func (r *ReadableBase) Find(context.Context, *isolates.Value, *isolates.Value) (*isolates.Value, error)

func (*ReadableBase) FlatMap

func (r *ReadableBase) FlatMap(context.Context, *isolates.Value, *isolates.Value) (Readable, error)

func (*ReadableBase) ForEach

func (r *ReadableBase) ForEach(context.Context, *isolates.Value, *isolates.Value) error

func (*ReadableBase) IsPaused

func (r *ReadableBase) IsPaused() bool

func (*ReadableBase) Iterator

func (r *ReadableBase) Iterator(context.Context, *isolates.Value) (*isolates.Value, error)

func (*ReadableBase) Map

func (r *ReadableBase) Map(context.Context, *isolates.Value, *isolates.Value) (*isolates.Value, error)

func (*ReadableBase) Pause

func (r *ReadableBase) Pause(context.Context)

func (*ReadableBase) Pipe

func (r *ReadableBase) Pipe(ctx context.Context, destination *isolates.Value, options *isolates.Value) (*isolates.Value, error)

func (*ReadableBase) Push

func (r *ReadableBase) Push(ctx context.Context, chunk *isolates.Value, encoding *BufferEncoding) (bool, error)

func (*ReadableBase) Read

func (s *ReadableBase) Read(b []byte) (int, error)

func (*ReadableBase) ReadV8

func (r *ReadableBase) ReadV8(ctx context.Context, size int) error

func (*ReadableBase) Readable

func (r *ReadableBase) Readable() bool

func (*ReadableBase) ReadableAborted

func (r *ReadableBase) ReadableAborted() bool

func (*ReadableBase) ReadableDidRead

func (r *ReadableBase) ReadableDidRead() bool

func (*ReadableBase) ReadableEncoding

func (r *ReadableBase) ReadableEncoding() *BufferEncoding

func (*ReadableBase) ReadableEnded

func (r *ReadableBase) ReadableEnded() bool

func (*ReadableBase) ReadableFlowing

func (r *ReadableBase) ReadableFlowing() bool

func (*ReadableBase) ReadableHighWaterMark

func (r *ReadableBase) ReadableHighWaterMark() int

func (*ReadableBase) ReadableLength

func (r *ReadableBase) ReadableLength() int

func (*ReadableBase) ReadableObjectMode

func (r *ReadableBase) ReadableObjectMode() bool

func (*ReadableBase) Reduce

func (r *ReadableBase) Reduce(context.Context, *isolates.Value, *isolates.Value, *isolates.Value) (*isolates.Value, error)

func (*ReadableBase) Resume

func (r *ReadableBase) Resume(ctx context.Context)

func (*ReadableBase) SetEncoding

func (r *ReadableBase) SetEncoding(BufferEncoding) (*isolates.Value, error)

func (*ReadableBase) SetReadableState

func (s *ReadableBase) SetReadableState(state ReadableStreamState) bool

func (*ReadableBase) SetReadableStateConditional

func (s *ReadableBase) SetReadableStateConditional(fromState ReadableStreamState, toState ReadableStreamState) bool

func (*ReadableBase) Some

func (r *ReadableBase) Some(context.Context, *isolates.Value, *isolates.Value) (bool, error)

func (*ReadableBase) Take

func (r *ReadableBase) Take(context.Context, int, *isolates.Value) (Readable, error)

func (*ReadableBase) ToArray

func (r *ReadableBase) ToArray(context.Context, *isolates.Value) (*isolates.Value, error)

func (*ReadableBase) Unpipe

func (r *ReadableBase) Unpipe(ctx context.Context, destination *isolates.Value) (*isolates.Value, error)

func (*ReadableBase) Unshift

func (r *ReadableBase) Unshift(context.Context, *isolates.Value, *BufferEncoding) error

func (*ReadableBase) V8FuncAsIndexedPairs

func (r *ReadableBase) V8FuncAsIndexedPairs(in isolates.FunctionArgs) (*isolates.Value, error)

func (*ReadableBase) V8FuncCompose

func (r *ReadableBase) V8FuncCompose(in isolates.FunctionArgs) (*isolates.Value, error)

func (*ReadableBase) V8FuncDrop

func (r *ReadableBase) V8FuncDrop(in isolates.FunctionArgs) (*isolates.Value, error)

func (*ReadableBase) V8FuncEvery

func (r *ReadableBase) V8FuncEvery(in isolates.FunctionArgs) (*isolates.Value, error)

func (*ReadableBase) V8FuncFilter

func (r *ReadableBase) V8FuncFilter(in isolates.FunctionArgs) (*isolates.Value, error)

func (*ReadableBase) V8FuncFind

func (r *ReadableBase) V8FuncFind(in isolates.FunctionArgs) (*isolates.Value, error)

func (*ReadableBase) V8FuncFlatMap

func (r *ReadableBase) V8FuncFlatMap(in isolates.FunctionArgs) (*isolates.Value, error)

func (*ReadableBase) V8FuncForEach

func (r *ReadableBase) V8FuncForEach(in isolates.FunctionArgs) (*isolates.Value, error)

func (*ReadableBase) V8FuncIterator

func (r *ReadableBase) V8FuncIterator(in isolates.FunctionArgs) (*isolates.Value, error)

func (*ReadableBase) V8FuncMap

func (r *ReadableBase) V8FuncMap(in isolates.FunctionArgs) (*isolates.Value, error)

func (*ReadableBase) V8FuncPause

func (r *ReadableBase) V8FuncPause(in isolates.FunctionArgs) (*isolates.Value, error)

func (*ReadableBase) V8FuncPipe

func (r *ReadableBase) V8FuncPipe(in isolates.FunctionArgs) (*isolates.Value, error)

func (*ReadableBase) V8FuncPush

func (r *ReadableBase) V8FuncPush(in isolates.FunctionArgs) (*isolates.Value, error)

func (*ReadableBase) V8FuncReadV8

func (r *ReadableBase) V8FuncReadV8(in isolates.FunctionArgs) (*isolates.Value, error)

func (*ReadableBase) V8FuncReduce

func (r *ReadableBase) V8FuncReduce(in isolates.FunctionArgs) (*isolates.Value, error)

func (*ReadableBase) V8FuncResume

func (r *ReadableBase) V8FuncResume(in isolates.FunctionArgs) (*isolates.Value, error)

func (*ReadableBase) V8FuncSetEncoding

func (r *ReadableBase) V8FuncSetEncoding(in isolates.FunctionArgs) (*isolates.Value, error)

func (*ReadableBase) V8FuncSome

func (r *ReadableBase) V8FuncSome(in isolates.FunctionArgs) (*isolates.Value, error)

func (*ReadableBase) V8FuncTake

func (r *ReadableBase) V8FuncTake(in isolates.FunctionArgs) (*isolates.Value, error)

func (*ReadableBase) V8FuncToArray

func (r *ReadableBase) V8FuncToArray(in isolates.FunctionArgs) (*isolates.Value, error)

func (*ReadableBase) V8FuncUnpipe

func (r *ReadableBase) V8FuncUnpipe(in isolates.FunctionArgs) (*isolates.Value, error)

func (*ReadableBase) V8FuncUnshift

func (r *ReadableBase) V8FuncUnshift(in isolates.FunctionArgs) (*isolates.Value, error)

func (*ReadableBase) V8FuncWrap

func (r *ReadableBase) V8FuncWrap(in isolates.FunctionArgs) (*isolates.Value, error)

func (*ReadableBase) V8GetIsPaused

func (r *ReadableBase) V8GetIsPaused(in isolates.GetterArgs) (*isolates.Value, error)

func (*ReadableBase) V8GetReadable

func (r *ReadableBase) V8GetReadable(in isolates.GetterArgs) (*isolates.Value, error)

func (*ReadableBase) V8GetReadableAborted

func (r *ReadableBase) V8GetReadableAborted(in isolates.GetterArgs) (*isolates.Value, error)

func (*ReadableBase) V8GetReadableDidRead

func (r *ReadableBase) V8GetReadableDidRead(in isolates.GetterArgs) (*isolates.Value, error)

func (*ReadableBase) V8GetReadableEncoding

func (r *ReadableBase) V8GetReadableEncoding(in isolates.GetterArgs) (*isolates.Value, error)

func (*ReadableBase) V8GetReadableEnded

func (r *ReadableBase) V8GetReadableEnded(in isolates.GetterArgs) (*isolates.Value, error)

func (*ReadableBase) V8GetReadableFlowing

func (r *ReadableBase) V8GetReadableFlowing(in isolates.GetterArgs) (*isolates.Value, error)

func (*ReadableBase) V8GetReadableHighWaterMark

func (r *ReadableBase) V8GetReadableHighWaterMark(in isolates.GetterArgs) (*isolates.Value, error)

func (*ReadableBase) V8GetReadableLength

func (r *ReadableBase) V8GetReadableLength(in isolates.GetterArgs) (*isolates.Value, error)

func (*ReadableBase) V8GetReadableObjectMode

func (r *ReadableBase) V8GetReadableObjectMode(in isolates.GetterArgs) (*isolates.Value, error)

func (*ReadableBase) Wrap

func (r *ReadableBase) Wrap(context.Context, *isolates.Value) (*isolates.Value, error)

type ReadableStreamState

type ReadableStreamState int
const (
    ReadableStreamStatePaused ReadableStreamState = iota
    ReadableStreamStateResumed
)

type Reader

type Reader struct {
    io.Reader
    // contains filtered or unexported fields
}

func NewReader

func NewReader(in isolates.FunctionArgs) (*Reader, error)

func (*Reader) Construct

func (c *Reader) Construct(in isolates.FunctionArgs, this Stream, callback *isolates.Value) error

func (*Reader) Read

func (c *Reader) Read(in isolates.FunctionArgs, this Readable) error

func (*Reader) V8FuncConstruct

func (c *Reader) V8FuncConstruct(in isolates.FunctionArgs) (*isolates.Value, error)

func (*Reader) V8FuncRead

func (c *Reader) V8FuncRead(in isolates.FunctionArgs) (*isolates.Value, error)

type Stream

type Stream interface {
    events.EventEmitter
    io.Closer
    Destroy(context.Context, *isolates.Value) error
    Closed() bool
    Destroyed() bool
    Errored() *isolates.Value
}

type StreamBase

type StreamBase struct {
    *events.EventEmitterBase

    Context *isolates.Context
    This    *isolates.Value
    Options *isolates.Value
    // contains filtered or unexported fields
}

func NewStream

func NewStream(in isolates.FunctionArgs) (*StreamBase, error)

func (*StreamBase) Close

func (s *StreamBase) Close() error

func (*StreamBase) Closed

func (s *StreamBase) Closed() bool

func (*StreamBase) Destroy

func (s *StreamBase) Destroy(ctx context.Context, err *isolates.Value) error

func (*StreamBase) Destroyed

func (s *StreamBase) Destroyed() bool

func (*StreamBase) EmitError

func (s *StreamBase) EmitError(ctx context.Context, err error) error

func (*StreamBase) EmitErrorValue

func (s *StreamBase) EmitErrorValue(ctx context.Context, error *isolates.Value) error

func (*StreamBase) Errored

func (s *StreamBase) Errored() *isolates.Value

func (*StreamBase) OnStateChange

func (s *StreamBase) OnStateChange(callback func(s StreamState) error) func()

func (*StreamBase) SetState

func (s *StreamBase) SetState(state StreamState) bool

func (*StreamBase) SetStateConditional

func (s *StreamBase) SetStateConditional(fromState StreamState, toState StreamState) bool

func (*StreamBase) V8FuncDestroy

func (s *StreamBase) V8FuncDestroy(in isolates.FunctionArgs) (*isolates.Value, error)

func (*StreamBase) V8GetClosed

func (s *StreamBase) V8GetClosed(in isolates.GetterArgs) (*isolates.Value, error)

func (*StreamBase) V8GetDestroyed

func (s *StreamBase) V8GetDestroyed(in isolates.GetterArgs) (*isolates.Value, error)

func (*StreamBase) V8GetErrored

func (s *StreamBase) V8GetErrored(in isolates.GetterArgs) (*isolates.Value, error)

type StreamState

type StreamState int
const (
    StreamStateNew StreamState = iota
    StreamStateReady
    StreamStateErrored
    StreamStateDestroying
    StreamStateDestroyed
    StreamStateClosing
    StreamStateClosed
)

type Transform

type Transform interface {
    Duplex
}

type TransformBase

type TransformBase struct {
    *DuplexBase
}

func NewTransform

func NewTransform(in isolates.FunctionArgs) (*TransformBase, error)

type Writable

type Writable interface {
    Stream
    io.Writer

    Cork(context.Context) error
    End(context.Context, ...any) error
    SetDefaultEncoding(encoding BufferEncoding)
    Uncork(context.Context) error
    Writable() bool
    WritableAborted() bool
    WritableEnded() bool
    WritableCorked() int

    WritableFinished() bool
    WritableHighWaterMark() int
    WritableLength() int
    WritableNeedDrain() bool
    WritableObjectMode() bool
    WritableWrite(context.Context, ...any) error
}

type WritableBase

type WritableBase struct {
    *StreamBase
}

func NewWritable

func NewWritable(in isolates.FunctionArgs) (*WritableBase, error)

func NewWritableWithStream

func NewWritableWithStream(in isolates.FunctionArgs, StreamBase *StreamBase) (*WritableBase, error)

func (*WritableBase) Cork

func (w *WritableBase) Cork(context.Context) error

func (*WritableBase) End

func (w *WritableBase) End(ctx context.Context, args ...any) error

func (*WritableBase) SetDefaultEncoding

func (w *WritableBase) SetDefaultEncoding(encoding BufferEncoding)

func (*WritableBase) Uncork

func (w *WritableBase) Uncork(context.Context) error

func (*WritableBase) V8FuncCork

func (w *WritableBase) V8FuncCork(in isolates.FunctionArgs) (*isolates.Value, error)

func (*WritableBase) V8FuncEnd

func (w *WritableBase) V8FuncEnd(in isolates.FunctionArgs) (*isolates.Value, error)

func (*WritableBase) V8FuncSetDefaultEncoding

func (w *WritableBase) V8FuncSetDefaultEncoding(in isolates.FunctionArgs) (*isolates.Value, error)

func (*WritableBase) V8FuncUncork

func (w *WritableBase) V8FuncUncork(in isolates.FunctionArgs) (*isolates.Value, error)

func (*WritableBase) V8FuncWrite

func (w *WritableBase) V8FuncWrite(in isolates.FunctionArgs) (*isolates.Value, error)

func (*WritableBase) V8GetWritable

func (w *WritableBase) V8GetWritable(in isolates.GetterArgs) (*isolates.Value, error)

func (*WritableBase) V8GetWritableAborted

func (w *WritableBase) V8GetWritableAborted(in isolates.GetterArgs) (*isolates.Value, error)

func (*WritableBase) V8GetWritableCorked

func (w *WritableBase) V8GetWritableCorked(in isolates.GetterArgs) (*isolates.Value, error)

func (*WritableBase) V8GetWritableEnded

func (w *WritableBase) V8GetWritableEnded(in isolates.GetterArgs) (*isolates.Value, error)

func (*WritableBase) V8GetWritableFinished

func (w *WritableBase) V8GetWritableFinished(in isolates.GetterArgs) (*isolates.Value, error)

func (*WritableBase) V8GetWritableHighWaterMark

func (w *WritableBase) V8GetWritableHighWaterMark(in isolates.GetterArgs) (*isolates.Value, error)

func (*WritableBase) V8GetWritableLength

func (w *WritableBase) V8GetWritableLength(in isolates.GetterArgs) (*isolates.Value, error)

func (*WritableBase) V8GetWritableNeedDrain

func (w *WritableBase) V8GetWritableNeedDrain(in isolates.GetterArgs) (*isolates.Value, error)

func (*WritableBase) V8GetWritableObjectMode

func (w *WritableBase) V8GetWritableObjectMode(in isolates.GetterArgs) (*isolates.Value, error)

func (*WritableBase) Writable

func (w *WritableBase) Writable() bool

func (*WritableBase) WritableAborted

func (w *WritableBase) WritableAborted() bool

func (*WritableBase) WritableCorked

func (w *WritableBase) WritableCorked() int

func (*WritableBase) WritableEnded

func (w *WritableBase) WritableEnded() bool

func (*WritableBase) WritableFinished

func (w *WritableBase) WritableFinished() bool

func (*WritableBase) WritableHighWaterMark

func (w *WritableBase) WritableHighWaterMark() int

func (*WritableBase) WritableLength

func (w *WritableBase) WritableLength() int

func (*WritableBase) WritableNeedDrain

func (w *WritableBase) WritableNeedDrain() bool

func (*WritableBase) WritableObjectMode

func (w *WritableBase) WritableObjectMode() bool

func (*WritableBase) WritableWrite

func (w *WritableBase) WritableWrite(ctx context.Context, args ...any) error

func (*WritableBase) Write

func (c *WritableBase) Write(b []byte) (int, error)

type WriteCloser

type WriteCloser struct {
    *Closer
    *Writer
}

func NewWriteCloser

func NewWriteCloser(in isolates.FunctionArgs) (*WriteCloser, error)

func (*WriteCloser) Final

func (c *WriteCloser) Final(in isolates.FunctionArgs, this Writable, callback *isolates.Value) error

func (*WriteCloser) V8FuncFinal

func (c *WriteCloser) V8FuncFinal(in isolates.FunctionArgs) (*isolates.Value, error)

type Writer

type Writer struct {
    io.Writer
    // contains filtered or unexported fields
}

func NewWriter

func NewWriter(in isolates.FunctionArgs) (*Writer, error)

func (*Writer) V8FuncWrite

func (c *Writer) V8FuncWrite(in isolates.FunctionArgs) (*isolates.Value, error)

func (*Writer) Write

func (c *Writer) Write(in isolates.FunctionArgs, this Writable, chunk *isolates.Value, encoding string, callback *isolates.Value) error

tty

import "github.com/gosolid/solid/pkg/runtime/tty"

Index

Variables

var ANSI = NewAnsiEscapeSequence()

func IsTTY

func IsTTY(fd int) (bool, error)

type AnsiEscapeSequence

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

func NewAnsiEscapeSequence

func NewAnsiEscapeSequence() *AnsiEscapeSequence

func (*AnsiEscapeSequence) BackgroundBlack

func (e *AnsiEscapeSequence) BackgroundBlack() *AnsiEscapeSequence

func (*AnsiEscapeSequence) BackgroundBlue

func (e *AnsiEscapeSequence) BackgroundBlue() *AnsiEscapeSequence

func (*AnsiEscapeSequence) BackgroundBrightBlack

func (e *AnsiEscapeSequence) BackgroundBrightBlack() *AnsiEscapeSequence

func (*AnsiEscapeSequence) BackgroundBrightBlue

func (e *AnsiEscapeSequence) BackgroundBrightBlue() *AnsiEscapeSequence

func (*AnsiEscapeSequence) BackgroundBrightCyan

func (e *AnsiEscapeSequence) BackgroundBrightCyan() *AnsiEscapeSequence

func (*AnsiEscapeSequence) BackgroundBrightGreen

func (e *AnsiEscapeSequence) BackgroundBrightGreen() *AnsiEscapeSequence

func (*AnsiEscapeSequence) BackgroundBrightMagenta

func (e *AnsiEscapeSequence) BackgroundBrightMagenta() *AnsiEscapeSequence

func (*AnsiEscapeSequence) BackgroundBrightRed

func (e *AnsiEscapeSequence) BackgroundBrightRed() *AnsiEscapeSequence

func (*AnsiEscapeSequence) BackgroundBrightWhite

func (e *AnsiEscapeSequence) BackgroundBrightWhite() *AnsiEscapeSequence

func (*AnsiEscapeSequence) BackgroundBrightYellow

func (e *AnsiEscapeSequence) BackgroundBrightYellow() *AnsiEscapeSequence

func (*AnsiEscapeSequence) BackgroundColor

func (e *AnsiEscapeSequence) BackgroundColor(r int, g int, b int) *AnsiEscapeSequence

func (*AnsiEscapeSequence) BackgroundCyan

func (e *AnsiEscapeSequence) BackgroundCyan() *AnsiEscapeSequence

func (*AnsiEscapeSequence) BackgroundDefault

func (e *AnsiEscapeSequence) BackgroundDefault() *AnsiEscapeSequence

func (*AnsiEscapeSequence) BackgroundGreen

func (e *AnsiEscapeSequence) BackgroundGreen() *AnsiEscapeSequence

func (*AnsiEscapeSequence) BackgroundIndexedColor

func (e *AnsiEscapeSequence) BackgroundIndexedColor(index int) *AnsiEscapeSequence

func (*AnsiEscapeSequence) BackgroundMagenta

func (e *AnsiEscapeSequence) BackgroundMagenta() *AnsiEscapeSequence

func (*AnsiEscapeSequence) BackgroundRed

func (e *AnsiEscapeSequence) BackgroundRed() *AnsiEscapeSequence

func (*AnsiEscapeSequence) BackgroundWhite

func (e *AnsiEscapeSequence) BackgroundWhite() *AnsiEscapeSequence

func (*AnsiEscapeSequence) BackgroundYellow

func (e *AnsiEscapeSequence) BackgroundYellow() *AnsiEscapeSequence

func (*AnsiEscapeSequence) Black

func (e *AnsiEscapeSequence) Black() *AnsiEscapeSequence

func (*AnsiEscapeSequence) Blink

func (e *AnsiEscapeSequence) Blink() *AnsiEscapeSequence

func (*AnsiEscapeSequence) BlinkReset

func (e *AnsiEscapeSequence) BlinkReset() *AnsiEscapeSequence

func (*AnsiEscapeSequence) Blue

func (e *AnsiEscapeSequence) Blue() *AnsiEscapeSequence

func (*AnsiEscapeSequence) Bold

func (e *AnsiEscapeSequence) Bold() *AnsiEscapeSequence

func (*AnsiEscapeSequence) BoldReset

func (e *AnsiEscapeSequence) BoldReset() *AnsiEscapeSequence

func (*AnsiEscapeSequence) BrightBlack

func (e *AnsiEscapeSequence) BrightBlack() *AnsiEscapeSequence

func (*AnsiEscapeSequence) BrightBlue

func (e *AnsiEscapeSequence) BrightBlue() *AnsiEscapeSequence

func (*AnsiEscapeSequence) BrightCyan

func (e *AnsiEscapeSequence) BrightCyan() *AnsiEscapeSequence

func (*AnsiEscapeSequence) BrightGreen

func (e *AnsiEscapeSequence) BrightGreen() *AnsiEscapeSequence

func (*AnsiEscapeSequence) BrightMagenta

func (e *AnsiEscapeSequence) BrightMagenta() *AnsiEscapeSequence

func (*AnsiEscapeSequence) BrightRed

func (e *AnsiEscapeSequence) BrightRed() *AnsiEscapeSequence

func (*AnsiEscapeSequence) BrightWhite

func (e *AnsiEscapeSequence) BrightWhite() *AnsiEscapeSequence

func (*AnsiEscapeSequence) BrightYellow

func (e *AnsiEscapeSequence) BrightYellow() *AnsiEscapeSequence

func (*AnsiEscapeSequence) Color

func (e *AnsiEscapeSequence) Color(r int, g int, b int) *AnsiEscapeSequence

func (*AnsiEscapeSequence) Cyan

func (e *AnsiEscapeSequence) Cyan() *AnsiEscapeSequence

func (*AnsiEscapeSequence) Default

func (e *AnsiEscapeSequence) Default() *AnsiEscapeSequence

func (*AnsiEscapeSequence) Dim

func (e *AnsiEscapeSequence) Dim() *AnsiEscapeSequence

func (*AnsiEscapeSequence) DimReset

func (e *AnsiEscapeSequence) DimReset() *AnsiEscapeSequence

func (*AnsiEscapeSequence) Disable

func (e *AnsiEscapeSequence) Disable() *AnsiEscapeSequence

func (*AnsiEscapeSequence) Enable

func (e *AnsiEscapeSequence) Enable() *AnsiEscapeSequence

func (*AnsiEscapeSequence) Enabled

func (e *AnsiEscapeSequence) Enabled() bool

func (*AnsiEscapeSequence) EraseEntireScreen

func (e *AnsiEscapeSequence) EraseEntireScreen() string

func (*AnsiEscapeSequence) EraseFromCursorToEndOfLine

func (e *AnsiEscapeSequence) EraseFromCursorToEndOfLine() string

func (*AnsiEscapeSequence) EraseFromCursorToEndOfScreen

func (e *AnsiEscapeSequence) EraseFromCursorToEndOfScreen() string

func (*AnsiEscapeSequence) EraseFromCursorToStartOfLine

func (e *AnsiEscapeSequence) EraseFromCursorToStartOfLine() string

func (*AnsiEscapeSequence) EraseFromCursorToStartOfScreen

func (e *AnsiEscapeSequence) EraseFromCursorToStartOfScreen() string

func (*AnsiEscapeSequence) EraseInDisplay

func (e *AnsiEscapeSequence) EraseInDisplay() string

func (*AnsiEscapeSequence) EraseInLine

func (e *AnsiEscapeSequence) EraseInLine() string

func (*AnsiEscapeSequence) EraseLine

func (e *AnsiEscapeSequence) EraseLine() string

func (*AnsiEscapeSequence) EraseSavedLines

func (e *AnsiEscapeSequence) EraseSavedLines() string

func (*AnsiEscapeSequence) Format

func (e *AnsiEscapeSequence) Format(s string) string

func (*AnsiEscapeSequence) Green

func (e *AnsiEscapeSequence) Green() *AnsiEscapeSequence

func (*AnsiEscapeSequence) Hidden

func (e *AnsiEscapeSequence) Hidden() *AnsiEscapeSequence

func (*AnsiEscapeSequence) HiddenReset

func (e *AnsiEscapeSequence) HiddenReset() *AnsiEscapeSequence

func (*AnsiEscapeSequence) Home

func (e *AnsiEscapeSequence) Home() string

func (*AnsiEscapeSequence) IndexedColor

func (e *AnsiEscapeSequence) IndexedColor(index int) *AnsiEscapeSequence

func (*AnsiEscapeSequence) Italic

func (e *AnsiEscapeSequence) Italic() *AnsiEscapeSequence

func (*AnsiEscapeSequence) ItalicReset

func (e *AnsiEscapeSequence) ItalicReset() *AnsiEscapeSequence

func (*AnsiEscapeSequence) Magenta

func (e *AnsiEscapeSequence) Magenta() *AnsiEscapeSequence

func (*AnsiEscapeSequence) Move

func (e *AnsiEscapeSequence) Move(line int, column int) string

func (*AnsiEscapeSequence) MoveDown

func (e *AnsiEscapeSequence) MoveDown(lines int) string

func (*AnsiEscapeSequence) MoveLeft

func (e *AnsiEscapeSequence) MoveLeft(columns int) string

func (*AnsiEscapeSequence) MoveRight

func (e *AnsiEscapeSequence) MoveRight(columns int) string

func (*AnsiEscapeSequence) MoveToStart

func (e *AnsiEscapeSequence) MoveToStart() string

func (*AnsiEscapeSequence) MoveToStartDown

func (e *AnsiEscapeSequence) MoveToStartDown(lines int) string

func (*AnsiEscapeSequence) MoveToStartUp

func (e *AnsiEscapeSequence) MoveToStartUp(lines int) string

func (*AnsiEscapeSequence) MoveUp

func (e *AnsiEscapeSequence) MoveUp(lines int) string

func (*AnsiEscapeSequence) MoveUpOne

func (e *AnsiEscapeSequence) MoveUpOne() string

func (*AnsiEscapeSequence) Red

func (e *AnsiEscapeSequence) Red() *AnsiEscapeSequence

func (*AnsiEscapeSequence) RequestCursorPosition

func (e *AnsiEscapeSequence) RequestCursorPosition() string

func (*AnsiEscapeSequence) RequestCursorPositionSCO

func (e *AnsiEscapeSequence) RequestCursorPositionSCO() string

func (*AnsiEscapeSequence) Reset

func (e *AnsiEscapeSequence) Reset() *AnsiEscapeSequence

func (*AnsiEscapeSequence) RestoreCursorPosition

func (e *AnsiEscapeSequence) RestoreCursorPosition() string

func (*AnsiEscapeSequence) Reverse

func (e *AnsiEscapeSequence) Reverse() *AnsiEscapeSequence

func (*AnsiEscapeSequence) ReverseReset

func (e *AnsiEscapeSequence) ReverseReset() *AnsiEscapeSequence

func (*AnsiEscapeSequence) SaveCursorPosition

func (e *AnsiEscapeSequence) SaveCursorPosition() string

func (*AnsiEscapeSequence) SaveCursorPositionSCO

func (e *AnsiEscapeSequence) SaveCursorPositionSCO() string

func (*AnsiEscapeSequence) Strikethrough

func (e *AnsiEscapeSequence) Strikethrough() *AnsiEscapeSequence

func (*AnsiEscapeSequence) StrikethroughReset

func (e *AnsiEscapeSequence) StrikethroughReset() *AnsiEscapeSequence

func (*AnsiEscapeSequence) String

func (e *AnsiEscapeSequence) String() string

func (*AnsiEscapeSequence) Strip

func (e *AnsiEscapeSequence) Strip(s string) string

func (*AnsiEscapeSequence) Underline

func (e *AnsiEscapeSequence) Underline() *AnsiEscapeSequence

func (*AnsiEscapeSequence) UnderlineReset

func (e *AnsiEscapeSequence) UnderlineReset() *AnsiEscapeSequence

func (*AnsiEscapeSequence) V8FuncBackgroundColor

func (e *AnsiEscapeSequence) V8FuncBackgroundColor(in isolates.FunctionArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8FuncBackgroundIndexedColor

func (e *AnsiEscapeSequence) V8FuncBackgroundIndexedColor(in isolates.FunctionArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8FuncColor

func (e *AnsiEscapeSequence) V8FuncColor(in isolates.FunctionArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8FuncDisable

func (e *AnsiEscapeSequence) V8FuncDisable(in isolates.FunctionArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8FuncEnable

func (e *AnsiEscapeSequence) V8FuncEnable(in isolates.FunctionArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8FuncEraseEntireScreen

func (e *AnsiEscapeSequence) V8FuncEraseEntireScreen(in isolates.FunctionArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8FuncEraseFromCursorToEndOfLine

func (e *AnsiEscapeSequence) V8FuncEraseFromCursorToEndOfLine(in isolates.FunctionArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8FuncEraseFromCursorToEndOfScreen

func (e *AnsiEscapeSequence) V8FuncEraseFromCursorToEndOfScreen(in isolates.FunctionArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8FuncEraseFromCursorToStartOfLine

func (e *AnsiEscapeSequence) V8FuncEraseFromCursorToStartOfLine(in isolates.FunctionArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8FuncEraseFromCursorToStartOfScreen

func (e *AnsiEscapeSequence) V8FuncEraseFromCursorToStartOfScreen(in isolates.FunctionArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8FuncEraseInDisplay

func (e *AnsiEscapeSequence) V8FuncEraseInDisplay(in isolates.FunctionArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8FuncEraseInLine

func (e *AnsiEscapeSequence) V8FuncEraseInLine(in isolates.FunctionArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8FuncEraseLine

func (e *AnsiEscapeSequence) V8FuncEraseLine(in isolates.FunctionArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8FuncEraseSavedLines

func (e *AnsiEscapeSequence) V8FuncEraseSavedLines(in isolates.FunctionArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8FuncHome

func (e *AnsiEscapeSequence) V8FuncHome(in isolates.FunctionArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8FuncIndexedColor

func (e *AnsiEscapeSequence) V8FuncIndexedColor(in isolates.FunctionArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8FuncMove

func (e *AnsiEscapeSequence) V8FuncMove(in isolates.FunctionArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8FuncMoveDown

func (e *AnsiEscapeSequence) V8FuncMoveDown(in isolates.FunctionArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8FuncMoveLeft

func (e *AnsiEscapeSequence) V8FuncMoveLeft(in isolates.FunctionArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8FuncMoveRight

func (e *AnsiEscapeSequence) V8FuncMoveRight(in isolates.FunctionArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8FuncMoveToStart

func (e *AnsiEscapeSequence) V8FuncMoveToStart(in isolates.FunctionArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8FuncMoveToStartDown

func (e *AnsiEscapeSequence) V8FuncMoveToStartDown(in isolates.FunctionArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8FuncMoveToStartUp

func (e *AnsiEscapeSequence) V8FuncMoveToStartUp(in isolates.FunctionArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8FuncMoveUp

func (e *AnsiEscapeSequence) V8FuncMoveUp(in isolates.FunctionArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8FuncMoveUpOne

func (e *AnsiEscapeSequence) V8FuncMoveUpOne(in isolates.FunctionArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8FuncRequestCursorPosition

func (e *AnsiEscapeSequence) V8FuncRequestCursorPosition(in isolates.FunctionArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8FuncRequestCursorPositionSCO

func (e *AnsiEscapeSequence) V8FuncRequestCursorPositionSCO(in isolates.FunctionArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8FuncRestoreCursorPosition

func (e *AnsiEscapeSequence) V8FuncRestoreCursorPosition(in isolates.FunctionArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8FuncSaveCursorPosition

func (e *AnsiEscapeSequence) V8FuncSaveCursorPosition(in isolates.FunctionArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8FuncSaveCursorPositionSCO

func (e *AnsiEscapeSequence) V8FuncSaveCursorPositionSCO(in isolates.FunctionArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8FuncStrip

func (e *AnsiEscapeSequence) V8FuncStrip(in isolates.FunctionArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8GetBackgroundBlack

func (e *AnsiEscapeSequence) V8GetBackgroundBlack(in isolates.GetterArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8GetBackgroundBlue

func (e *AnsiEscapeSequence) V8GetBackgroundBlue(in isolates.GetterArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8GetBackgroundBrightBlack

func (e *AnsiEscapeSequence) V8GetBackgroundBrightBlack(in isolates.GetterArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8GetBackgroundBrightBlue

func (e *AnsiEscapeSequence) V8GetBackgroundBrightBlue(in isolates.GetterArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8GetBackgroundBrightCyan

func (e *AnsiEscapeSequence) V8GetBackgroundBrightCyan(in isolates.GetterArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8GetBackgroundBrightGreen

func (e *AnsiEscapeSequence) V8GetBackgroundBrightGreen(in isolates.GetterArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8GetBackgroundBrightMagenta

func (e *AnsiEscapeSequence) V8GetBackgroundBrightMagenta(in isolates.GetterArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8GetBackgroundBrightRed

func (e *AnsiEscapeSequence) V8GetBackgroundBrightRed(in isolates.GetterArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8GetBackgroundBrightWhite

func (e *AnsiEscapeSequence) V8GetBackgroundBrightWhite(in isolates.GetterArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8GetBackgroundBrightYellow

func (e *AnsiEscapeSequence) V8GetBackgroundBrightYellow(in isolates.GetterArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8GetBackgroundCyan

func (e *AnsiEscapeSequence) V8GetBackgroundCyan(in isolates.GetterArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8GetBackgroundDefault

func (e *AnsiEscapeSequence) V8GetBackgroundDefault(in isolates.GetterArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8GetBackgroundGreen

func (e *AnsiEscapeSequence) V8GetBackgroundGreen(in isolates.GetterArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8GetBackgroundMagenta

func (e *AnsiEscapeSequence) V8GetBackgroundMagenta(in isolates.GetterArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8GetBackgroundRed

func (e *AnsiEscapeSequence) V8GetBackgroundRed(in isolates.GetterArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8GetBackgroundWhite

func (e *AnsiEscapeSequence) V8GetBackgroundWhite(in isolates.GetterArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8GetBackgroundYellow

func (e *AnsiEscapeSequence) V8GetBackgroundYellow(in isolates.GetterArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8GetBlack

func (e *AnsiEscapeSequence) V8GetBlack(in isolates.GetterArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8GetBlink

func (e *AnsiEscapeSequence) V8GetBlink(in isolates.GetterArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8GetBlinkReset

func (e *AnsiEscapeSequence) V8GetBlinkReset(in isolates.GetterArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8GetBlue

func (e *AnsiEscapeSequence) V8GetBlue(in isolates.GetterArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8GetBold

func (e *AnsiEscapeSequence) V8GetBold(in isolates.GetterArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8GetBoldReset

func (e *AnsiEscapeSequence) V8GetBoldReset(in isolates.GetterArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8GetBrightBlack

func (e *AnsiEscapeSequence) V8GetBrightBlack(in isolates.GetterArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8GetBrightBlue

func (e *AnsiEscapeSequence) V8GetBrightBlue(in isolates.GetterArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8GetBrightCyan

func (e *AnsiEscapeSequence) V8GetBrightCyan(in isolates.GetterArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8GetBrightGreen

func (e *AnsiEscapeSequence) V8GetBrightGreen(in isolates.GetterArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8GetBrightMagenta

func (e *AnsiEscapeSequence) V8GetBrightMagenta(in isolates.GetterArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8GetBrightRed

func (e *AnsiEscapeSequence) V8GetBrightRed(in isolates.GetterArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8GetBrightWhite

func (e *AnsiEscapeSequence) V8GetBrightWhite(in isolates.GetterArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8GetBrightYellow

func (e *AnsiEscapeSequence) V8GetBrightYellow(in isolates.GetterArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8GetCyan

func (e *AnsiEscapeSequence) V8GetCyan(in isolates.GetterArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8GetDefault

func (e *AnsiEscapeSequence) V8GetDefault(in isolates.GetterArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8GetDim

func (e *AnsiEscapeSequence) V8GetDim(in isolates.GetterArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8GetDimReset

func (e *AnsiEscapeSequence) V8GetDimReset(in isolates.GetterArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8GetEnabled

func (e *AnsiEscapeSequence) V8GetEnabled(in isolates.GetterArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8GetGreen

func (e *AnsiEscapeSequence) V8GetGreen(in isolates.GetterArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8GetHidden

func (e *AnsiEscapeSequence) V8GetHidden(in isolates.GetterArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8GetHiddenReset

func (e *AnsiEscapeSequence) V8GetHiddenReset(in isolates.GetterArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8GetItalic

func (e *AnsiEscapeSequence) V8GetItalic(in isolates.GetterArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8GetItalicReset

func (e *AnsiEscapeSequence) V8GetItalicReset(in isolates.GetterArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8GetMagenta

func (e *AnsiEscapeSequence) V8GetMagenta(in isolates.GetterArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8GetRed

func (e *AnsiEscapeSequence) V8GetRed(in isolates.GetterArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8GetReset

func (e *AnsiEscapeSequence) V8GetReset(in isolates.GetterArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8GetReverse

func (e *AnsiEscapeSequence) V8GetReverse(in isolates.GetterArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8GetReverseReset

func (e *AnsiEscapeSequence) V8GetReverseReset(in isolates.GetterArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8GetStrikethrough

func (e *AnsiEscapeSequence) V8GetStrikethrough(in isolates.GetterArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8GetStrikethroughReset

func (e *AnsiEscapeSequence) V8GetStrikethroughReset(in isolates.GetterArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8GetUnderline

func (e *AnsiEscapeSequence) V8GetUnderline(in isolates.GetterArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8GetUnderlineReset

func (e *AnsiEscapeSequence) V8GetUnderlineReset(in isolates.GetterArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8GetWhite

func (e *AnsiEscapeSequence) V8GetWhite(in isolates.GetterArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) V8GetYellow

func (e *AnsiEscapeSequence) V8GetYellow(in isolates.GetterArgs) (*isolates.Value, error)

func (*AnsiEscapeSequence) White

func (e *AnsiEscapeSequence) White() *AnsiEscapeSequence

func (*AnsiEscapeSequence) Yellow

func (e *AnsiEscapeSequence) Yellow() *AnsiEscapeSequence

type ReadStream

type ReadStream interface {
    stream.Readable
    IsRaw() bool
    IsTTY() bool
    SetRawMode(in isolates.FunctionArgs, mode bool) (*isolates.Value, error)
}

type ReadStreamBase

type ReadStreamBase struct {
    *stream.ReadableBase
    // contains filtered or unexported fields
}

func NewReadStream

func NewReadStream(in isolates.FunctionArgs) (*ReadStreamBase, error)

func (*ReadStreamBase) IsRaw

func (r *ReadStreamBase) IsRaw() bool

func (*ReadStreamBase) IsTTY

func (r *ReadStreamBase) IsTTY() bool

func (*ReadStreamBase) SetRawMode

func (r *ReadStreamBase) SetRawMode(in isolates.FunctionArgs, mode bool) (*isolates.Value, error)

func (*ReadStreamBase) V8FuncSetRawMode

func (r *ReadStreamBase) V8FuncSetRawMode(in isolates.FunctionArgs) (*isolates.Value, error)

func (*ReadStreamBase) V8GetIsRaw

func (r *ReadStreamBase) V8GetIsRaw(in isolates.GetterArgs) (*isolates.Value, error)

func (*ReadStreamBase) V8GetIsTTY

func (r *ReadStreamBase) V8GetIsTTY(in isolates.GetterArgs) (*isolates.Value, error)

type WriteStream

type WriteStream interface {
    stream.Writable
    IsTTY() bool
    GetWindowSize() ([]int, error)
    Rows() (int, error)
    Columns() (int, error)
}

type WriteStreamBase

type WriteStreamBase struct {
    *stream.WritableBase
    // contains filtered or unexported fields
}

func NewWriteStream

func NewWriteStream(in isolates.FunctionArgs) (*WriteStreamBase, error)

func (*WriteStreamBase) Clear

func (w *WriteStreamBase) Clear() error

func (*WriteStreamBase) Columns

func (w *WriteStreamBase) Columns() (int, error)

func (*WriteStreamBase) GetWindowSize

func (w *WriteStreamBase) GetWindowSize() ([]int, error)

func (*WriteStreamBase) IsTTY

func (w *WriteStreamBase) IsTTY() bool

func (*WriteStreamBase) Rows

func (w *WriteStreamBase) Rows() (int, error)

func (*WriteStreamBase) V8FuncClear

func (w *WriteStreamBase) V8FuncClear(in isolates.FunctionArgs) (*isolates.Value, error)

func (*WriteStreamBase) V8FuncGetWindowSize

func (w *WriteStreamBase) V8FuncGetWindowSize(in isolates.FunctionArgs) (*isolates.Value, error)

func (*WriteStreamBase) V8GetColumns

func (w *WriteStreamBase) V8GetColumns(in isolates.GetterArgs) (*isolates.Value, error)

func (*WriteStreamBase) V8GetIsTTY

func (w *WriteStreamBase) V8GetIsTTY(in isolates.GetterArgs) (*isolates.Value, error)

func (*WriteStreamBase) V8GetRows

func (w *WriteStreamBase) V8GetRows(in isolates.GetterArgs) (*isolates.Value, error)

util

import "github.com/gosolid/solid/pkg/runtime/util"

Index

func Deprecate

func Deprecate(fn *isolates.Value, msg ...*isolates.Value) (isolates.Function, error)

func Format

func Format(ctx context.Context, argsv ...any) (string, error)

func FormatWithOptions

func FormatWithOptions(ctx context.Context, options any, argsv ...any) (string, error)

func Inherits

func Inherits(ctx context.Context, constructor *isolates.Value, superConstructor *isolates.Value) (*isolates.Value, error)

func Inspect

func Inspect(ctx context.Context, object any, args ...any) (string, error)

func Promisify

func Promisify(ctx context.Context, fn *isolates.Value) (isolates.Function, error)

type Counter

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

func NewCounter

func NewCounter(size int64, duration time.Duration) *Counter

func (*Counter) Add

func (c *Counter) Add(value int64, now time.Time) *Counter

func (*Counter) AddDuration

func (c *Counter) AddDuration(from time.Time, to time.Time) *Counter

func (*Counter) AddDurationNow

func (c *Counter) AddDurationNow(from time.Time) *Counter

func (*Counter) AddNow

func (c *Counter) AddNow(value int64) *Counter

func (*Counter) Clone

func (c *Counter) Clone(ctx context.Context) (*Counter, error)

func (*Counter) FloorTime

func (c *Counter) FloorTime(now time.Time) time.Time

func (*Counter) Sub

func (c *Counter) Sub(value int64, now time.Time) *Counter

func (*Counter) Sum

func (c *Counter) Sum(duration time.Duration, now time.Time) int64

func (*Counter) SumAll

func (c *Counter) SumAll(now time.Time) int64

func (*Counter) SumAllDuration

func (c *Counter) SumAllDuration(now time.Time) time.Duration

func (*Counter) SumAllDurationNow

func (c *Counter) SumAllDurationNow() time.Duration

func (*Counter) SumAllNow

func (c *Counter) SumAllNow() int64

func (*Counter) SumDuration

func (c *Counter) SumDuration(duration time.Duration, now time.Time) time.Duration

func (*Counter) SumDurationNow

func (c *Counter) SumDurationNow(duration time.Duration) time.Duration

func (*Counter) SumNow

func (c *Counter) SumNow(duration time.Duration) int64

func (*Counter) V8FuncAdd

func (c *Counter) V8FuncAdd(in isolates.FunctionArgs) (*isolates.Value, error)

func (*Counter) V8FuncAddDuration

func (c *Counter) V8FuncAddDuration(in isolates.FunctionArgs) (*isolates.Value, error)

func (*Counter) V8FuncAddDurationNow

func (c *Counter) V8FuncAddDurationNow(in isolates.FunctionArgs) (*isolates.Value, error)

func (*Counter) V8FuncAddNow

func (c *Counter) V8FuncAddNow(in isolates.FunctionArgs) (*isolates.Value, error)

func (*Counter) V8FuncClone

func (c *Counter) V8FuncClone(in isolates.FunctionArgs) (*isolates.Value, error)

func (*Counter) V8FuncFloorTime

func (c *Counter) V8FuncFloorTime(in isolates.FunctionArgs) (*isolates.Value, error)

func (*Counter) V8FuncSub

func (c *Counter) V8FuncSub(in isolates.FunctionArgs) (*isolates.Value, error)

func (*Counter) V8FuncSum

func (c *Counter) V8FuncSum(in isolates.FunctionArgs) (*isolates.Value, error)

func (*Counter) V8FuncSumAll

func (c *Counter) V8FuncSumAll(in isolates.FunctionArgs) (*isolates.Value, error)

func (*Counter) V8FuncSumAllDuration

func (c *Counter) V8FuncSumAllDuration(in isolates.FunctionArgs) (*isolates.Value, error)

func (*Counter) V8FuncSumAllDurationNow

func (c *Counter) V8FuncSumAllDurationNow(in isolates.FunctionArgs) (*isolates.Value, error)

func (*Counter) V8FuncSumAllNow

func (c *Counter) V8FuncSumAllNow(in isolates.FunctionArgs) (*isolates.Value, error)

func (*Counter) V8FuncSumDuration

func (c *Counter) V8FuncSumDuration(in isolates.FunctionArgs) (*isolates.Value, error)

func (*Counter) V8FuncSumDurationNow

func (c *Counter) V8FuncSumDurationNow(in isolates.FunctionArgs) (*isolates.Value, error)

func (*Counter) V8FuncSumNow

func (c *Counter) V8FuncSumNow(in isolates.FunctionArgs) (*isolates.Value, error)

type Import

type Import struct{}

type InspectOptions

type InspectOptions struct {
    ShowHidden       bool `v8:"showHidden"`
    Depth            int  `v8:"depth"`
    Colors           bool `v8:"colors"`
    CustomInspect    bool `v8:"customInspect"`
    ShowProxy        bool `v8:"showProxy"`
    MaxArrayLength   int  `v8:"maxArrayLength"`
    MaxStringLength  int  `v8:"maxStringLength"`
    BreakLength      int  `v8:"breakLength"`
    Compact          any  `v8:"compact"`
    Sorted           any  `v8:"sorted"`
    Getters          any  `v8:"getters"`
    NumericSeparator bool `v8:"numericSeparator"`
}

type Inspector

type Inspector struct {
    *stream.DuplexBase
    // contains filtered or unexported fields
}

func NewInspector

func NewInspector(in isolates.FunctionArgs) (*Inspector, error)

webrtc

import "github.com/gosolid/solid/pkg/runtime/webrtc"

Index

Variables

var PeerConnectionStateClosed = "closed"
var PeerConnectionStateConnecting = "connecting"
var PeerConnectionStateOpen = "open"

type AnswerMessage

type AnswerMessage struct {
    SessionDescription *SessionDescription `json:"sessionDescription"`
}

type AnswerResponse

type AnswerResponse struct {
    ID ID
}

type DataChannel

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

func NewDataChannel

func NewDataChannel() *DataChannel

func (*DataChannel) Close

func (d *DataChannel) Close() error

func (*DataChannel) IsOpen

func (d *DataChannel) IsOpen() bool

func (*DataChannel) Label

func (d *DataChannel) Label() string

func (*DataChannel) Read

func (d *DataChannel) Read(bytes []byte) (int, error)

func (*DataChannel) V8FuncClose

func (d *DataChannel) V8FuncClose(in isolates.FunctionArgs) (*isolates.Value, error)

func (*DataChannel) V8FuncRead

func (d *DataChannel) V8FuncRead(in isolates.FunctionArgs) (*isolates.Value, error)

func (*DataChannel) V8FuncWrite

func (d *DataChannel) V8FuncWrite(in isolates.FunctionArgs) (*isolates.Value, error)

func (*DataChannel) V8GetIsOpen

func (d *DataChannel) V8GetIsOpen(in isolates.GetterArgs) (*isolates.Value, error)

func (*DataChannel) V8GetLabel

func (d *DataChannel) V8GetLabel(in isolates.GetterArgs) (*isolates.Value, error)

func (*DataChannel) Write

func (d *DataChannel) Write(bytes []byte) (int, error)

type DataChannelOptions

type DataChannelOptions = webrtc.DataChannelInit

type ICECandidate

type ICECandidate webrtc.ICECandidateInit

type ID

type ID string

func NewID

func NewID() ID

type OfferMessage

type OfferMessage struct {
    ID                 ID
    SessionDescription *SessionDescription `json:"sessionDescription"`
}

type PeerConnection

type PeerConnection struct {
    ID ID
    // contains filtered or unexported fields
}

func NewPeerConnection

func NewPeerConnection(id ID, iceServers []string) (*PeerConnection, error)

func (*PeerConnection) AddICECandidate

func (c *PeerConnection) AddICECandidate(candidate *ICECandidate) error

func (*PeerConnection) Close

func (c *PeerConnection) Close() error

func (*PeerConnection) CreateAnswer

func (c *PeerConnection) CreateAnswer(offer *SessionDescription) (*SessionDescription, error)

func (*PeerConnection) CreateDataChannel

func (c *PeerConnection) CreateDataChannel(options *DataChannelOptions) (*DataChannel, error)

func (*PeerConnection) CreateOffer

func (c *PeerConnection) CreateOffer() (*SessionDescription, error)

func (*PeerConnection) DataChannels

func (c *PeerConnection) DataChannels() []*DataChannel

func (*PeerConnection) OnAnswer

func (c *PeerConnection) OnAnswer(answer *SessionDescription) error

func (*PeerConnection) OnClose

func (c *PeerConnection) OnClose(callback func() error) func()

func (*PeerConnection) OnConnected

func (c *PeerConnection) OnConnected(callback func() error) func()

func (*PeerConnection) OnConnecting

func (c *PeerConnection) OnConnecting(callback func() error) func()

func (*PeerConnection) OnConnectionStateChange

func (c *PeerConnection) OnConnectionStateChange(callback func(c PeerConnectionState) error) func()

func (*PeerConnection) OnICECandidate

func (c *PeerConnection) OnICECandidate(callback func(i *ICECandidate) error) func()

func (*PeerConnection) OnRemoteDataChannel

func (c *PeerConnection) OnRemoteDataChannel(callback func(*DataChannel) error) func()

func (*PeerConnection) State

func (c *PeerConnection) State() PeerConnectionState

func (*PeerConnection) V8FuncAddICECandidate

func (c *PeerConnection) V8FuncAddICECandidate(in isolates.FunctionArgs) (*isolates.Value, error)

func (*PeerConnection) V8FuncClose

func (c *PeerConnection) V8FuncClose(in isolates.FunctionArgs) (*isolates.Value, error)

func (*PeerConnection) V8FuncCreateAnswer

func (c *PeerConnection) V8FuncCreateAnswer(in isolates.FunctionArgs) (*isolates.Value, error)

func (*PeerConnection) V8FuncCreateDataChannel

func (c *PeerConnection) V8FuncCreateDataChannel(in isolates.FunctionArgs) (*isolates.Value, error)

func (*PeerConnection) V8FuncCreateOffer

func (c *PeerConnection) V8FuncCreateOffer(in isolates.FunctionArgs) (*isolates.Value, error)

func (*PeerConnection) V8FuncWait

func (c *PeerConnection) V8FuncWait(in isolates.FunctionArgs) (*isolates.Value, error)

func (*PeerConnection) V8GetChannels

func (c *PeerConnection) V8GetChannels(in isolates.GetterArgs) (*isolates.Value, error)

func (*PeerConnection) V8GetState

func (c *PeerConnection) V8GetState(in isolates.GetterArgs) (*isolates.Value, error)

func (*PeerConnection) Wait

func (c *PeerConnection) Wait() error

type PeerConnectionState

type PeerConnectionState = string

type SessionDescription

type SessionDescription webrtc.SessionDescription

type WebRTC

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

func NewWebRTC

func NewWebRTC() *WebRTC

func (*WebRTC) NewPeerConnection

func (rtc *WebRTC) NewPeerConnection(id ID, iceServers []string) (*PeerConnection, error)

func (*WebRTC) V8FuncCreatePeerConnection

func (rtc *WebRTC) V8FuncCreatePeerConnection(in isolates.FunctionArgs) (*isolates.Value, error)

worker_threads

import "github.com/gosolid/solid/pkg/runtime/worker_threads"

Index

type Import

type Import struct{}

solid

import "github.com/gosolid/solid/pkg/solid"

Index

type Process

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

func NewProcess

func NewProcess(t *WorkerTask) *Process

func (*Process) Argv

func (c *Process) Argv() []string

func (*Process) Cwd

func (c *Process) Cwd() string

func (*Process) Env

func (c *Process) Env() map[string]string

func (*Process) Exit

func (c *Process) Exit(exitCode int) error

func (*Process) NextTick

func (c *Process) NextTick(in isolates.FunctionArgs) (*isolates.Value, error)

func (*Process) Platform

func (c *Process) Platform() string

func (*Process) Stderr

func (c *Process) Stderr() stream.Writable

func (*Process) Stdin

func (c *Process) Stdin() stream.Readable

func (*Process) Stdout

func (c *Process) Stdout() stream.Writable

func (*Process) Task

func (c *Process) Task() *WorkerTask

func (*Process) V8Construct

func (p *Process) V8Construct(in isolates.FunctionArgs)

func (*Process) V8FuncCwd

func (c *Process) V8FuncCwd(in isolates.FunctionArgs) (*isolates.Value, error)

func (*Process) V8FuncExit

func (c *Process) V8FuncExit(in isolates.FunctionArgs) (*isolates.Value, error)

func (*Process) V8FuncNextTick

func (c *Process) V8FuncNextTick(in isolates.FunctionArgs) (*isolates.Value, error)

func (*Process) V8GetArgv

func (c *Process) V8GetArgv(in isolates.GetterArgs) (*isolates.Value, error)

func (*Process) V8GetEnv

func (c *Process) V8GetEnv(in isolates.GetterArgs) (*isolates.Value, error)

func (*Process) V8GetPlatform

func (c *Process) V8GetPlatform(in isolates.GetterArgs) (*isolates.Value, error)

func (*Process) V8GetStderr

func (c *Process) V8GetStderr(in isolates.GetterArgs) (*isolates.Value, error)

func (*Process) V8GetStdin

func (c *Process) V8GetStdin(in isolates.GetterArgs) (*isolates.Value, error)

func (*Process) V8GetStdout

func (c *Process) V8GetStdout(in isolates.GetterArgs) (*isolates.Value, error)

func (*Process) V8GetTask

func (c *Process) V8GetTask(in isolates.GetterArgs) (*isolates.Value, error)

func (*Process) V8GetVersions

func (c *Process) V8GetVersions(in isolates.GetterArgs) (*isolates.Value, error)

func (*Process) Versions

func (c *Process) Versions() *Versions

type TaskOptions

type TaskOptions struct {
    FS       fs.FS
    Requires []string
    Script   string
    Stdin    io.ReadCloser
    Stdout   io.WriteCloser
    Stderr   io.WriteCloser
    Env      map[string]string
}

type Ticker

type Ticker struct {
    *time.Ticker
    StopC chan bool
}

type Versions

type Versions struct {
    Node string `v8:"node"`
}

type WorkerTask

type WorkerTask struct {
    FS fs.FS `v8:"fs"`
    // contains filtered or unexported fields
}

func NewTask

func NewTask(options TaskOptions) (*WorkerTask, error)

func (*WorkerTask) ClearInterval

func (c *WorkerTask) ClearInterval(ticker int64)

func (*WorkerTask) ClearTimeout

func (c *WorkerTask) ClearTimeout(timer int64)

func (*WorkerTask) Clone

func (t *WorkerTask) Clone() (*WorkerTask, error)

func (*WorkerTask) ExitCode

func (t *WorkerTask) ExitCode() int

func (*WorkerTask) GetExecutionContext

func (t *WorkerTask) GetExecutionContext() context.Context

func (*WorkerTask) GetIsolate

func (c *WorkerTask) GetIsolate() *isolates.Isolate

func (*WorkerTask) OnTerminate

func (t *WorkerTask) OnTerminate(callback func() error) func()

func (*WorkerTask) Ref

func (c *WorkerTask) Ref()

func (*WorkerTask) SetExitCode

func (t *WorkerTask) SetExitCode(exitCode int)

func (*WorkerTask) SetInterval

func (c *WorkerTask) SetInterval(ctx context.Context, callback *isolates.Value, duration time.Duration) (int64, error)

func (*WorkerTask) SetTimeout

func (c *WorkerTask) SetTimeout(callback *isolates.Value, duration time.Duration) (int64, error)

func (*WorkerTask) Start

func (t *WorkerTask) Start() error

func (*WorkerTask) Stats

func (c *WorkerTask) Stats(ctx context.Context) (*isolates.Value, error)

func (*WorkerTask) Stop

func (t *WorkerTask) Stop() error

func (*WorkerTask) Terminate

func (c *WorkerTask) Terminate()

func (*WorkerTask) TimeCounter

func (c *WorkerTask) TimeCounter(ctx context.Context) (*util.Counter, error)

func (*WorkerTask) Unref

func (c *WorkerTask) Unref()

func (*WorkerTask) V8FuncClearInterval

func (c *WorkerTask) V8FuncClearInterval(in isolates.FunctionArgs) (*isolates.Value, error)

func (*WorkerTask) V8FuncClearTimeout

func (c *WorkerTask) V8FuncClearTimeout(in isolates.FunctionArgs) (*isolates.Value, error)

func (*WorkerTask) V8FuncCreateTask

func (c *WorkerTask) V8FuncCreateTask(taskFS fs.FS, requires []string, taskPath string) (*WorkerTask, error)

func (*WorkerTask) V8FuncSetImmediate

func (c *WorkerTask) V8FuncSetImmediate(in isolates.FunctionArgs) (*isolates.Value, error)

func (*WorkerTask) V8FuncSetInterval

func (c *WorkerTask) V8FuncSetInterval(in isolates.FunctionArgs) (*isolates.Value, error)

func (*WorkerTask) V8FuncSetTimeout

func (c *WorkerTask) V8FuncSetTimeout(in isolates.FunctionArgs) (*isolates.Value, error)

func (*WorkerTask) V8FuncWait

func (t *WorkerTask) V8FuncWait(in isolates.FunctionArgs) (*isolates.Value, error)

func (*WorkerTask) V8GetExitCode

func (t *WorkerTask) V8GetExitCode(in isolates.GetterArgs) (*isolates.Value, error)

func (*WorkerTask) V8GetStats

func (c *WorkerTask) V8GetStats(in isolates.GetterArgs) (*isolates.Value, error)

func (*WorkerTask) V8GetTimeCounter

func (c *WorkerTask) V8GetTimeCounter(in isolates.GetterArgs) (*isolates.Value, error)

func (*WorkerTask) Wait

func (t *WorkerTask) Wait(ctx context.Context) (int, error)

type WorkerTaskStats

type WorkerTaskStats struct {
    Contexts                int           `v8:"contexts"`
    Values                  int           `v8:"values"`
    Receivers               int           `v8:"receivers"`
    ComputeDuration         time.Duration `v8:"computeDuration"`
    ComputeDuration5        time.Duration `v8:"computeDuration5"`
    ComputeDuration15       time.Duration `v8:"computeDuration15"`
    ComputeDuration30       time.Duration `v8:"computeDuration30"`
    ComputeDuration60       time.Duration `v8:"computeDuration60"`
    ComputeDuration120      time.Duration `v8:"computeDuration120"`
    DoesZapGarbage          bool          `v8:"doesZapGarbage"`
    HeapSizeLimit           uint64        `v8:"heapSizeLimit"`
    MallocedMemory          uint64        `v8:"mallocedMemory"`
    PeakMallocedMemory      uint64        `v8:"peakMallocedMemory"`
    TotalAvailableSize      uint64        `v8:"totalAvailableSize"`
    TotalHeapSize           uint64        `v8:"totalHeapSize"`
    TotalHeapSizeExecutable uint64        `v8:"totalHeapSizeExecutable"`
    TotalPhysicalSize       uint64        `v8:"totalPhysicalSize"`
    UsedHeapSize            uint64        `v8:"usedHeapSize"`
}

func NewWorkerTaskStats

func NewWorkerTaskStats() *WorkerTaskStats

mobile

import "github.com/gosolid/solid/pkg/solid/mobile"

Index

    isolates

    import "github.com/grexie/isolates"
    

    Index

    Variables

    var ErrNoContext = errors.New("isolates.ExecutionContext: no context available")
    
    var ErrNotResolved = errors.New("unable to resolve")
    

    Version exposes the compiled-in version of the linked V8 library. This can be used to test for specific javascript functionality support (e.g. ES6 destructuring isn't supported before major version 5.).

    var Version = struct{ Major, Minor, Build, Patch int }{
        Major: int(C.version.major),
        Minor: int(C.version.minor),
        Build: int(C.version.build),
        Patch: int(C.version.patch),
    }
    

    func AddMarshaller

    func AddMarshaller(t reflect.Type, marshaller any) error
    

    func AddUnmarshaller

    func AddUnmarshaller(t reflect.Type, unmarshaller any) error
    

    func Initialize

    func Initialize()
    

    func WithContext

    func WithContext(ctx context.Context) context.Context
    

    type CallerInfo

    type CallerInfo struct {
        Name     string
        Filename string
        Line     int
        Column   int
    }
    

    type Console

    type Console interface {
        Assert(args ...any)
        Clear()
        Count(args ...any)
        CountReset(args ...any)
        Debug(args ...any)
        Dir(args ...any)
        DirXML(args ...any)
        Error(args ...any)
        Group(args ...any)
        GroupCollapsed(args ...any)
        GroupEnd(args ...any)
        Info(args ...any)
        Log(args ...any)
        Table(args ...any)
        Time(args ...any)
        TimeEnd(args ...any)
        TimeLog(args ...any)
        Trace(args ...any)
        Warn(args ...any)
        Profile(args ...any)
        ProfileEnd(args ...any)
        TimeStamp(args ...any)
    }
    

    type Context

    type Context struct {
        refutils.RefHolder
        // contains filtered or unexported fields
    }
    

    func (*Context) AddMicrotask

    func (c *Context) AddMicrotask(ctx context.Context, fn func(in FunctionArgs) error) error
    

    func (*Context) Assign

    func (c *Context) Assign(ctx context.Context, objects ...any) (*Value, error)
    

    func (*Context) AssignAll

    func (c *Context) AssignAll(ctx context.Context, objects ...any) (*Value, error)
    

    func (*Context) Create

    func (c *Context) Create(ctx context.Context, v interface{}) (*Value, error)
    

    func (*Context) CreateAll

    func (c *Context) CreateAll(ctx context.Context, objects ...any) ([]*Value, error)
    

    func (*Context) CreateConstructor

    func (c *Context) CreateConstructor(ctx context.Context, cons interface{}) (*Value, error)
    

    func (*Context) CreateConstructorWithName

    func (c *Context) CreateConstructorWithName(ctx context.Context, name string, cons interface{}) (*Value, error)
    

    func (*Context) CreateFunction

    func (c *Context) CreateFunction(ctx context.Context, name *string, function Function) (*Value, error)
    

    func (*Context) CreateRequire

    func (c *Context) CreateRequire(ctx context.Context, fs any, path string, extensions *Value, modules map[string]*Module, runtimes map[string]bool) (*Value, error)
    

    func (*Context) CreateWithName

    func (c *Context) CreateWithName(ctx context.Context, name string, v interface{}) (*Value, error)
    

    func (*Context) CreateWithoutMarshallers

    func (c *Context) CreateWithoutMarshallers(ctx context.Context, v interface{}) (*Value, error)
    

    func (*Context) Data

    func (c *Context) Data(key any) (any, bool)
    

    func (*Context) ErrorConstructor

    func (c *Context) ErrorConstructor(ctx context.Context) (*Value, error)
    

    func (*Context) False

    func (c *Context) False(ctx context.Context) (*Value, error)
    

    func (*Context) GetIsolate

    func (c *Context) GetIsolate() *Isolate
    

    func (*Context) Global

    func (c *Context) Global(ctx context.Context) (*Value, error)
    

    func (*Context) New

    func (c *Context) New(ctx context.Context, cons any, args ...any) (any, error)
    

    func (*Context) NewFunctionTemplate

    func (c *Context) NewFunctionTemplate(ctx context.Context, cb Function) (*FunctionTemplate, error)
    

    func (*Context) NewObject

    func (c *Context) NewObject(ctx context.Context) (*Value, error)
    

    func (*Context) NewResolver

    func (c *Context) NewResolver(ctx context.Context) (*Resolver, error)
    

    func (*Context) Null

    func (c *Context) Null(ctx context.Context) (*Value, error)
    

    func (*Context) ObjectCreate

    func (c *Context) ObjectCreate(ctx context.Context, args ...any) (*Value, error)
    

    func (*Context) ParseJSON

    func (c *Context) ParseJSON(ctx context.Context, json string) (*Value, error)
    

    func (*Context) Receiver

    func (c *Context) Receiver(ctx context.Context, self *Value, t reflect.Type) (reflect.Value, error)
    

    func (*Context) Receivers

    func (c *Context) Receivers() int
    

    func (*Context) Run

    func (c *Context) Run(ctx context.Context, code string, filename string, module *Module) (*Value, error)
    

    func (*Context) RunWithRuntime

    func (c *Context) RunWithRuntime(ctx context.Context, fs any, path string, env func(RuntimeFunctionArgs) error, security map[string]bool) (*Value, error)
    

    func (*Context) SetData

    func (c *Context) SetData(key any, value any)
    

    func (*Context) True

    func (c *Context) True(ctx context.Context) (*Value, error)
    

    func (*Context) Undefined

    func (c *Context) Undefined(ctx context.Context) (*Value, error)
    

    func (*Context) Values

    func (c *Context) Values() int
    

    type Error

    type Error interface {
        Message() string
        // contains filtered or unexported methods
    }
    

    type ExecutionContext

    type ExecutionContext struct {
        refutils.RefHolder
        // contains filtered or unexported fields
    }
    

    func For

    func For(ctx context.Context) *ExecutionContext
    

    func (*ExecutionContext) AddExecutionEnterCallback

    func (ec *ExecutionContext) AddExecutionEnterCallback(callback func())
    

    func (*ExecutionContext) AddExecutionExitCallback

    func (ec *ExecutionContext) AddExecutionExitCallback(callback func())
    

    func (*ExecutionContext) AddReleaser

    func (ec *ExecutionContext) AddReleaser(releaser ...Releaser)
    

    func (*ExecutionContext) Assert

    func (c *ExecutionContext) Assert(args ...any)
    

    Assert implements Console.

    func (*ExecutionContext) Background

    func (c *ExecutionContext) Background(callback func(context.Context))
    

    func (*ExecutionContext) Clear

    func (c *ExecutionContext) Clear()
    

    Clear implements Console.

    func (*ExecutionContext) Context

    func (ec *ExecutionContext) Context() *Context
    

    func (*ExecutionContext) Count

    func (c *ExecutionContext) Count(args ...any)
    

    Count implements Console.

    func (*ExecutionContext) CountReset

    func (c *ExecutionContext) CountReset(args ...any)
    

    CountReset implements Console.

    func (*ExecutionContext) Data

    func (c *ExecutionContext) Data(key any) (any, bool)
    

    func (*ExecutionContext) Debug

    func (c *ExecutionContext) Debug(args ...any)
    

    Debug implements Console.

    func (*ExecutionContext) Dir

    func (c *ExecutionContext) Dir(args ...any)
    

    Dir implements Console.

    func (*ExecutionContext) DirXML

    func (c *ExecutionContext) DirXML(args ...any)
    

    DirXML implements Console.

    func (*ExecutionContext) Error

    func (c *ExecutionContext) Error(args ...any)
    

    Error implements Console.

    func (*ExecutionContext) Group

    func (c *ExecutionContext) Group(args ...any)
    

    Group implements Console.

    func (*ExecutionContext) GroupCollapsed

    func (c *ExecutionContext) GroupCollapsed(args ...any)
    

    GroupCollapsed implements Console.

    func (*ExecutionContext) GroupEnd

    func (c *ExecutionContext) GroupEnd(args ...any)
    

    GroupEnd implements Console.

    func (*ExecutionContext) Info

    func (c *ExecutionContext) Info(args ...any)
    

    Info implements Console.

    func (*ExecutionContext) Isolate

    func (ec *ExecutionContext) Isolate() *Isolate
    

    func (*ExecutionContext) Log

    func (c *ExecutionContext) Log(args ...any)
    

    Log implements Console.

    func (*ExecutionContext) New

    func (c *ExecutionContext) New(constructor any, args ...any) (any, error)
    

    func (*ExecutionContext) Profile

    func (c *ExecutionContext) Profile(args ...any)
    

    Profile implements Console.

    func (*ExecutionContext) ProfileEnd

    func (c *ExecutionContext) ProfileEnd(args ...any)
    

    ProfileEnd implements Console.

    func (*ExecutionContext) SetContext

    func (ec *ExecutionContext) SetContext(c *Context)
    

    func (*ExecutionContext) SetData

    func (c *ExecutionContext) SetData(key any, value any)
    

    func (*ExecutionContext) Sync

    func (c *ExecutionContext) Sync(callback func(context.Context) (any, error)) (any, error)
    

    func (*ExecutionContext) Table

    func (c *ExecutionContext) Table(args ...any)
    

    Table implements Console.

    func (*ExecutionContext) Time

    func (c *ExecutionContext) Time(args ...any)
    

    Time implements Console.

    func (*ExecutionContext) TimeEnd

    func (c *ExecutionContext) TimeEnd(args ...any)
    

    TimeEnd implements Console.

    func (*ExecutionContext) TimeLog

    func (c *ExecutionContext) TimeLog(args ...any)
    

    TimeLog implements Console.

    func (*ExecutionContext) TimeStamp

    func (c *ExecutionContext) TimeStamp(args ...any)
    

    TimeStamp implements Console.

    func (*ExecutionContext) Trace

    func (c *ExecutionContext) Trace(args ...any)
    

    Trace implements Console.

    func (*ExecutionContext) Warn

    func (c *ExecutionContext) Warn(args ...any)
    

    Warn implements Console.

    type Function

    type Function func(FunctionArgs) (*Value, error)
    

    type FunctionArgs

    type FunctionArgs struct {
        ExecutionContext context.Context
        Context          *Context
        This             *Value
        IsConstructCall  bool
        Args             []*Value
        Caller           CallerInfo
        Holder           *Value
    }
    

    func (*FunctionArgs) Arg

    func (c *FunctionArgs) Arg(ctx context.Context, n int) *Value
    

    func (*FunctionArgs) Background

    func (c *FunctionArgs) Background(callback func(in FunctionArgs))
    

    func (*FunctionArgs) Sync

    func (c *FunctionArgs) Sync(callback func(in FunctionArgs) (any, error)) (any, error)
    

    func (*FunctionArgs) WithArgs

    func (c *FunctionArgs) WithArgs(args ...any) (FunctionArgs, error)
    

    type FunctionTemplate

    type FunctionTemplate struct {
        refutils.RefHolder
        // contains filtered or unexported fields
    }
    

    func (*FunctionTemplate) GetFunction

    func (f *FunctionTemplate) GetFunction(ctx context.Context) (*Value, error)
    

    func (*FunctionTemplate) GetInstanceTemplate

    func (f *FunctionTemplate) GetInstanceTemplate(ctx context.Context) (*ObjectTemplate, error)
    

    func (*FunctionTemplate) GetPrototypeTemplate

    func (f *FunctionTemplate) GetPrototypeTemplate(ctx context.Context) (*ObjectTemplate, error)
    

    func (*FunctionTemplate) Inherit

    func (f *FunctionTemplate) Inherit(ctx context.Context, parent *FunctionTemplate) error
    

    func (*FunctionTemplate) SetName

    func (f *FunctionTemplate) SetName(ctx context.Context, name string) error
    

    type Getter

    type Getter func(GetterArgs) (*Value, error)
    

    type GetterArgs

    type GetterArgs struct {
        ExecutionContext context.Context
        Context          *Context
        Caller           CallerInfo
        This             *Value
        Holder           *Value
        Key              string
    }
    

    type HeapStatistics

    type HeapStatistics struct {
        TotalHeapSize           uint64
        TotalHeapSizeExecutable uint64
        TotalPhysicalSize       uint64
        TotalAvailableSize      uint64
        UsedHeapSize            uint64
        HeapSizeLimit           uint64
        MallocedMemory          uint64
        PeakMallocedMemory      uint64
        DoesZapGarbage          bool
    }
    

    type Inspector

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

    func (*Inspector) AddContext

    func (i *Inspector) AddContext(context *Context, name string)
    

    func (*Inspector) DispatchMessage

    func (i *Inspector) DispatchMessage(message string)
    

    func (*Inspector) RemoveContext

    func (i *Inspector) RemoveContext(context *Context)
    

    type InspectorCallbacks

    type InspectorCallbacks interface {
        V8InspectorSendResponse(callId int, message string)
        V8InspectorSendNotification(message string)
        V8InspectorFlushProtocolNotifications()
    }
    

    type Isolate

    type Isolate struct {
        refutils.RefHolder
        // contains filtered or unexported fields
    }
    

    func NewIsolate

    func NewIsolate() *Isolate
    

    func NewIsolateWithSnapshot

    func NewIsolateWithSnapshot(snapshot *Snapshot) *Isolate
    

    func (*Isolate) AddExecutionEnterCallback

    func (i *Isolate) AddExecutionEnterCallback(callback func())
    

    func (*Isolate) AddExecutionExitCallback

    func (i *Isolate) AddExecutionExitCallback(callback func())
    

    func (*Isolate) AddExecutionExitCallbackOnce

    func (i *Isolate) AddExecutionExitCallbackOnce(callback func())
    

    func (*Isolate) AddShutdownHook

    func (i *Isolate) AddShutdownHook(ctx context.Context, shutdownHook interface{})
    

    func (*Isolate) Background

    func (i *Isolate) Background(ctx context.Context, callback func(ctx context.Context))
    

    func (*Isolate) Contexts

    func (i *Isolate) Contexts(ctx context.Context) ([]*Context, error)
    

    func (*Isolate) EnqueueMicrotaskWithValue

    func (i *Isolate) EnqueueMicrotaskWithValue(ctx context.Context, fn *Value) error
    

    func (*Isolate) GetData

    func (i *Isolate) GetData(key string) interface{}
    

    func (*Isolate) GetExecutionContext

    func (i *Isolate) GetExecutionContext() context.Context
    

    func (*Isolate) GetHeapStatistics

    func (i *Isolate) GetHeapStatistics(ctx context.Context) (HeapStatistics, error)
    

    func (*Isolate) IsRunning

    func (i *Isolate) IsRunning(ctx context.Context) (bool, error)
    

    func (*Isolate) NewContext

    func (i *Isolate) NewContext(ctx context.Context) (*Context, error)
    

    func (*Isolate) NewInspector

    func (i *Isolate) NewInspector(callbacks InspectorCallbacks) *Inspector
    

    func (*Isolate) PerformMicrotaskCheckpointInBackground

    func (i *Isolate) PerformMicrotaskCheckpointInBackground(ctx context.Context)
    

    func (*Isolate) PerformMicrotaskCheckpointSync

    func (i *Isolate) PerformMicrotaskCheckpointSync(ctx context.Context) error
    

    func (*Isolate) RequestGarbageCollectionForTesting

    func (i *Isolate) RequestGarbageCollectionForTesting(ctx context.Context)
    

    func (*Isolate) SendLowMemoryNotification

    func (i *Isolate) SendLowMemoryNotification(ctx context.Context)
    

    func (*Isolate) SetData

    func (i *Isolate) SetData(key string, value interface{})
    

    func (*Isolate) Sync

    func (i *Isolate) Sync(ctx context.Context, fn func(context.Context) (interface{}, error)) (result interface{}, err error)
    

    func (*Isolate) Terminate

    func (i *Isolate) Terminate()
    

    func (*Isolate) Wait

    func (i *Isolate) Wait(ctx context.Context) error
    

    type Kind

    Kind is an underlying V8 representation of a *Value. Javascript values may have multiple underyling kinds. For example, a function will be both KindObject and KindFunction.

    type Kind uint8
    
    const (
        KindUndefined Kind = iota
        KindNull
        KindName
        KindString
        KindSymbol
        KindFunction
        KindArray
        KindObject
        KindBoolean
        KindNumber
        KindExternal
        KindInt32
        KindUint32
        KindDate
        KindArgumentsObject
        KindBooleanObject
        KindNumberObject
        KindStringObject
        KindSymbolObject
        KindNativeError
        KindRegExp
        KindAsyncFunction
        KindGeneratorFunction
        KindGeneratorObject
        KindPromise
        KindMap
        KindSet
        KindMapIterator
        KindSetIterator
        KindWeakMap
        KindWeakSet
        KindArrayBuffer
        KindArrayBufferView
        KindTypedArray
        KindUint8Array
        KindUint8ClampedArray
        KindInt8Array
        KindUint16Array
        KindInt16Array
        KindUint32Array
        KindInt32Array
        KindFloat32Array
        KindFloat64Array
        KindDataView
        KindSharedArrayBuffer
        KindProxy
        KindWebAssemblyCompiledModule
    )
    

    func (Kind) String

    func (k Kind) String() string
    

    type Marshaler

    type Marshaler interface {
        MarshalV8(ctx context.Context) any
    }
    

    type Module

    type Module struct {
        refutils.RefHolder
        sync.Mutex
    
        Context  *Context
        ID       string
        FS       any
        Filename string
        Dirname  string
        Main     bool
    
        Require *Value
        Error   error
    }
    

    func (*Module) ImportModuleDynamically

    func (m *Module) ImportModuleDynamically(ctx context.Context, specifier string, resourceName string, importAssertions []*Value) (*Value, error)
    

    func (*Module) V8Func\_compile

    func (m *Module) V8Func_compile(in FunctionArgs) (*Value, error)
    

    func (*Module) V8GetDirname

    func (m *Module) V8GetDirname(in GetterArgs) (*Value, error)
    

    func (*Module) V8GetFilename

    func (m *Module) V8GetFilename(in GetterArgs) (*Value, error)
    

    func (*Module) V8GetFs

    func (m *Module) V8GetFs(in GetterArgs) (*Value, error)
    

    func (*Module) V8GetId

    func (m *Module) V8GetId(in GetterArgs) (*Value, error)
    

    func (*Module) V8GetRequire

    func (m *Module) V8GetRequire(in GetterArgs) (*Value, error)
    

    type ObjectTemplate

    type ObjectTemplate struct {
        refutils.RefHolder
        // contains filtered or unexported fields
    }
    

    func (*ObjectTemplate) Copy

    func (o *ObjectTemplate) Copy(ctx context.Context, other *ObjectTemplate) error
    

    func (*ObjectTemplate) SetAccessor

    func (o *ObjectTemplate) SetAccessor(ctx context.Context, name string, getter Getter, setter Setter) error
    

    func (*ObjectTemplate) SetInternalFieldCount

    func (o *ObjectTemplate) SetInternalFieldCount(ctx context.Context, count int) error
    

    type PromiseState

    PromiseState defines the state of a promise: either pending, resolved, or rejected. Promises that are pending have no result value yet. A promise that is resolved has a result value, and a promise that is rejected has a result value that is usually the error.

    type PromiseState uint8
    
    const (
        PromiseStatePending PromiseState = iota
        PromiseStateResolved
        PromiseStateRejected
    )
    

    func (PromiseState) String

    func (s PromiseState) String() string
    

    type PropertyDescriptor

    type PropertyDescriptor struct {
        Get          *Value `v8:"get"`
        Set          *Value `v8:"set"`
        Value        *Value `v8:"value"`
        Enumerable   bool   `v8:"enumerable"`
        Configurable bool   `v8:"configurable"`
        Writable     bool   `v8:"writable"`
    }
    

    func (*PropertyDescriptor) MarshalV8

    func (d *PropertyDescriptor) MarshalV8(ctx context.Context) any
    

    func (*PropertyDescriptor) V8Construct

    func (d *PropertyDescriptor) V8Construct(in FunctionArgs) error
    

    type Releaser

    type Releaser interface {
        Release()
    }
    

    type ResolveResult

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

    func RegisterRuntime

    func RegisterRuntime(name string, path string, factory func(in FunctionArgs) (*Value, error)) *ResolveResult
    

    func RegisterRuntimeLibrary

    func RegisterRuntimeLibrary(name string, fs any, path string) *ResolveResult
    

    type Resolver

    type Resolver struct {
        refutils.RefHolder
        // contains filtered or unexported fields
    }
    

    func (*Resolver) Promise

    func (r *Resolver) Promise(ctx context.Context) (*Value, error)
    

    func (*Resolver) Reject

    func (r *Resolver) Reject(ctx context.Context, value interface{}) error
    

    func (*Resolver) RejectWithValue

    func (r *Resolver) RejectWithValue(ctx context.Context, v *Value) error
    

    func (*Resolver) Resolve

    func (r *Resolver) Resolve(ctx context.Context, value interface{}) error
    

    func (*Resolver) ResolveWithValue

    func (r *Resolver) ResolveWithValue(ctx context.Context, v *Value) error
    

    func (*Resolver) ToCallback

    func (r *Resolver) ToCallback(ctx context.Context, callback *Value) error
    

    type RuntimeFunctionArgs

    type RuntimeFunctionArgs struct {
        FunctionArgs
        Module  *Module
        Require *Value
        Exports *Value
    }
    

    type Setter

    type Setter func(SetterArgs) error
    

    type SetterArgs

    type SetterArgs struct {
        ExecutionContext context.Context
        Context          *Context
        Caller           CallerInfo
        This             *Value
        Holder           *Value
        Key              string
        Value            *Value
    }
    

    type Snapshot

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

    func (*Snapshot) Export

    func (s *Snapshot) Export() []byte
    

    type Value

    type Value struct {
        refutils.RefHolder
        // contains filtered or unexported fields
    }
    

    func (*Value) Await

    func (v *Value) Await(ctx context.Context) (*Value, error)
    

    func (*Value) Bind

    func (v *Value) Bind(ctx context.Context, argv ...any) (*Value, error)
    

    func (*Value) BindMethod

    func (v *Value) BindMethod(ctx context.Context, method string, argv ...any) (*Value, error)
    

    func (*Value) Bool

    func (v *Value) Bool(ctx context.Context) (bool, error)
    

    func (*Value) Bytes

    func (v *Value) Bytes(ctx context.Context) ([]byte, error)
    

    func (*Value) Call

    func (v *Value) Call(ctx context.Context, self any, args ...any) (*Value, error)
    

    func (*Value) CallMethod

    func (v *Value) CallMethod(ctx context.Context, name string, argv ...any) (*Value, error)
    

    func (*Value) CallValue

    func (v *Value) CallValue(ctx context.Context, self *Value, argv ...*Value) (*Value, error)
    

    func (*Value) Constructor

    func (v *Value) Constructor(t reflect.Type) *FunctionTemplate
    

    func (*Value) Date

    func (v *Value) Date(ctx context.Context) (time.Time, error)
    

    func (*Value) DefineProperty

    func (v *Value) DefineProperty(ctx context.Context, key string, descriptor *PropertyDescriptor) error
    

    func (*Value) Equals

    func (v *Value) Equals(ctx context.Context, other *Value) (bool, error)
    

    func (*Value) Error

    func (v *Value) Error() string
    

    func (*Value) Float64

    func (v *Value) Float64(ctx context.Context) (float64, error)
    

    func (*Value) Get

    func (v *Value) Get(ctx context.Context, key string) (*Value, error)
    

    func (*Value) GetByteLength

    func (v *Value) GetByteLength(ctx context.Context) (int, error)
    

    func (*Value) GetContext

    func (v *Value) GetContext() *Context
    

    func (*Value) GetIndex

    func (v *Value) GetIndex(ctx context.Context, i int) (*Value, error)
    

    func (*Value) GetInternalField

    func (v *Value) GetInternalField(ctx context.Context, i int) (int64, error)
    

    func (*Value) GetInternalFieldCount

    func (v *Value) GetInternalFieldCount(ctx context.Context) (int, error)
    

    func (*Value) GetLength

    func (v *Value) GetLength(ctx context.Context) (int64, error)
    

    func (*Value) GetOwnPropertyDescriptors

    func (v *Value) GetOwnPropertyDescriptors(ctx context.Context) (map[string]PropertyDescriptor, error)
    

    func (*Value) GetPrototype

    func (v *Value) GetPrototype(ctx context.Context) (*Value, error)
    

    func (*Value) InstanceOf

    func (v *Value) InstanceOf(ctx context.Context, object *Value) bool
    

    func (*Value) Int64

    func (v *Value) Int64(ctx context.Context) (int64, error)
    

    func (*Value) IsKind

    func (v *Value) IsKind(k Kind) bool
    

    func (*Value) IsNil

    func (v *Value) IsNil() bool
    

    func (*Value) Keys

    func (v *Value) Keys(ctx context.Context) ([]string, error)
    

    func (*Value) MarshalJSON

    func (v *Value) MarshalJSON(ctx context.Context) ([]byte, error)
    

    func (*Value) New

    func (v *Value) New(ctx context.Context, args ...any) (*Value, error)
    

    func (*Value) NewValue

    func (v *Value) NewValue(ctx context.Context, argv ...*Value) (*Value, error)
    

    func (*Value) PromiseInfo

    func (v *Value) PromiseInfo(ctx context.Context) (PromiseState, *Value, error)
    

    func (*Value) RebindAll

    func (v *Value) RebindAll(ctx context.Context) error
    

    func (*Value) RebindMethod

    func (v *Value) RebindMethod(ctx context.Context, method string, args ...any) error
    

    func (*Value) Receiver

    func (v *Value) Receiver(ctx context.Context) reflect.Value
    

    func (*Value) Ref

    func (v *Value) Ref() refutils.ID
    

    func (*Value) Set

    func (v *Value) Set(ctx context.Context, key string, value any) error
    

    func (*Value) SetBytes

    func (v *Value) SetBytes(ctx context.Context, bytes []byte) error
    

    func (*Value) SetIndex

    func (v *Value) SetIndex(ctx context.Context, i int, value *Value) error
    

    func (*Value) SetInternalField

    func (v *Value) SetInternalField(ctx context.Context, i int, value uint32) error
    

    func (*Value) SetReceiver

    func (v *Value) SetReceiver(ctx context.Context, value reflect.Value)
    

    func (*Value) SetValue

    func (v *Value) SetValue(ctx context.Context, key string, value *Value) error
    

    func (*Value) StrictEquals

    func (v *Value) StrictEquals(ctx context.Context, other *Value) (bool, error)
    

    func (*Value) String

    func (v *Value) String() string
    

    func (*Value) StringValue

    func (v *Value) StringValue(ctx context.Context) (string, error)
    

    func (*Value) ToError

    func (v *Value) ToError(ctx context.Context) error
    

    func (*Value) Unmarshal

    func (v *Value) Unmarshal(ctx context.Context, t reflect.Type) (*reflect.Value, error)
    

    func (*Value) Unref

    func (v *Value) Unref()