Documentation ¶
Index ¶
- Constants
- Variables
- type DefaultNetwork
- type GetCurrentServiceInfo
- type GetVersionResponse
- type Handler
- func (h *Handler) APIV2DeleteAPIToken(token string) error
- func (h *Handler) APIV2DescribeAPIToken(token string) (connections.TokenDescription, error)
- func (h *Handler) APIV2GenerateAPIToken(params connections.GenerateAPITokenParams) (connections.Token, error)
- func (h *Handler) APIV2ListAPITokens() (connections.ListAPITokensResult, error)
- func (h *Handler) AppMenu() *menu.Menu
- func (h *Handler) ChooseFolder() (string, error)
- 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) GetServiceConfig() (service.Config, 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) (err error)
- func (h *Handler) Startup(ctx context.Context)
- func (h *Handler) StartupBackend() (err error)
- func (h *Handler) StopService()
- func (h *Handler) SubmitWalletAPIRequest(request jsonrpc.Request) (jsonrpc.Response, error)
- func (h *Handler) SuggestFairgroundFolder() string
- func (h *Handler) UpdateAppConfig(updatedConfig app.Config) error
- func (h *Handler) UpdateServiceConfig(cfg service.Config) error
- type HealthCheckStatus
- type InitialiseAppRequest
- type LatestRelease
- type SearchForExistingConfigurationResponse
- type ServiceStarter
- func (s *ServiceStarter) Close()
- func (s *ServiceStarter) Info() GetCurrentServiceInfo
- func (s *ServiceStarter) IsServiceRunning() bool
- func (s *ServiceStarter) RespondToInteraction(interaction interactor.Interaction) error
- func (s *ServiceStarter) ServiceHealth() HealthCheckStatus
- func (s *ServiceStarter) StartService(ctx context.Context, network string) (err error)
- func (s *ServiceStarter) StopService()
- 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 LEGAL_DISCLAIMER = `` /* 1881-byte string literal not displayed */
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") ErrServiceIsNotRunning = errors.New("the service is not running") )
View Source
var ( ErrBackendNotStarted = errors.New("the application backend is not started") ErrAppIsNotInitialised = errors.New("the application has not been initialised") )
View Source
var ( ErrContextCanceled = errors.New("context canceled") ErrServiceAlreadyRunning = errors.New("the service is already running") )
View Source
var DefaultNetworks = []DefaultNetwork{}
View Source
var ErrAPIv1Unsupported = errors.New("sending transactions through the API v1 is no longer supported")
View Source
var ErrNoChanResponseForTraceID = errors.New("no response expected for that traceID")
Functions ¶
This section is empty.
Types ¶
type DefaultNetwork ¶
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) APIV2DeleteAPIToken ¶
func (*Handler) APIV2DescribeAPIToken ¶
func (h *Handler) APIV2DescribeAPIToken(token string) (connections.TokenDescription, error)
func (*Handler) APIV2GenerateAPIToken ¶
func (h *Handler) APIV2GenerateAPIToken(params connections.GenerateAPITokenParams) (connections.Token, error)
func (*Handler) APIV2ListAPITokens ¶
func (h *Handler) APIV2ListAPITokens() (connections.ListAPITokensResult, error)
func (*Handler) ChooseFolder ¶
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) (err error)
func (*Handler) StartupBackend ¶
func (*Handler) StopService ¶
func (h *Handler) StopService()
func (*Handler) SubmitWalletAPIRequest ¶
func (*Handler) SuggestFairgroundFolder ¶
func (*Handler) UpdateAppConfig ¶
UpdateAppConfig update the application configuration. This requires a restart to take effect.
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 ServiceStarter ¶
type ServiceStarter struct {
// contains filtered or unexported fields
}
func NewServiceStarter ¶
func NewServiceStarter(vegaPaths paths.Paths, log *zap.Logger, svcStore *svcStoreV1.Store, walletStore walletapi.WalletStore, netStore walletapi.NetworkStore, connectionsManager *connections.Manager, apiInteractor walletapi.Interactor, receptionChan <-chan interactor.Interaction) (*ServiceStarter, error)
func (*ServiceStarter) Close ¶
func (s *ServiceStarter) Close()
func (*ServiceStarter) Info ¶
func (s *ServiceStarter) Info() GetCurrentServiceInfo
func (*ServiceStarter) IsServiceRunning ¶
func (s *ServiceStarter) IsServiceRunning() bool
func (*ServiceStarter) RespondToInteraction ¶
func (s *ServiceStarter) RespondToInteraction(interaction interactor.Interaction) error
func (*ServiceStarter) ServiceHealth ¶
func (s *ServiceStarter) ServiceHealth() HealthCheckStatus
func (*ServiceStarter) StartService ¶
func (s *ServiceStarter) StartService(ctx context.Context, network string) (err error)
func (*ServiceStarter) StopService ¶
func (s *ServiceStarter) StopService()
type StartServiceRequest ¶
type StartServiceRequest struct { Network string `json:"network"` NoVersionCheck bool `json:"noVersionCheck"` }
func (StartServiceRequest) Check ¶
func (r StartServiceRequest) Check() error
Click to show internal directories.
Click to hide internal directories.