external

package
v0.4.1-alpha2 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2022 License: Apache-2.0 Imports: 11 Imported by: 23

Documentation

Overview

The commmon package provides structs and functions for external code to interact with this gateway service.

Index

Constants

View Source
const (
	ManagementURLFilename = "management.url"
	StaticURLFilename     = "static.url"
	APIGatewayRoutes      = "/v1/gateway/routes"
	APIGatewayPort        = "/v1/gateway/port"
)
View Source
const (
	MessageBusAddressFilename = "message-bus.url"
	APIMessageBus             = "/v2/message_bus"
)
View Source
const (
	CasaOSURLFilename = "casaos.url"
	APICasaOSNotify   = "/v1/notify"
)
View Source
const (
	APICasaOSShare = "/v1/samba/shares"
)

Variables

This section is empty.

Functions

func GetMessageBusAddress

func GetMessageBusAddress(runtimePath string) (string, error)

Types

type ManagementService

type ManagementService interface {
	CreateRoute(route *model.Route) error
	ChangePort(request *model.ChangePortRequest) error
}

func NewManagementService

func NewManagementService(RuntimePath string) (ManagementService, error)

type NotifyService

type NotifyService interface {
	SendNotify(path string, message interface{}) error
	SendSystemStatusNotify(message map[string]interface{}) error
	SendInstallAppBySocket(app notify.Application) error
	SendUninstallAppBySocket(app notify.Application) error
}

func NewNotifyService

func NewNotifyService(runtimePath string) NotifyService

type ShareService

type ShareService interface {
	DeleteShare(id string) error
}

func NewShareService

func NewShareService(runtimePath string) ShareService

Jump to

Keyboard shortcuts

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