constant

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValueOf

func ValueOf[T Constant[T]]() T

ValueOf gives the default value of a constant from its type. It's helpful when constructing constants as variants in a one-of. Note that empty structs are marshalled by default. Usage: constant.ValueOf[constant.Foo]()

Types

type Agent

type Agent string // Always "agent"

func (Agent) Default

func (c Agent) Default() Agent

func (Agent) MarshalJSON

func (c Agent) MarshalJSON() ([]byte, error)

type Assistant

type Assistant string // Always "assistant"

func (Assistant) Default

func (c Assistant) Default() Assistant

func (Assistant) MarshalJSON

func (c Assistant) MarshalJSON() ([]byte, error)

type Completed

type Completed string // Always "completed"

func (Completed) Default

func (c Completed) Default() Completed

func (Completed) MarshalJSON

func (c Completed) MarshalJSON() ([]byte, error)

type Constant

type Constant[T any] interface {
	Default() T
}

type Error

type Error string // Always "error"

func (Error) Default

func (c Error) Default() Error

func (Error) MarshalJSON

func (c Error) MarshalJSON() ([]byte, error)

type File

type File string // Always "file"

func (File) Default

func (c File) Default() File

func (File) MarshalJSON

func (c File) MarshalJSON() ([]byte, error)

type FileEdited

type FileEdited string // Always "file.edited"

func (FileEdited) Default

func (c FileEdited) Default() FileEdited

func (FileEdited) MarshalJSON

func (c FileEdited) MarshalJSON() ([]byte, error)

type FileWatcherUpdated

type FileWatcherUpdated string // Always "file.watcher.updated"

func (FileWatcherUpdated) Default

func (FileWatcherUpdated) MarshalJSON

func (c FileWatcherUpdated) MarshalJSON() ([]byte, error)

type IdeInstalled

type IdeInstalled string // Always "ide.installed"

func (IdeInstalled) Default

func (c IdeInstalled) Default() IdeInstalled

func (IdeInstalled) MarshalJSON

func (c IdeInstalled) MarshalJSON() ([]byte, error)

type InstallationUpdated

type InstallationUpdated string // Always "installation.updated"

func (InstallationUpdated) Default

func (InstallationUpdated) MarshalJSON

func (c InstallationUpdated) MarshalJSON() ([]byte, error)

type Local

type Local string // Always "local"

func (Local) Default

func (c Local) Default() Local

func (Local) MarshalJSON

func (c Local) MarshalJSON() ([]byte, error)

type LspClientDiagnostics

type LspClientDiagnostics string // Always "lsp.client.diagnostics"

func (LspClientDiagnostics) Default

func (LspClientDiagnostics) MarshalJSON

func (c LspClientDiagnostics) MarshalJSON() ([]byte, error)

type MessageAbortedError

type MessageAbortedError string // Always "MessageAbortedError"

func (MessageAbortedError) Default

func (MessageAbortedError) MarshalJSON

func (c MessageAbortedError) MarshalJSON() ([]byte, error)

type MessageOutputLengthError

type MessageOutputLengthError string // Always "MessageOutputLengthError"

func (MessageOutputLengthError) Default

func (MessageOutputLengthError) MarshalJSON

func (c MessageOutputLengthError) MarshalJSON() ([]byte, error)

type MessagePartRemoved

type MessagePartRemoved string // Always "message.part.removed"

func (MessagePartRemoved) Default

func (MessagePartRemoved) MarshalJSON

func (c MessagePartRemoved) MarshalJSON() ([]byte, error)

type MessagePartUpdated

type MessagePartUpdated string // Always "message.part.updated"

func (MessagePartUpdated) Default

func (MessagePartUpdated) MarshalJSON

func (c MessagePartUpdated) MarshalJSON() ([]byte, error)

type MessageRemoved

type MessageRemoved string // Always "message.removed"

func (MessageRemoved) Default

func (c MessageRemoved) Default() MessageRemoved

func (MessageRemoved) MarshalJSON

func (c MessageRemoved) MarshalJSON() ([]byte, error)

type MessageUpdated

type MessageUpdated string // Always "message.updated"

func (MessageUpdated) Default

func (c MessageUpdated) Default() MessageUpdated

func (MessageUpdated) MarshalJSON

func (c MessageUpdated) MarshalJSON() ([]byte, error)

type Patch

type Patch string // Always "patch"

func (Patch) Default

func (c Patch) Default() Patch

func (Patch) MarshalJSON

func (c Patch) MarshalJSON() ([]byte, error)

type Pending

type Pending string // Always "pending"

func (Pending) Default

func (c Pending) Default() Pending

func (Pending) MarshalJSON

func (c Pending) MarshalJSON() ([]byte, error)

type PermissionReplied

type PermissionReplied string // Always "permission.replied"

func (PermissionReplied) Default

func (PermissionReplied) MarshalJSON

func (c PermissionReplied) MarshalJSON() ([]byte, error)

type PermissionUpdated

type PermissionUpdated string // Always "permission.updated"

func (PermissionUpdated) Default

func (PermissionUpdated) MarshalJSON

func (c PermissionUpdated) MarshalJSON() ([]byte, error)

type ProviderAuthError

type ProviderAuthError string // Always "ProviderAuthError"

func (ProviderAuthError) Default

func (ProviderAuthError) MarshalJSON

func (c ProviderAuthError) MarshalJSON() ([]byte, error)

type Reasoning

type Reasoning string // Always "reasoning"

func (Reasoning) Default

func (c Reasoning) Default() Reasoning

func (Reasoning) MarshalJSON

func (c Reasoning) MarshalJSON() ([]byte, error)

type Remote

type Remote string // Always "remote"

func (Remote) Default

func (c Remote) Default() Remote

func (Remote) MarshalJSON

func (c Remote) MarshalJSON() ([]byte, error)

type Running

type Running string // Always "running"

func (Running) Default

func (c Running) Default() Running

func (Running) MarshalJSON

func (c Running) MarshalJSON() ([]byte, error)

type ServerConnected

type ServerConnected string // Always "server.connected"

func (ServerConnected) Default

func (c ServerConnected) Default() ServerConnected

func (ServerConnected) MarshalJSON

func (c ServerConnected) MarshalJSON() ([]byte, error)

type SessionDeleted

type SessionDeleted string // Always "session.deleted"

func (SessionDeleted) Default

func (c SessionDeleted) Default() SessionDeleted

func (SessionDeleted) MarshalJSON

func (c SessionDeleted) MarshalJSON() ([]byte, error)

type SessionError

type SessionError string // Always "session.error"

func (SessionError) Default

func (c SessionError) Default() SessionError

func (SessionError) MarshalJSON

func (c SessionError) MarshalJSON() ([]byte, error)

type SessionIdle

type SessionIdle string // Always "session.idle"

func (SessionIdle) Default

func (c SessionIdle) Default() SessionIdle

func (SessionIdle) MarshalJSON

func (c SessionIdle) MarshalJSON() ([]byte, error)

type SessionUpdated

type SessionUpdated string // Always "session.updated"

func (SessionUpdated) Default

func (c SessionUpdated) Default() SessionUpdated

func (SessionUpdated) MarshalJSON

func (c SessionUpdated) MarshalJSON() ([]byte, error)

type Snapshot

type Snapshot string // Always "snapshot"

func (Snapshot) Default

func (c Snapshot) Default() Snapshot

func (Snapshot) MarshalJSON

func (c Snapshot) MarshalJSON() ([]byte, error)

type StepFinish

type StepFinish string // Always "step-finish"

func (StepFinish) Default

func (c StepFinish) Default() StepFinish

func (StepFinish) MarshalJSON

func (c StepFinish) MarshalJSON() ([]byte, error)

type StepStart

type StepStart string // Always "step-start"

func (StepStart) Default

func (c StepStart) Default() StepStart

func (StepStart) MarshalJSON

func (c StepStart) MarshalJSON() ([]byte, error)

type StorageWrite

type StorageWrite string // Always "storage.write"

func (StorageWrite) Default

func (c StorageWrite) Default() StorageWrite

func (StorageWrite) MarshalJSON

func (c StorageWrite) MarshalJSON() ([]byte, error)

type Symbol

type Symbol string // Always "symbol"

func (Symbol) Default

func (c Symbol) Default() Symbol

func (Symbol) MarshalJSON

func (c Symbol) MarshalJSON() ([]byte, error)

type Text

type Text string // Always "text"

func (Text) Default

func (c Text) Default() Text

func (Text) MarshalJSON

func (c Text) MarshalJSON() ([]byte, error)

type Tool

type Tool string // Always "tool"

func (Tool) Default

func (c Tool) Default() Tool

func (Tool) MarshalJSON

func (c Tool) MarshalJSON() ([]byte, error)

type UnknownError

type UnknownError string // Always "UnknownError"

func (UnknownError) Default

func (c UnknownError) Default() UnknownError

func (UnknownError) MarshalJSON

func (c UnknownError) MarshalJSON() ([]byte, error)

type User

type User string // Always "user"

func (User) Default

func (c User) Default() User

func (User) MarshalJSON

func (c User) MarshalJSON() ([]byte, error)

Jump to

Keyboard shortcuts

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