api

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: AGPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterPublicAPI

func RegisterPublicAPI(router *gin.RouterGroup)

Types

type APIService

type APIService struct {
	HTTPPort string `json:"http_port,omitempty"`

	HTTPSHost string `json:"https_host,omitempty"`
	HTTPSPort string `json:"https_port,omitempty"`

	// Status tracking for the API service.
	Status    string     `json:"status"`
	StartedAt *time.Time `json:"started_at,omitempty"`
	StoppedAt *time.Time `json:"stopped_at,omitempty"`
	// contains filtered or unexported fields
}

APIService represents the API service.

func NewAPIService

func NewAPIService(ctx context.Context, opts ...APIServiceOption) (*APIService, error)

NewAPIService creates a new APIService.

func (*APIService) Start

func (api *APIService) Start() error

Start starts services managed by the Manager.

type APIServiceOption

type APIServiceOption func(*APIService) error

APIServiceOption defines a type of function to configures the APIService.

func WithWebSocket

func WithWebSocket(webSocket *melody.Melody) APIServiceOption

func WithWorkspace

func WithWorkspace(workspace *workspace.Workspace) APIServiceOption

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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