v1connect

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2026 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// WebServiceSubscribeProcedure is the fully-qualified name of the WebService's Subscribe RPC.
	WebServiceSubscribeProcedure = "/platform.server.v1.WebService/Subscribe"
	// WebServiceInstallAppProcedure is the fully-qualified name of the WebService's InstallApp RPC.
	WebServiceInstallAppProcedure = "/platform.server.v1.WebService/InstallApp"
	// WebServiceUpdateAppProcedure is the fully-qualified name of the WebService's UpdateApp RPC.
	WebServiceUpdateAppProcedure = "/platform.server.v1.WebService/UpdateApp"
	// WebServiceDeleteAppProcedure is the fully-qualified name of the WebService's DeleteApp RPC.
	WebServiceDeleteAppProcedure = "/platform.server.v1.WebService/DeleteApp"
	// WebServiceAppsHealthCheckProcedure is the fully-qualified name of the WebService's
	// AppsHealthCheck RPC.
	WebServiceAppsHealthCheckProcedure = "/platform.server.v1.WebService/AppsHealthCheck"
	// WebServiceGetAppsInStoreProcedure is the fully-qualified name of the WebService's GetAppsInStore
	// RPC.
	WebServiceGetAppsInStoreProcedure = "/platform.server.v1.WebService/GetAppsInStore"
	// WebServiceGetAppStorageProcedure is the fully-qualified name of the WebService's GetAppStorage
	// RPC.
	WebServiceGetAppStorageProcedure = "/platform.server.v1.WebService/GetAppStorage"
	// WebServiceShutdownHostProcedure is the fully-qualified name of the WebService's ShutdownHost RPC.
	WebServiceShutdownHostProcedure = "/platform.server.v1.WebService/ShutdownHost"
	// WebServiceRestartHostProcedure is the fully-qualified name of the WebService's RestartHost RPC.
	WebServiceRestartHostProcedure = "/platform.server.v1.WebService/RestartHost"
	// WebServiceGetSystemStatsProcedure is the fully-qualified name of the WebService's GetSystemStats
	// RPC.
	WebServiceGetSystemStatsProcedure = "/platform.server.v1.WebService/GetSystemStats"
	// WebServiceGetComponentVersionsProcedure is the fully-qualified name of the WebService's
	// GetComponentVersions RPC.
	WebServiceGetComponentVersionsProcedure = "/platform.server.v1.WebService/GetComponentVersions"
	// WebServiceGetSystemLogsProcedure is the fully-qualified name of the WebService's GetSystemLogs
	// RPC.
	WebServiceGetSystemLogsProcedure = "/platform.server.v1.WebService/GetSystemLogs"
	// WebServiceGetDeviceSettingsProcedure is the fully-qualified name of the WebService's
	// GetDeviceSettings RPC.
	WebServiceGetDeviceSettingsProcedure = "/platform.server.v1.WebService/GetDeviceSettings"
	// WebServiceSetDeviceSettingsProcedure is the fully-qualified name of the WebService's
	// SetDeviceSettings RPC.
	WebServiceSetDeviceSettingsProcedure = "/platform.server.v1.WebService/SetDeviceSettings"
	// WebServiceEnableSecureTunnellingProcedure is the fully-qualified name of the WebService's
	// EnableSecureTunnelling RPC.
	WebServiceEnableSecureTunnellingProcedure = "/platform.server.v1.WebService/EnableSecureTunnelling"
	// WebServiceDisableSecureTunnellingProcedure is the fully-qualified name of the WebService's
	// DisableSecureTunnelling RPC.
	WebServiceDisableSecureTunnellingProcedure = "/platform.server.v1.WebService/DisableSecureTunnelling"
	// WebServiceRegisterToLocatorProcedure is the fully-qualified name of the WebService's
	// RegisterToLocator RPC.
	WebServiceRegisterToLocatorProcedure = "/platform.server.v1.WebService/RegisterToLocator"
	// WebServiceDeregisterFromLocatorProcedure is the fully-qualified name of the WebService's
	// DeregisterFromLocator RPC.
	WebServiceDeregisterFromLocatorProcedure = "/platform.server.v1.WebService/DeregisterFromLocator"
	// WebServiceRegisterPeerProcedure is the fully-qualified name of the WebService's RegisterPeer RPC.
	WebServiceRegisterPeerProcedure = "/platform.server.v1.WebService/RegisterPeer"
	// WebServiceDeregisterPeerProcedure is the fully-qualified name of the WebService's DeregisterPeer
	// RPC.
	WebServiceDeregisterPeerProcedure = "/platform.server.v1.WebService/DeregisterPeer"
)

These constants are the fully-qualified names of the RPCs defined in this package. They're exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.

Note that these are different from the fully-qualified method names used by google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to reflection-formatted method names, remove the leading slash and convert the remaining slash to a period.

View Source
const (
	// WebServiceName is the fully-qualified name of the WebService service.
	WebServiceName = "platform.server.v1.WebService"
)

Variables

This section is empty.

Functions

func NewWebServiceHandler

func NewWebServiceHandler(svc WebServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)

NewWebServiceHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.

By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.

Types

type UnimplementedWebServiceHandler

type UnimplementedWebServiceHandler struct{}

UnimplementedWebServiceHandler returns CodeUnimplemented from all methods.

func (UnimplementedWebServiceHandler) AppsHealthCheck added in v0.3.7

func (UnimplementedWebServiceHandler) DeleteApp added in v0.3.0

func (UnimplementedWebServiceHandler) DeregisterFromLocator added in v0.4.23

func (UnimplementedWebServiceHandler) DeregisterPeer added in v0.9.0

func (UnimplementedWebServiceHandler) GetAppStorage added in v0.4.18

func (UnimplementedWebServiceHandler) GetAppsInStore added in v0.4.0

func (UnimplementedWebServiceHandler) GetComponentVersions added in v0.8.2

func (UnimplementedWebServiceHandler) GetDeviceSettings added in v0.4.0

func (UnimplementedWebServiceHandler) GetSystemLogs added in v0.8.4

func (UnimplementedWebServiceHandler) GetSystemStats added in v0.3.8

func (UnimplementedWebServiceHandler) InstallApp added in v0.3.0

func (UnimplementedWebServiceHandler) RegisterPeer added in v0.5.0

func (UnimplementedWebServiceHandler) RegisterToLocator added in v0.4.22

func (UnimplementedWebServiceHandler) SetDeviceSettings added in v0.4.15

func (UnimplementedWebServiceHandler) Subscribe added in v0.4.10

func (UnimplementedWebServiceHandler) UpdateApp added in v0.3.0

type WebServiceClient

type WebServiceClient interface {
	// Subscribe to the server for events
	Subscribe(context.Context, *connect.Request[v1.SubscribeRequest]) (*connect.ServerStreamForClient[v1.ServerEvent], error)
	// Install a Home Cloud application
	InstallApp(context.Context, *connect.Request[v1.InstallAppRequest]) (*connect.Response[v1.InstallAppResponse], error)
	// Update a Home Cloud application
	UpdateApp(context.Context, *connect.Request[v1.UpdateAppRequest]) (*connect.Response[v1.UpdateAppResponse], error)
	// Delete a Home Cloud application
	DeleteApp(context.Context, *connect.Request[v1.DeleteAppRequest]) (*connect.Response[v1.DeleteAppResponse], error)
	// Check the current health of all installed Home Cloud applications
	AppsHealthCheck(context.Context, *connect.Request[v1.AppsHealthCheckRequest]) (*connect.Response[v1.AppsHealthCheckResponse], error)
	// Get all apps available in the store
	GetAppsInStore(context.Context, *connect.Request[v1.GetAppsInStoreRequest]) (*connect.Response[v1.GetAppsInStoreResponse], error)
	// Get all installed app storage volumes
	GetAppStorage(context.Context, *connect.Request[v1.GetAppStorageRequest]) (*connect.Response[v1.GetAppStorageResponse], error)
	// Shutdown the host machine running Home Cloud
	ShutdownHost(context.Context, *connect.Request[v1.ShutdownHostRequest]) (*connect.Response[v1.ShutdownHostResponse], error)
	// Restart the host machine running Home Cloud
	RestartHost(context.Context, *connect.Request[v1.RestartHostRequest]) (*connect.Response[v1.RestartHostResponse], error)
	// Get the current host machine stats (cpu, memory, drives)
	GetSystemStats(context.Context, *connect.Request[v1.GetSystemStatsRequest]) (*connect.Response[v1.GetSystemStatsResponse], error)
	// GetComponentVersions returns the versions of all system components (daemon, server, etc.)
	GetComponentVersions(context.Context, *connect.Request[v1.GetComponentVersionsRequest]) (*connect.Response[v1.GetComponentVersionsResponse], error)
	// GetSystemLogs returns the past X seconds of system logs (daemon, server, fuse, etc.)
	GetSystemLogs(context.Context, *connect.Request[v1.GetSystemLogsRequest]) (*connect.Response[v1.GetSystemLogsResponse], error)
	// Get the device settings
	GetDeviceSettings(context.Context, *connect.Request[v1.GetDeviceSettingsRequest]) (*connect.Response[v1.GetDeviceSettingsResponse], error)
	// Set the device settings
	SetDeviceSettings(context.Context, *connect.Request[v1.SetDeviceSettingsRequest]) (*connect.Response[v1.SetDeviceSettingsResponse], error)
	// Enables the remote access feature
	EnableSecureTunnelling(context.Context, *connect.Request[v1.EnableSecureTunnellingRequest]) (*connect.Response[v1.EnableSecureTunnellingResponse], error)
	// Disables the remote access feature
	DisableSecureTunnelling(context.Context, *connect.Request[v1.DisableSecureTunnellingRequest]) (*connect.Response[v1.DisableSecureTunnellingResponse], error)
	// Register the server with the given Locator service
	RegisterToLocator(context.Context, *connect.Request[v1.RegisterToLocatorRequest]) (*connect.Response[v1.RegisterToLocatorResponse], error)
	// Deregister the server from the given Locator service
	DeregisterFromLocator(context.Context, *connect.Request[v1.DeregisterFromLocatorRequest]) (*connect.Response[v1.DeregisterFromLocatorResponse], error)
	// RegisterPeer adds a peer to remote access
	RegisterPeer(context.Context, *connect.Request[v1.RegisterPeerRequest]) (*connect.Response[v1.RegisterPeerResponse], error)
	// DeregisterPeer removes a peer from remote access
	DeregisterPeer(context.Context, *connect.Request[v1.DeregisterPeerRequest]) (*connect.Response[v1.DeregisterPeerResponse], error)
}

WebServiceClient is a client for the platform.server.v1.WebService service.

func NewWebServiceClient

func NewWebServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) WebServiceClient

NewWebServiceClient constructs a client for the platform.server.v1.WebService service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.

The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).

type WebServiceHandler

type WebServiceHandler interface {
	// Subscribe to the server for events
	Subscribe(context.Context, *connect.Request[v1.SubscribeRequest], *connect.ServerStream[v1.ServerEvent]) error
	// Install a Home Cloud application
	InstallApp(context.Context, *connect.Request[v1.InstallAppRequest]) (*connect.Response[v1.InstallAppResponse], error)
	// Update a Home Cloud application
	UpdateApp(context.Context, *connect.Request[v1.UpdateAppRequest]) (*connect.Response[v1.UpdateAppResponse], error)
	// Delete a Home Cloud application
	DeleteApp(context.Context, *connect.Request[v1.DeleteAppRequest]) (*connect.Response[v1.DeleteAppResponse], error)
	// Check the current health of all installed Home Cloud applications
	AppsHealthCheck(context.Context, *connect.Request[v1.AppsHealthCheckRequest]) (*connect.Response[v1.AppsHealthCheckResponse], error)
	// Get all apps available in the store
	GetAppsInStore(context.Context, *connect.Request[v1.GetAppsInStoreRequest]) (*connect.Response[v1.GetAppsInStoreResponse], error)
	// Get all installed app storage volumes
	GetAppStorage(context.Context, *connect.Request[v1.GetAppStorageRequest]) (*connect.Response[v1.GetAppStorageResponse], error)
	// Shutdown the host machine running Home Cloud
	ShutdownHost(context.Context, *connect.Request[v1.ShutdownHostRequest]) (*connect.Response[v1.ShutdownHostResponse], error)
	// Restart the host machine running Home Cloud
	RestartHost(context.Context, *connect.Request[v1.RestartHostRequest]) (*connect.Response[v1.RestartHostResponse], error)
	// Get the current host machine stats (cpu, memory, drives)
	GetSystemStats(context.Context, *connect.Request[v1.GetSystemStatsRequest]) (*connect.Response[v1.GetSystemStatsResponse], error)
	// GetComponentVersions returns the versions of all system components (daemon, server, etc.)
	GetComponentVersions(context.Context, *connect.Request[v1.GetComponentVersionsRequest]) (*connect.Response[v1.GetComponentVersionsResponse], error)
	// GetSystemLogs returns the past X seconds of system logs (daemon, server, fuse, etc.)
	GetSystemLogs(context.Context, *connect.Request[v1.GetSystemLogsRequest]) (*connect.Response[v1.GetSystemLogsResponse], error)
	// Get the device settings
	GetDeviceSettings(context.Context, *connect.Request[v1.GetDeviceSettingsRequest]) (*connect.Response[v1.GetDeviceSettingsResponse], error)
	// Set the device settings
	SetDeviceSettings(context.Context, *connect.Request[v1.SetDeviceSettingsRequest]) (*connect.Response[v1.SetDeviceSettingsResponse], error)
	// Enables the remote access feature
	EnableSecureTunnelling(context.Context, *connect.Request[v1.EnableSecureTunnellingRequest]) (*connect.Response[v1.EnableSecureTunnellingResponse], error)
	// Disables the remote access feature
	DisableSecureTunnelling(context.Context, *connect.Request[v1.DisableSecureTunnellingRequest]) (*connect.Response[v1.DisableSecureTunnellingResponse], error)
	// Register the server with the given Locator service
	RegisterToLocator(context.Context, *connect.Request[v1.RegisterToLocatorRequest]) (*connect.Response[v1.RegisterToLocatorResponse], error)
	// Deregister the server from the given Locator service
	DeregisterFromLocator(context.Context, *connect.Request[v1.DeregisterFromLocatorRequest]) (*connect.Response[v1.DeregisterFromLocatorResponse], error)
	// RegisterPeer adds a peer to remote access
	RegisterPeer(context.Context, *connect.Request[v1.RegisterPeerRequest]) (*connect.Response[v1.RegisterPeerResponse], error)
	// DeregisterPeer removes a peer from remote access
	DeregisterPeer(context.Context, *connect.Request[v1.DeregisterPeerRequest]) (*connect.Response[v1.DeregisterPeerResponse], error)
}

WebServiceHandler is an implementation of the platform.server.v1.WebService service.

Jump to

Keyboard shortcuts

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