adminserver

package
v1.15.12 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2026 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Overview

Service assembly for the admin-side server and node management subdomain of the network module. Only the module facade may reach it.

Index

Constants

View Source
const (
	ShadowSocks  = "shadowsocks"
	Vmess        = "vmess"
	Vless        = "vless"
	Trojan       = "trojan"
	AnyTLS       = "anytls"
	Tuic         = "tuic"
	Hysteria2    = "hysteria2"
	ShadowsocksR = "shadowsocksr"
	Mieru        = "mieru"
	Naive        = "naive"
	Snell        = "snell"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateNodeLogic

type CreateNodeLogic struct {
	logger.Logger
	// contains filtered or unexported fields
}

func (*CreateNodeLogic) CreateNode

func (l *CreateNodeLogic) CreateNode(req *dto.CreateNodeRequest) error

type CreateServerLogic

type CreateServerLogic struct {
	logger.Logger
	// contains filtered or unexported fields
}

func (*CreateServerLogic) CreateServer

func (l *CreateServerLogic) CreateServer(req *dto.CreateServerRequest) error

type DeleteNodeLogic

type DeleteNodeLogic struct {
	logger.Logger
	// contains filtered or unexported fields
}

func (*DeleteNodeLogic) DeleteNode

func (l *DeleteNodeLogic) DeleteNode(req *dto.DeleteNodeRequest) error

type DeleteServerLogic

type DeleteServerLogic struct {
	logger.Logger
	// contains filtered or unexported fields
}

func (*DeleteServerLogic) DeleteServer

func (l *DeleteServerLogic) DeleteServer(req *dto.DeleteServerRequest) error

type Deps

type Deps struct {
	Store repository.Store
	// Config snapshots the runtime-mutable node settings per request.
	Config func() Snapshot
}

Deps declares the subdomain's dependencies; the module facade forwards them from the composition root.

type FilterNodeListLogic

type FilterNodeListLogic struct {
	logger.Logger
	// contains filtered or unexported fields
}

func (*FilterNodeListLogic) FilterNodeList

func (l *FilterNodeListLogic) FilterNodeList(req *dto.FilterNodeListRequest) (resp *dto.FilterNodeListResponse, err error)

type FilterServerListLogic

type FilterServerListLogic struct {
	logger.Logger
	// contains filtered or unexported fields
}

func (*FilterServerListLogic) FilterServerList

func (l *FilterServerListLogic) FilterServerList(req *dto.FilterServerListRequest) (resp *dto.FilterServerListResponse, err error)

type GetServerNodeConfigLogic

type GetServerNodeConfigLogic struct {
	logger.Logger
	// contains filtered or unexported fields
}

func (*GetServerNodeConfigLogic) GetServerNodeConfig

type GetServerProtocolsLogic

type GetServerProtocolsLogic struct {
	logger.Logger
	// contains filtered or unexported fields
}

func (*GetServerProtocolsLogic) GetServerProtocols

type QueryNodeTagLogic

type QueryNodeTagLogic struct {
	logger.Logger
	// contains filtered or unexported fields
}

func (*QueryNodeTagLogic) QueryNodeTag

func (l *QueryNodeTagLogic) QueryNodeTag() (resp *dto.QueryNodeTagResponse, err error)

type ResetSortWithNodeLogic

type ResetSortWithNodeLogic struct {
	logger.Logger
	// contains filtered or unexported fields
}

func (*ResetSortWithNodeLogic) ResetSortWithNode

func (l *ResetSortWithNodeLogic) ResetSortWithNode(req *dto.ResetSortRequest) error

type ResetSortWithServerLogic

type ResetSortWithServerLogic struct {
	logger.Logger
	// contains filtered or unexported fields
}

func (*ResetSortWithServerLogic) ResetSortWithServer

func (l *ResetSortWithServerLogic) ResetSortWithServer(req *dto.ResetSortRequest) error

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service is the admin server-management entry point used by the network facade.

func NewService

func NewService(deps Deps) *Service

func (*Service) CreateNode

func (s *Service) CreateNode(ctx context.Context, req *dto.CreateNodeRequest) error

func (*Service) CreateServer

func (s *Service) CreateServer(ctx context.Context, req *dto.CreateServerRequest) error

func (*Service) DeleteNode

func (s *Service) DeleteNode(ctx context.Context, req *dto.DeleteNodeRequest) error

func (*Service) DeleteServer

func (s *Service) DeleteServer(ctx context.Context, req *dto.DeleteServerRequest) error

func (*Service) FilterNodeList

func (*Service) FilterServerList

func (*Service) GetServerNodeConfig

func (*Service) GetServerProtocols

func (*Service) QueryNodeTag

func (s *Service) QueryNodeTag(ctx context.Context) (*dto.QueryNodeTagResponse, error)

func (*Service) ResetSortWithNode

func (s *Service) ResetSortWithNode(ctx context.Context, req *dto.ResetSortRequest) error

func (*Service) ResetSortWithServer

func (s *Service) ResetSortWithServer(ctx context.Context, req *dto.ResetSortRequest) error

func (*Service) ToggleNodeStatus

func (s *Service) ToggleNodeStatus(ctx context.Context, req *dto.ToggleNodeStatusRequest) error

func (*Service) UpdateNode

func (s *Service) UpdateNode(ctx context.Context, req *dto.UpdateNodeRequest) error

func (*Service) UpdateServer

func (s *Service) UpdateServer(ctx context.Context, req *dto.UpdateServerRequest) error

func (*Service) UpdateServerNodeConfig

func (s *Service) UpdateServerNodeConfig(ctx context.Context, req *dto.UpdateServerNodeConfigRequest) error

type Snapshot

type Snapshot struct {
	Node config.NodeConfig
}

Snapshot is the per-request view of the runtime-mutable node settings.

type ToggleNodeStatusLogic

type ToggleNodeStatusLogic struct {
	logger.Logger
	// contains filtered or unexported fields
}

func (*ToggleNodeStatusLogic) ToggleNodeStatus

func (l *ToggleNodeStatusLogic) ToggleNodeStatus(req *dto.ToggleNodeStatusRequest) error

type UpdateNodeLogic

type UpdateNodeLogic struct {
	logger.Logger
	// contains filtered or unexported fields
}

func (*UpdateNodeLogic) UpdateNode

func (l *UpdateNodeLogic) UpdateNode(req *dto.UpdateNodeRequest) error

type UpdateServerLogic

type UpdateServerLogic struct {
	logger.Logger
	// contains filtered or unexported fields
}

func (*UpdateServerLogic) UpdateServer

func (l *UpdateServerLogic) UpdateServer(req *dto.UpdateServerRequest) error

type UpdateServerNodeConfigLogic

type UpdateServerNodeConfigLogic struct {
	logger.Logger
	// contains filtered or unexported fields
}

func (*UpdateServerNodeConfigLogic) UpdateServerNodeConfig

func (l *UpdateServerNodeConfigLogic) UpdateServerNodeConfig(req *dto.UpdateServerNodeConfigRequest) error

Jump to

Keyboard shortcuts

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