external

package
v0.4.11-alpha3 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: Apache-2.0 Imports: 25 Imported by: 20 modules, 41 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

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

Index

Constants

View Source
const (
	AppManageURLFilename = "app-management.url"
	APIComposeInfo       = "/v2/app_management/compose"
	APIComposeStatus     = "/v2/app_management/compose"
)
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"
)
View Source
const (
	UserServiceAddressFilename = "user-service.url"
)

Variables

This section is empty.

Functions

func GetMessageBusAddress

func GetMessageBusAddress(runtimePath string) (string, error)

func GetPublicKey added in v0.4.4

func GetPublicKey(runtimePath string) (*ecdsa.PublicKey, error)

func PrintEventTypesAsMarkdown added in v0.4.8

func PrintEventTypesAsMarkdown(sourceID, version string, eventTypes []EventType)

func PublishEventInSocket added in v0.4.8

func PublishEventInSocket(ctx context.Context, SourceID string, Name string, properties map[string]string) (*http.Response, error)

Types

type AppManageService added in v0.4.8

type AppManageService interface {
	GetAppInfo(storeId string) (model.ComposeAppWithStoreInfo, error)
	PutAppStatus(storeId string, status string) (bool, error)
}

func NewAppManageService added in v0.4.8

func NewAppManageService(RuntimePath string) (AppManageService, error)

type EventType added in v0.4.8

type EventType struct {
	Name             string
	SourceID         string
	PropertyTypeList []PropertyType
}

type ManagementService

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

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
}

func NewNotifyService

func NewNotifyService(runtimePath string) NotifyService

type NvidiaGPUInfo added in v0.4.8

type NvidiaGPUInfo struct {
	Index         int
	UUID          string
	DriverVersion string
	Name          string
	GPUSerial     string
}

func NvidiaGPUInfoList added in v0.4.8

func NvidiaGPUInfoList() ([]NvidiaGPUInfo, error)

func NvidiaGPUInfoListWithSMI added in v0.4.10

func NvidiaGPUInfoListWithSMI() ([]NvidiaGPUInfo, error)

type PropertyType added in v0.4.8

type PropertyType struct {
	Name        string
	Description *string
	Example     *string
}

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