{"modulePath":"github.com/onkernel/kernel-go-sdk","version":"v0.24.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package shared\n\n## Types\n\n```go\ntype AppAction struct {\n\t// Name of the action\n\tName string `json:\"name,required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tName        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nAn action available on the app\n\n```go\nfunc (r AppAction) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *AppAction) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype BrowserExtension struct {\n\t// Extension ID to load for this browser session\n\tID string `json:\"id\"`\n\t// Extension name to load for this browser session (instead of id). Must be 1-255\n\t// characters, using letters, numbers, dots, underscores, or hyphens.\n\tName string `json:\"name\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID          respjson.Field\n\t\tName        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nExtension selection for the browser session. Provide either id or name of an extension uploaded to Kernel.\n\n```go\nfunc (r BrowserExtension) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r BrowserExtension) ToParam() BrowserExtensionParam\n```\nToParam converts this BrowserExtension to a BrowserExtensionParam.\n\nWarning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with BrowserExtensionParam.Overrides()\n\n```go\nfunc (r *BrowserExtension) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype BrowserExtensionParam struct {\n\t// Extension ID to load for this browser session\n\tID param.Opt[string] `json:\"id,omitzero\"`\n\t// Extension name to load for this browser session (instead of id). Must be 1-255\n\t// characters, using letters, numbers, dots, underscores, or hyphens.\n\tName param.Opt[string] `json:\"name,omitzero\"`\n\t// contains filtered or unexported fields\n}\n```\nExtension selection for the browser session. Provide either id or name of an extension uploaded to Kernel.\n\n```go\nfunc (r BrowserExtensionParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *BrowserExtensionParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype BrowserProfile struct {\n\t// Profile ID to load for this browser session\n\tID string `json:\"id\"`\n\t// Profile name to load for this browser session (instead of id). Must be 1-255\n\t// characters, using letters, numbers, dots, underscores, or hyphens.\n\tName string `json:\"name\"`\n\t// If true, save changes made during the session back to the profile when the\n\t// session ends.\n\tSaveChanges bool `json:\"save_changes\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID          respjson.Field\n\t\tName        respjson.Field\n\t\tSaveChanges respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nProfile selection for the browser session. Provide either id or name. If specified, the matching profile will be loaded into the browser session. Profiles must be created beforehand.\n\n```go\nfunc (r BrowserProfile) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r BrowserProfile) ToParam() BrowserProfileParam\n```\nToParam converts this BrowserProfile to a BrowserProfileParam.\n\nWarning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with BrowserProfileParam.Overrides()\n\n```go\nfunc (r *BrowserProfile) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype BrowserProfileParam struct {\n\t// Profile ID to load for this browser session\n\tID param.Opt[string] `json:\"id,omitzero\"`\n\t// Profile name to load for this browser session (instead of id). Must be 1-255\n\t// characters, using letters, numbers, dots, underscores, or hyphens.\n\tName param.Opt[string] `json:\"name,omitzero\"`\n\t// If true, save changes made during the session back to the profile when the\n\t// session ends.\n\tSaveChanges param.Opt[bool] `json:\"save_changes,omitzero\"`\n\t// contains filtered or unexported fields\n}\n```\nProfile selection for the browser session. Provide either id or name. If specified, the matching profile will be loaded into the browser session. Profiles must be created beforehand.\n\n```go\nfunc (r BrowserProfileParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *BrowserProfileParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype BrowserViewport struct {\n\t// Browser window height in pixels.\n\tHeight int64 `json:\"height,required\"`\n\t// Browser window width in pixels.\n\tWidth int64 `json:\"width,required\"`\n\t// Display refresh rate in Hz. If omitted, automatically determined from width and\n\t// height.\n\tRefreshRate int64 `json:\"refresh_rate\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tHeight      respjson.Field\n\t\tWidth       respjson.Field\n\t\tRefreshRate respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nInitial browser window size in pixels with optional refresh rate. If omitted, image defaults apply (1920x1080@25). Only specific viewport configurations are supported. The server will reject unsupported combinations. Supported resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25, 1440x900@25, 1024x768@60, 1200x800@60 If refresh\\_rate is not provided, it will be automatically determined from the width and height if they match a supported configuration exactly. Note: Higher resolutions may affect the responsiveness of live view browser\n\n```go\nfunc (r BrowserViewport) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r BrowserViewport) ToParam() BrowserViewportParam\n```\nToParam converts this BrowserViewport to a BrowserViewportParam.\n\nWarning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with BrowserViewportParam.Overrides()\n\n```go\nfunc (r *BrowserViewport) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype BrowserViewportParam struct {\n\t// Browser window height in pixels.\n\tHeight int64 `json:\"height,required\"`\n\t// Browser window width in pixels.\n\tWidth int64 `json:\"width,required\"`\n\t// Display refresh rate in Hz. If omitted, automatically determined from width and\n\t// height.\n\tRefreshRate param.Opt[int64] `json:\"refresh_rate,omitzero\"`\n\t// contains filtered or unexported fields\n}\n```\nInitial browser window size in pixels with optional refresh rate. If omitted, image defaults apply (1920x1080@25). Only specific viewport configurations are supported. The server will reject unsupported combinations. Supported resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25, 1440x900@25, 1024x768@60, 1200x800@60 If refresh\\_rate is not provided, it will be automatically determined from the width and height if they match a supported configuration exactly. Note: Higher resolutions may affect the responsiveness of live view browser\n\nThe properties Height, Width are required.\n\n```go\nfunc (r BrowserViewportParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *BrowserViewportParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ErrorDetail struct {\n\t// Lower-level error code providing more specific detail\n\tCode string `json:\"code\"`\n\t// Further detail about the error\n\tMessage string `json:\"message\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tCode        respjson.Field\n\t\tMessage     respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\n\n```go\nfunc (r ErrorDetail) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ErrorDetail) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ErrorEvent struct {\n\tError ErrorModel `json:\"error,required\"`\n\t// Event type identifier (always \"error\").\n\tEvent constant.Error `json:\"event,required\"`\n\t// Time the error occurred.\n\tTimestamp time.Time `json:\"timestamp,required\" format:\"date-time\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tError       respjson.Field\n\t\tEvent       respjson.Field\n\t\tTimestamp   respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nAn error event from the application.\n\n```go\nfunc (ErrorEvent) ImplInvocationFollowResponseUnion()\n```\n\n```go\nfunc (r ErrorEvent) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ErrorEvent) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ErrorModel struct {\n\t// Application-specific error code (machine-readable)\n\tCode string `json:\"code,required\"`\n\t// Human-readable error description for debugging\n\tMessage string `json:\"message,required\"`\n\t// Additional error details (for multiple errors)\n\tDetails    []ErrorDetail `json:\"details\"`\n\tInnerError ErrorDetail   `json:\"inner_error\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tCode        respjson.Field\n\t\tMessage     respjson.Field\n\t\tDetails     respjson.Field\n\t\tInnerError  respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\n\n```go\nfunc (r ErrorModel) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ErrorModel) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype HeartbeatEvent struct {\n\t// Event type identifier (always \"sse_heartbeat\").\n\tEvent constant.SseHeartbeat `json:\"event,required\"`\n\t// Time the heartbeat was sent.\n\tTimestamp time.Time `json:\"timestamp,required\" format:\"date-time\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tEvent       respjson.Field\n\t\tTimestamp   respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nHeartbeat event sent periodically to keep SSE connection alive.\n\n```go\nfunc (HeartbeatEvent) ImplInvocationFollowResponseUnion()\n```\n\n```go\nfunc (r HeartbeatEvent) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *HeartbeatEvent) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype LogEvent struct {\n\t// Event type identifier (always \"log\").\n\tEvent constant.Log `json:\"event,required\"`\n\t// Log message text.\n\tMessage string `json:\"message,required\"`\n\t// Time the log entry was produced.\n\tTimestamp time.Time `json:\"timestamp,required\" format:\"date-time\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tEvent       respjson.Field\n\t\tMessage     respjson.Field\n\t\tTimestamp   respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nA log entry from the application.\n\n```go\nfunc (LogEvent) ImplInvocationFollowResponseUnion()\n```\n\n```go\nfunc (r LogEvent) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *LogEvent) UnmarshalJSON(data []byte) error\n```\n\n","path":"github.com/onkernel/kernel-go-sdk/shared","name":"shared","synopsis":"","isRedistributable":true}
