Documentation ¶
Index ¶
- Constants
- Variables
- type GetCurrentServiceInfo
- type GetVersionResponse
- type Handler
- func (h *Handler) DOMReady(_ context.Context)
- func (h *Handler) GetAppConfig() (app.Config, error)
- func (h *Handler) GetCurrentServiceInfo() (GetCurrentServiceInfo, error)
- func (h *Handler) GetLatestRelease() (LatestRelease, error)
- func (h *Handler) GetVersion() (*GetVersionResponse, error)
- func (h *Handler) InitialiseApp(req *InitialiseAppRequest) error
- func (h *Handler) IsAppInitialised() (bool, error)
- func (h *Handler) RespondToInteraction(interaction interactor.Interaction) error
- func (h *Handler) SearchForExistingConfiguration() (*SearchForExistingConfigurationResponse, error)
- func (h *Handler) Shutdown(_ context.Context)
- func (h *Handler) StartService(req *StartServiceRequest) error
- func (h *Handler) Startup(ctx context.Context)
- func (h *Handler) StopService() error
- func (h *Handler) SubmitWalletAPIRequest(request jsonrpc.Request) (*jsonrpc.Response, error)
- func (h *Handler) UpdateAppConfig(updatedConfig app.Config) error
- type HealthCheckStatus
- type InitialiseAppRequest
- type LatestRelease
- type SearchForExistingConfigurationResponse
- type StartServiceRequest
Constants ¶
View Source
const ( ReleasesAPI = "https://api.github.com/repos/vegaprotocol/vegawallet-desktop/releases" ReleasesURL = "https://github.com/vegaprotocol/vegawallet-desktop/releases" )
View Source
const NewInteractionEvent = "new_interaction"
View Source
const (
ReloadingEntireApplicationRequired = "reloading_entire_application_required"
)
Variables ¶
View Source
var ( ErrTraceIDIsRequired = errors.New("a trace ID is required for an interaction") ErrNameIsRequired = errors.New("a name is required for an interaction") )
View Source
var ( ErrContextCanceled = errors.New("context canceled") ErrServiceAlreadyRunning = errors.New("the service is already running") ErrServiceNotRunning = errors.New("the service is not running") )
View Source
var ErrAPIv1Unsupported = errors.New("sending transactions through the API v1 is no longer supported")
View Source
var ErrAppIsNotInitialised = errors.New("the application has not been initialised")
Functions ¶
This section is empty.
Types ¶
type GetCurrentServiceInfo ¶
type GetVersionResponse ¶
type GetVersionResponse struct { Version string `json:"version"` GitHash string `json:"gitHash"` Backend *wversion.GetSoftwareVersionResponse `json:"backend"` Compatibility *wversion.CheckSoftwareCompatibilityResponse `json:"networksCompatibility"` }
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func (*Handler) GetAppConfig ¶
GetAppConfig return the application configuration.
func (*Handler) GetCurrentServiceInfo ¶
func (h *Handler) GetCurrentServiceInfo() (GetCurrentServiceInfo, error)
func (*Handler) GetLatestRelease ¶
func (h *Handler) GetLatestRelease() (LatestRelease, error)
func (*Handler) GetVersion ¶
func (h *Handler) GetVersion() (*GetVersionResponse, error)
func (*Handler) InitialiseApp ¶
func (h *Handler) InitialiseApp(req *InitialiseAppRequest) error
func (*Handler) IsAppInitialised ¶
func (*Handler) RespondToInteraction ¶
func (h *Handler) RespondToInteraction(interaction interactor.Interaction) error
func (*Handler) SearchForExistingConfiguration ¶
func (h *Handler) SearchForExistingConfiguration() (*SearchForExistingConfigurationResponse, error)
SearchForExistingConfiguration searches for existing wallets and networks. This endpoint should be used to help the user to restore existing wallet setup in the app.
func (*Handler) StartService ¶
func (h *Handler) StartService(req *StartServiceRequest) error
func (*Handler) StopService ¶
func (*Handler) SubmitWalletAPIRequest ¶
type HealthCheckStatus ¶
type HealthCheckStatus string
const ( // UnknownStatus is used when the service health check is not yet known. UnknownStatus HealthCheckStatus = "unknown_status" // ServiceIsHealthy is sent when the service is healthy. // This event can be emitted every 15 seconds. ServiceIsHealthy HealthCheckStatus = "service_is_healthy" // ServiceIsUnhealthy is sent when the service is unhealthy, meaning we could // connect but the endpoint didn't answer what we expected. // This event can be emitted every 15 seconds. ServiceIsUnhealthy HealthCheckStatus = "service_is_unhealthy" // ServiceUnreachable is sent when no service is not running anymore. // This event can be emitted every 15 seconds. ServiceUnreachable HealthCheckStatus = "service_unreachable" // ServiceStopped is sent when the service has been stopped by the user. // This event is emitted once per service lifecycle. // If emitted, the `ServiceStoppedWithError` is not be emitted. ServiceStopped = "service_stopped" // ServiceStoppedWithError is sent when the service unexpectedly stopped, // like an internal crash, of a fail to bind the port. // This event is emitted once per service lifecycle. // If emitted, the `ServiceStopped` is not be emitted. ServiceStoppedWithError = "service_stopped_with_error" )
type InitialiseAppRequest ¶
type InitialiseAppRequest struct {
VegaHome string `json:"vegaHome"`
}
type LatestRelease ¶
type StartServiceRequest ¶
type StartServiceRequest struct {
Network string `json:"network"`
}
func (StartServiceRequest) Check ¶
func (r StartServiceRequest) Check() error
Click to show internal directories.
Click to hide internal directories.